Hey guys,
As by-product of a low-power project I'm working on I came up with an idea:
What if a Moteino could cut it's own power supply? You could get rid of the LDO, put the radio to sleep and enter powerDown mode with neither the brown out detector nor the watchdog timer. Your Moteino would then run on its 10uF cap on ~150nA for the 328p + 100nA for the radio in sleep.
As the Moteino draws down the power from the cap it will reach the power-on reset threshold of 1.3V and trigger a reset. If you could then power up it up again the process would start from the beginning.
Now how could you cut and restart power? Well check this out:
It's just a high side switch with an inverter in front.
When the 328p is in reset the GPIO pins are put into tri-state and the pull-down pulls down the gate of the first mosfet. This will power up the Moteino. Then you query your sensors and send your data to the gateway. And finally you switch on the GPIO port (a simple digitalWrite( port, HIGH) will do) and thereby cut your cord.
It's amazingly simple when compared to approaches like
https://hallard.me/category/ulpnode/. Plus as I tested today it actually works. And you can do it with parts you might have lying around. An added benefit is that your Moteino comes up clean every time - no possibility of getting stuck due to problematic sleep code.
When I use this circuit with a normal Moteino, LDO removed, running at 8Mhz, powered at 2.6V I get a rather convenient cycle time of about 70 seconds. Which is actually much better than I would expect: dU * C / t = I. I get a reset at 1.3V, so dU = 1.3V. The bulk cap on the Moteino is 10uF and I cycle in 70 seconds. So I = 185 nA, which is pretty amazing. Actually you have to add something like 40nA for R10 which is powered from VCC, so total 225 nA.
Clearly this doesn't work for everything. Anything that actively needs to react to time critical interrupts etc in real-time won't. Listen mode isn't included etc - so I doubt I will use it too much in practice. But I still thought it was cool enough to share.
The huge size of the pull-ups is obviously a worry. If you use conformal coating or potting it might work long term without humidity issues. Anybody up for a cord cutting circuit that's simpler than this?
http://ambiqmicro.com/am18xx-ultra-low-power-rtc could do it. But discretely?
Cheers, Joe