What is a good position sensor for small rotary shaft? (infinite rotations)

I am building a walking robot, and I want to know what angle the axle is at. It is built out of legos. I searched for rotary encoders, and most of what I can find are for large applications, long lead times, or only can rotate through 1-2 revolutions. It doesn't have to be super accurate, maybe +- 5 degrees. Can someone point me to a good encoder for this application? I know this is pretty basic but I am a newby at Arduino and programming.

That is quite accurate you know?

Have you considered the magnetic rotary encoders?
https://www.mouser.co.uk/c/electromechanical/encoders/?product=Magnetic%20Encoders&technology=Rotary

They come in the ready made type, and just a chip where you arrange a magnet to rotate above it. These are the cheapest type because you do most of the construction yourself.

These are absolute encoders not the incremental type normally used.

PS it is LEGO you make things out of not legos. The LEGO company are very keen on this topic.

It's a slippery slope.

This is a link to the official LEGO statement on this subject:-

As to the actual problem. I used four AS5040 chips to monitor the angles of four pendulums to make a Harmonograph.

This is a picture is showing the magnet over one of the sensors.

This was then connected to an Arduino to read the angles. These angles were then sent to a Raspberry Pi to draw the positions of the resulting angles.

This was done for a book I wrote with Andrew Robinson called "Raspberry Pi Projects" back in 2014.

Here is a video of it in action.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.