I know just enough about electronics to do the occasional Arduino or Raspberry Pi project, as long as I don't have to understand too much of what's going on. I am a software guy who dabbles in hardware a tiny bit. So, I'm not even sure I can form a good question, which is why I haven't been able to Google an answer to this question.
I have made a small wearable device (about 30mm x 30mm x 10mm) that has one simple job. There is a magnet clipped onto the device. When the magnet is removed, it tells my phone (via BLE). Think of a sort of personal alarm device.
My first prototype uses a NC reed switch and works perfectly ... except that the reed switch is quite susceptible to false activation when jostled around too much. The device should only activate when the magnet is removed. As an improvement, I figured the solution was probably to use a hall effect IC. I've also read a little bit about MEMS. Cost is not an issue, within reason (i.e. sub-$20), but size and durability are absolutely important.
- First, is a hall effect IC an appropriate solution, or is there something else that would work better?
- My assumption is that I must use a NC switch that is open when the magnet is nearby. This makes a digital IO pin go HIGH only when the magnet is removed. My reasoning is that if the switch is NO, then it will be closed when the magnet is nearby, making the IO pin HIGH most of the time. I believed that this would be an unnecessary drain on the battery. But, I recently read something to suggest that digital IO doesn't work like this. So, my question is ... does it use more power to maintain HIGH state than LOW?
- Am I thinking about this all wrong? Is there a simple way to accomplish the same thing in a very tiny package? I am using a 3V logic Arduino derivative with plenty of pins. The device currently uses just about 50uA, on average, and I'd like to keep it that way.