Hello everyone,
Few years ago, I found out that the internal Hall sensor in esp32 can in fact be used as a limit switch, or coarse rotary position encoder. And the best about that is that it can be read by ULP coprocessor in deep sleep to wake the device up.
You just have to position the esp32 near a magnet on a moving piece that will be used as a switch. Most of the time, it's possible place it on an appliance lid, or any kind of cover the user have to lift/remove to start operating the device. You don't even need a real magnet for it, the material used in fridge magnets or the magnetic rubber used in fridge door gaskets works too, the later can even be overmolded.
In one of "smart furniture" project we had, we managed to place it in a drawer to trigger a security lock in it. Or in a device very similar to Amazon Dash, we had it operated by a sliding cover. That is very useful when you have to have the MCU running, and you can't use simple hardwired limit switch turning off the power.
You can also use it as a very coarse position encoder if you put the magnet on a rotating piece right above the chip, and have the magnet axis perpendicular to the chip. Very useful as a substitute for multiple position rotary switches in devices where the switch changes its operating mode, when the device itself appears "off" to the user. That was handy in some appliance projects. The only downside is that it introduces calibration into the manufacturing process.
Sharing a nifty trick with ULP coprocessor
Re: Sharing a nifty trick with ULP coprocessor
I'd press the like-button if there were one thanks for sharing.
Re: Sharing a nifty trick with ULP coprocessor
Sounds interesting. How coarse is the rotary encoder, in bits?
Who is online
Users browsing this forum: Baidu [Spider] and 148 guests