Main Content

10 Magnets and 2 Hall effect sensors form a angle encoder which is used to measure angles that are displayed on a OLED screen.

Recently on Instructables, lingib demonstrated a angle encoder using 10 magnets and 2 hall effect sensors. This project takes this concept and turns it into a usable tool for your workshop.

One of the issues with trying to use the original design is that the arms were not on the same plane. One arm was 9mm higher than the other making it difficult to use. In this updated design, each arm is the same height. All other dimensions are the same as the original design. The extra height gave enough room to fit a microprocessor, OLED display and battery in one of the arms.

To make the final unit fully self-contained, the software has been rewritten to allow you to do the calibration without needing a serial terminal. Calibration settings are stored in EEPROM so there is no need to modify the code after calibration.

The final unit has a single button. Pressing the button will wake up the microprocessor. The splash screen is displayed for 5 seconds. The display shows the current angle and will automatically enter sleep mode if no movement is detected for 15 seconds. It will also enter sleep mode if you press the button.

Holding the button down for more than 3 seconds before releasing it while “Shaft angle” is displayed will enter calibration mode. Rotate the arm back and forth until the number shown is stable. Close the arms and press the button again to record the settings. You should only need to do this once or when the battery has been removed.”

Link to article