Computing stuff tied to the physical world

Wait… make that 470 µF

In Hardware, Software on Nov 16, 2011 at 00:01

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:

DSC 2752

It’s running on 1000 x less charge than the 0.47 F supercap I started out with! Here’s the actual sketch:

Screen Shot 2011 11 03 at 01 09 37

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…

DSC 2753

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!

  1. Could it be that these bumps-up happen at times when the circuit draws less than the 10mA supply current and hence the capacitor gets recharged a little bit?

    • The AC-coupling also makes the voltage ‘try to return’ to zero. Then you can see the same small increase in voltage also on the blue line. Could also be due to voltage drop somewhere in the setup and/or badly compensated probes.

      JC, if you use a voltage regulator on the JeeNode, why not increase the voltage on the cap further like discussed before? That would give a lot more margin for voltage drop and thus more runtime.

  2. Charging at 1mA might fail due to the soft ‘knee’ of low-voltage zeners. All the current then flows through the zener instead ending up in the capacitor. Have you checked it’s really the JeeNode that’s using the current?

    • Whee, that would explain it – more checking needed, thanks! I’ll see if I can get a better zener if that’s the case.

    • Yes – I think that’s the problem:

      • 2.7 V @ 0.25 mA
      • 2.9 V @ 0.5 mA
      • 3.2 V @ 1 mA
      • 3.8 V @ 5 mA
      • 4.0 V @ 10 mA

      Looks like we need a better zener!

    • Here are the results with 5x 1N4004 in series (forward drop):

      • 2.6 V @ 0.25 mA
      • 2.75 V @ 0.5 mA
      • 2.9 V @ 1 mA
      • 3.1 V @ 2 mA
      • 3.3 V @ 5 mA
      • 3.45 V @ 10 mA

      Maybe 6 or 7 of these (plus one in reverse, across them all to get the reverse voltage down) will work better than a zener! I’m having a hard time finding zeners with better specs than the 1N5229.

    • What about using a TLV431 shunt regulator as a zener replacement. Should have much sharper characteristic

  3. Jörg: Ah, yes, compensation – I need to check that.

    Yes, increasing voltage would be a good idea – but I’m doing this for the JNµ without regulator, just using a regulator-based JN for now because it’s easier to code/debug.

  4. Zeners have their output impedance inversely proportional to shunt current, so some buffering is needed if you want a sharp ‘knee’ at 1mA. LM129xx ? (volts a tad high and a forward diode needed across it).

    Alternatively, Just fix it in the software by adjusting the threshold and hysteresis in the “self-regulating Atmega” suggestion to keep the zener almost out of conduction

Comments are closed.