dazgupta.com > posts.xml 2> journal.xml

Hall effect sensor woes

Today I recieved some hall-effect sensors and some magnets, which I plan to use to detect the zero positions of the dials.

Already in the morning I already had prepared my firmware code to work on a fix numerical space mapped over the dial rotation range, e.g. 0 - 2047. This would allow me to easily find the hall effect maxima or minima. Also added a UART interface to enter the said numbers, to help with debugging.

When the hall effect sensors arrived I attached a magnet & a hall effect sensor on the dial unit, and tried to read the ADC into my firmware code. After some fiddling around and creation of an entirely new Rust project just to read the ADC values over UART; it became clear that the hall effect reading won't change as much as I was hoping for given the distance between the sensor and the magnet. Also, perhaps the plastic around has an effect on the readings. This makes the aglorithm to figure out the zero position little more complicated.

Maybe a break will help.

24-12-2024