Yesterday’s post used a 6,800 µF capacitor as charge reservoir for stored energy. But wait, we can do better…
Now that I understand how discharge works out with the JeeNode in transmit mode, it all becomes a lot easier to handle. With a relatively small 470 µF 6.3V cap (still charged at 10 mA for now), I see this behavior:
It’s running on 1000 x less charge than the 0.47 F supercap I started out with! Here’s the actual sketch:
First of all, the payload sent is now 8 bytes. Probably a reasonable amount for many uses (such as AC current sensing). Also, I’m now sending a single “a” character at the same time as the rest starting up, so there’s no need to wait for it – sending will overlap everything else that’s going on. Debugging comes for free, in this case.
What the scope shows, I think, is that the RFM12B needs about 1.6 ms to start a transmission, and that the transmission takes about 3.4 ms. The rf12_canSend() call probably returns true right away, since the RFM12B has just been woken up (this also means there’s probably no “listen before send” carrier detect in this test!).
Let’s zoom in a bit further…
Ah yes, that actually makes a lot of sense (the channel 1 scale is actually 10 mV/div, not 100, and AC coupled):
- ≈ 1 ms before “time is up”, the loseSomeTime() code switches to idle mode and draws a bit more
- the start bit of the “a” is sent out the moment the loseSomeTime() code returns
- brief high power consumption as the transmision is also set up and started
- for roughly 2 ms, the RFM12B is initializing, not drawing much current
- meanwhile, the ATmega is in rf12_sendWait(), in a relatively low-power mode
- once transmission actually starts, a lot more current flows and the cap discharges
- note the little bumps “up” – there’s probably a bit of inductance in the circuit!
All in all, the voltage drop is about 0.2 V, which is ok – especially in this setup, i.e. a JeeNode plus regulator.
Now, all that’s left to do is get the charging current as low as possible. I tried a 22 kΩ resistor, i.e. a 1 mA charge current, but that’s too weak right now: the voltage drops off and the node stops functioning. Looks like the JeeNode (yes, JN, not JNµ yet) is not quite in the ultra low-power mode I thought it was.
Oh, well. More work needed, but progress nevertheless!