Computing stuff tied to the physical world

The MPS really works

Now that packets are coming in, it’s time to explore how well this would work in real-world scenarios. We’ll use a small hair dryer, set to 500W and 1000W, and running on 230 VAC:

500W vw 1000W

You can see the short reset blip, then the radio turn-on blip, and then a couple of actual packet transmissions (as confirmed from another RFM69 set to 868 MHz, group 42).

This setup uses an SCT013-100A current transformer, which has internal back-to-back zener diodes to limit the output voltage, clipped over one of the power wires (no loops).

Several choices were made to represent real-world use a bit more faithfully:

  • transmit power was set to 15, i.e. halfway the support 0..31 range
  • encryption was enabled, this also forces packets to 16 bytes of data

The zoomed-in portion of both measurements shows rapid loss of power as the µC wakes up, turns the radio on, sends a packet, and goes back to sleep – all within 4.6 milliseconds.

500 Watt

  • Vradio drops from over 3.5V to almost 1.8V during transmission
  • Vradio is slightly lower than Vres due to the resistance of the Q3 MOSFET
  • it takes nearly a full second to recover a 3.5V Vres level
  • so we’re sailing _very close to the edge here!_

1000 Watt

  • Vres rises considerably faster, since there’s more current coming in
  • even that initial Vradio bump rises slightly higher
  • Vres receovers within a fraction of a second after each transmission
  • other differences are fairly minimal

One last concern…

As you can see, the MPS is performing its duty admirably under these conditions. Every second, it sends out a packet, and it starts doing so within 2 seconds of initial power-up.

But here’s what happens when there is not enough energy:

SCR03

Vres (and therefore also Vradio) both collapse to about 1.3V, at which point neither the µC nor the RFM69 can function properly. We’ve ended up in “limbo state”. The MPS will probably snap out of this once (a lot?) more energy comes in again, but at this point the µC is not in control and power consumption is not really at a nice point to start from again.

Luckily, we could have seen this one coming. From the successful startups shown earlier, we can see that a packet transmission of this type eats up about 1.7V of vRes. Our options:

  1. make sure we’re at Vres ≈ 3.5V before ever attempting to send a packet
  2. find a way to reduce the voltage drop caused by a single packet transmission
  3. fully power down the circuit before this happens, then start from scratch

As it turns out, each of these can be addressed – at least to some extent.

[Back to article index]