Computing stuff tied to the physical world

Sending packets without battery

In AVR, Hardware, Software on Sep 2, 2010 at 00:01

Here’s a fun experiment…

After yesterday’s improved power-down current results, I wanted to find out how much power it really takes to send out a bunch of small packets. No acks, just periodically sending out a packet and sleeping.

Trouble is, I didn’t want to wait for a battery to run down, since that would take months or even years. Bit long to get results for this weblog, eh?

So instead, I used this little chap:

Dsc 1873

It’s a super-capacitor which can handle up to 5.5V and has a capacity of 0.47 Farad! That’s like putting a thousand 470 µF caps in parallel. Amazing stuff, in an even more amazingly small package.

Here’s a JeeNode, fitted with this new power source, to give you an idea of just how small this thing is:

Dsc 1874

The next step was to design a small sketch to test this. Here’s what I came up with:

Screen Shot 2010 08 29 at 11.57.38

Some of the code left out for brevity. Full source code can be found here.

What this demo does is send out a packet with a 2-byte payload, then sleep for approximately 1 second, then send again, etc. Until power runs out.

Sure enough, packets started coming in every second:

    OK 4 0 0
    OK 4 1 0
    OK 4 2 0
    OK 4 3 0

I expected it to send out say 100 packets or so, before the charge in the 0.47 F supercap would run out.

Guess how far it went…

    OK 4 178 28
    OK 4 179 28
    OK 4 180 28
    OK 4 181 28

That’s packet number … clickety, clickety … 28 * 256 + 181 = 7349 !!!

In other words, the JeeNode was able to send out well over 7000 packets, i.e. two hours of packets sent once a second.

This is fantastic. I think the secret – apart from the 3 µA powerdown mode – is that the RFM12B + RF12 driver require very little time to start up, send off a packet, and go back to sleep again. There is no ACK involved, the RFM12B is hardly ever in reception mode.

With real-world use, I expect power requirements to be considerably higher. First of all, a Room Board will draw around 50 µA, due to the on-board PIR sensor. And second, I’m going to want to use ACKs for at least the motion detector reports, so that the system has a robust mechanism for reporting motion whenever it is detected. This means putting the RFM12B in receive mode for a few milliseconds, waiting for the ACK. And repeating this process a few times if that ACK isn’t immediately received.

But still … over 7000 packets without a battery!

Update – with one packet per 5 seconds, the charge lasted 4523 packets, i.e. just over 6:15.

Update #2 – with one packet per 60 seconds, 771 packets got sent out, that’s 12:51 hours … looks like the self-discharge of the supercap is eating up the remaining energy.

  1. Quick, JC, hide this post from Stef!

    • Heh :) – nah, it’s not practical, just an interesting baseline. Unless I can find a way to harvest a bit of energy on a 24h basis… tomorrow’s post will explore one direction. Stay tuned.

  2. Interesting! I was looking into supercaps the other day.. I want to create a JeeNode thermostat/HVAC controller. From what I understand, modern thermostats use supercaps to keep the little LCD display lit (drawing a little power from the HVAC circuit, when the HVAC is heating) As I have no way to create a stable power source around my thermostat this looks like a good option. Question is though.. will it be sufficient to “call home” and get the latest needed orders from another node (setpoint etc.) Any thoughts?

    • Should work. There is always some power on the thermostat lines – at least there is with the (closed!) OpenTherm protocol. Keep in mind that the JN regulator only takes up to 13V – I think the thermostat line goes to 24. If you regulate it down to 5V, you could use a supercap.

      If one supercap charge can last 7000+ packets, and if a supercap can keep a JN alive (although barely, and powered down 99.99% of the time) for over 12 hours, then I’m pretty sure that you have plenty of energy at all times to call home periodically.

      If a thermostat can do this, then why not a JN. But you do have to get the software right for such low-power scenarios.

  3. AFAIK (correct me if I’m wrong) I have one of those traditional (mercury) thermostats. Isn’t that just connecting two wires together (close the circuit) to start heating?

    • Ooh… ancient! Yes, that’s what they do.

      You might be able to steal some energy anyway: connect the thermostat in series with a 3.9V zener diode, and put a 100 kΩ resistor across the thermostat. That way there is always 3.9V to use, and it’s never fully open.

      Untested. But it should give you over 200 µA at all times to keep a supercap charged…

      Then use a MOSFET to take over from the thermostat and you’ll be in control. Careful: if your code ever gets stuck, it’ll get either (much) hotter or (much) colder than you want!

  4. @tankslappa,

    too late! I saw it:-)

    Damn I was just playing around with my brand new supercap I received today. I was being amazed on how long it could keep a LED burning. It’s still not finished… Amazing stuff.

    Then I was thinking how long a jeenode could send packets with this supercap, and along comes JC with a new posting about it:-))) Even more amazing:-)

    I got myself a supercap from the same make but with the classic underneath pins. Mine is 1 complete Farad though;-) Should last 2 times as long then.

    I also ordered a small solar cell to test with: 4V @35mA. The idea is that the solar cell will feed excess power to the supercap during the day and that the jeenode can survive during the night on the supercap (and probably even send some packets to).

  5. @JCW & Stef

    Topping up every 24hrs… Hmmmm… Me thinks someone has been reading our little convo that occurred when he was on holiday ;-)

  6. Wow, nice… could also use a smaller cap, and have the jeenode send a message if power fails…

  7. Be aware that the super caps need several hours to fully charge themselves and > 100 hours to reach low leakage current. They do not act as true capacitors. You may want to check Panasonic technical guide [1], especially the 2nd chapter.

    PS. Also check the LTC3108 energy harvesting chip.

  8. Aha, thanks – great info! In my case, I’d simply like the JN to get through the night. So I’ll leave it connected for a day or so to see if that reduces the self-discharge enough.

Comments are closed.