Computing stuff tied to the physical world

Power measurement (ACS)

In Hardware on Sep 14, 2011 at 00:01

The first try I’ll make at measuring AC mains power is with an Allegro ACS714 Hall-effect sensor (this one). I measures ± 5 Amps. It’s a bit expensive for wide-scale use, and it does require hook-up (i.e. AC mains pass-through). Hopefully a non-contact solution will present itself, eventually. For now, it’s a good baseline test.

The circuit provides 2.5 kV isolation, but of course that means nothing when everything is so close that you could easily touch the wrong pin by accident.

Here’s my setup:


Everything is connected to my home-made isolation transformer. Which means grounding adds no safety and to remind me of the risk at all times, I’m using old 2-wire cabling and old ungrounded connectors. Not used anywhere else around here, so a mixup is not possible (those old power plugs won’t fit in today’s grounded sockets). If you look very closely, you can see that the splice is secured with two zip-lock ties. Cables are short so they don’t get tangled up, but long enough to avoid pulling on them.

As I was preparing the setup, I found out that the ACS714 needs 4.5 .. 5.5 V to operate, so the JeeNode + AA Power Board shown here won’t cut it. Oh well, I’ll switch to a 4x EneLoop battery pack (which is 5.2V).

Since I’m only interested in low-power for this test (under 100 W), the output voltage is within range of an ATmega running at 3.3V (the ACS714 output is 185 mV/A, centered around 2.5V).

The initial test worked flawlessly: the light went on! :)

Next, the software. It’s always the software which requires most work.

  1. Hi,jc did you read this, uses an AMR – sensor it’s very interesting and well documented average error 4,2 % 1000w compared with current transformers.

  2. Hi, i tried the above link, but there was no connection?

  3. thanks, i copied it and it works

  4. What is not so nice is, that the output is AC and you will have to measure TRMS values which will take just some processing power and prevents the Jeenode to go into sleep mode at all. Would be nicer to have a dc voltage as output which could be sampled only when needed.

    BR, Jörg.

    I will follow this thread as I am also very much interested in a neat solution :-)

    • Agreed, but it’s not necessary to do this constantly. And with some care, ADC sampling could be done with the ATmega in a low-power mode. Alternative would be to throw an op-amp at it, with a diode in the feedback loop as rectifier.

  5. Yes, sure, but with the extra op-amp you could also go to use a cheap current transformer instead of the Allegro IC. One ‘active’ component should be just enough to keep complexity (and cost) low. Ok, passive filtering would also be a way to go. Hmmm….

  6. Why not use a Diode to become DC voltage and a little C to get the peak of the alternating current. This peak should be proportional to the ac voltage.

    • A diode uses too much power under load: 0.7V x 10A = 7W. Or if you mean on the low-voltage side: the voltage is too low for a diode (millivolts).

  7. I planned to use a Talema current sensor for my own current measurements:

    It is a passive component, so the supply voltage is not an issue. In addition, the JeeNode is better isolated from the AC mains this way. Basically you just have to stick the mains conductor through the hole in the sensor. And if you need more sensitivity, just add some extra loops.

  8. You could do the conversion to DC with an OpAmp like this:

    The potentiometer and OpAmp “inside” the sensor is just there to have a GUI control for the sensor output amplitude (on the right side).

    The output DC voltage is not proportional to the sensor AC voltage, though.

    Anyway, maybe RMS conversion in software is easier to implement and cheaper in terms of hardware.

  9. Remark to the Diode. Perhaps i expressed bad (due to foreign language) I meant a peak detector, perhabps after a small transformer to galvanic isolation. There is flowing no current. The peak value of voltage is proportional to rms voltage (nearly sinus-form assumed).

Comments are closed.