1
\$\begingroup\$

I have a nodemcu that needs to turn on periodically (every 2 hours) to take measurements, send them to me and then go back to sleep. I need this to be able to last for at least a year on batteries, and so I chose the TPL5110 for this use (and it works perfectly). I have a sim module that uses a lot of power and this is also hooked up to the tpl. Now I need to update the setup so that it can continually read from an accelerometer and wake up to take readings if the value reaches a certain threshold. Now I know that the tpl cannot do this, it's simply a timer, but I'm hoping someone knows of a way of doing it.

I've heard about the ATtiny, but I don't think it will work because

  1. my sketch is too intensive for it and
  2. I still need to be able to kill the sim module also.

Would it be possible to use the ATtiny as a kill switch, much in the same way a tpl works?

Thanks

\$\endgroup\$
  • 2
    \$\begingroup\$ Seems to me as though you need an accelerometer with a built-in threshold detector and interrupt output. \$\endgroup\$ – brhans Sep 25 at 15:51
  • 1
    \$\begingroup\$ you can use 1uA analog comparators; also use a piezo-sensor as the accelerometer (add a weight atop it); \$\endgroup\$ – analogsystemsrf Sep 25 at 15:57
  • \$\begingroup\$ You haven't included a part number for the accelerometer. So we can't tell if it's an analog output or a serials comms. What do you mean "take readings"? \$\endgroup\$ – scorpdaddy Sep 25 at 17:34
  • \$\begingroup\$ Thanks everyone re take readings: I need my device to remain in a powered off state unless it's subject to a vibration, in which case it all turns on and alerts me. I don't think the deep sleep mode on the nodemcu is any good, it still takes at least 20mA which for me is far too much. The tpl module takes about 50nA when everything is sleeping which for me is acceptable. I wasn't even sure if what I'm asking is possible with an accelerometer yet which is why I haven't included a part number @analogsystemsrf how would I go about doing that? Thanks all \$\endgroup\$ – matt3526 Sep 25 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.