- #Jivelite rotary encoder serial#
- #Jivelite rotary encoder update#
- #Jivelite rotary encoder full#
- #Jivelite rotary encoder code#
Lets assume that PLC sends command to cooler No.1 to close its damper to half. So when the temperature begin to drop ( due to ambient temperature or power reduced), PLC send command to coolers to close its damper from fully open to half open. Lets assume the 4 coolers are in service now. This dampers had three position : open, middle & closed. There are dampers installed in each coolers. When the temperature begins to drop, the coolers begins to cutoff one by one ( on first in first out biases ) by sending commands to PLC. That is, when the temperature is high, the coolers begin to come in service one by one to maintain the temperature in preset limit & vice versa. Cooling system consist of 4 nos cooler with water spray nozzle at top and axial fan motor at bottom, for forced air cooling. Hench, a cooling system is incorporate for cooling this Thyristor. During AC to DC conversion, this Thyristor gets heated. In this HVDC station, there are Thyristor (SCR) valves bank. I work in a Power Grid where there is HVDC station. Well done friend!!! i understood it very well. Categories Arduino Tutorials, Electrical Engineering Lcd.begin(16,2) // Initializes the interface to the LCD screen, and specifies the dimensions (width and height) of the display }įeel free to ask any question in the comments section below. LiquidCrystal lcd(1, 2, 4, 5, 6, 7) // Creates an LC object. #include // includes the LiquidCrystal Library
#Jivelite rotary encoder code#
Here’s the source code of this example: /* Stepper Motor using a Rotary Encoder
#Jivelite rotary encoder full#
The particular module that I have makes 30 counts each full cycle.
#Jivelite rotary encoder serial#
If upload the code, start the Serial Monitor and start rotating the encoder we will start getting the values in the serial monitor.
#Jivelite rotary encoder update#
At the end, after printing the results on the serial monitor, we need to update the aLastState variable with aState variable. If the output B state differ from the output A state the counter will be increased by one, else it will be decreased. Right after that using the second “if” statement we determine the rotation direction. So if we rotate the encoder and a pulse is generated, these two values will differ and the first “if” statement will become true. Then in the loop section we read the output A again but now we put the value into the aState variable. In the setup section we need to define the two pins as inputs, start the serial communication for printing the results on the serial monitor, as well as read the initial value of the output A and put the value into the variable aLastState. If the outputB state is different to the outputA state, that means the encoder is rotating clockwiseĪLastState = aState // Updates the previous state of the outputA with the current stateĭescription of the code: So first we need to define the pins to which our encoder is connected and define some variables needed for the program. If the previous and the current state of the outputA are different, that means a Pulse has occured Reads the initial state of the outputAĪState = digitalRead(outputA) // Reads the "current" state of the outputA Here’s the Arduino code: /* Arduino Rotary Encoder Tutorial As an Amazon Associate I earn from qualifying purchases.