Rotary Angle (Encoder) Sensor Module
This rotary angle sensor is based on a potentiometer, rotary angle from 0 degree to 300 degree a linear change in value. The potentiometer module produces analog output between 0 and Vcc (5V DC with Arduino) on its D1 connector. The D2 connector is not used. The resistance value is 10k ohms. It is simple to use and arduino/micro-controller compatible.
How Does it work?
A potentiometer is a simple knob that provides a variable resistance. By turning the shaft of the potentiometer, we change the amount of resistance. This gives us a different analog input depending on the angle of rotation.
When the shaft is turned all the way in one direction, there are 0 volts going to the pin, and we read 0. When the shaft is turned all the way in the other direction, there are 5 volts going to the pin.
To measure the angle, the sensor the housing is mounted to a fixed base, while the rotating shaft couples to rotating element.