circuit_projects

Circuit Projects

Blogger

EEWeb Stats

Circuit's Blog :

Return to Blog

Rotary Encoder for LED Calculator

Figure:1

Figure 1 

The project is originally designed as LED calculator but the addition of a rotary encoder to set the target system voltage results to adjusting the LED brightness using the potentiometer.

By turning the rotary encoder, the voltage is set that will be used in the ultimate LED circuit while reading the LED voltage, current, and current limiting resistor values off the screen. The character matrix of the LCD contains some resistance. The digital pins 2 & 3 uses hardware external interrupts. Both pins can be supported if they are wired to interrupts for the highest resolution.

During the operation, the quadrature encoders translate the rotation of a shaft into two out-of-phase digital signals where both the direction and speed of rotation can be derived. The TIMER2 overflow interrupt service routine is used by the quadrature library to poll multiple encoders rapidly and track the results where several encoders are supported.

The processing transition is the heart of decoding quadrature. The transitions could be a rising or falling edge of pin 1 while pin 2 is high or low for determining the transition of pin 1. The calculator, including an LCD, fits the enclosure.

Rest of the story

Tags: rotary encoder, LED, calculator,

Comments on this post:

By jose barea 0Score: 

2 years ago:  the data cables are kinda fun to looked at because they are colorful :)

Login or Register to post comments.
 
Click Here