Update: Automatic Roller Blind

The mechanical rotary encoder used for calculating the position of the roller blind went bad. It didn’t recognise every step and eventually it stopped counting and the motor kept on turning. Luckily someone pulled out the DC plug, otherwise there probably was some magic smoke…

New solution

And yes, the mechanical rotary was not the best choice.. A mechanical encoder has a relatively short lifetime because of the sliding contacts. So first I tried a AS5600 magnetic rotary encoder (12-bit) but that didn’t work, because I do not have the right magnets (they need to be diametrically magnetized instead of axially).

Because the precision doesn’t need to be every degree, I thought of making a ‘rotary encoder’ with some magnets and a Hall-effect sensor. This sensor is basically a switch that detects the magnitude of a magnetic field. So I made a new ‘gear’ which can hold a lot of magnets (and those need to be axially).

New gear with holes for some magnets

And then I replaced the old gears with the new one.

Mechanical encoder setup
New ‘gear’ with magnets and the Hall-effect sensor

The Hall-effect sensor used is the 3144. It has three pins. Supply, Ground and Output. The Ground is connected 0V. The Output pin goes to one of the earlier used pins for the mechanical rotary encoder. And to save power, the Supply is connected to the other pin used for the mechanical rotary encoder. Although is’t just 4.0mA, it’s a nice feature. And if you don’t have to add extra components.. Why not?

So the ESP now counts the pulses send from the Hall-effect sensor. Hopefully this solution will last a bit longer.

Leave a Reply

Your email address will not be published. Required fields are marked *