AC plug pack sharing between multiple boards

Hi,

Is it OK to use one AC adapter to provide the voltage reverence for a enmonPi and a couple of emonTX’s? Or do they each need a separate plug pack??

I’ll be powering all the boards off separate 5V supply via the USB port.

As an aside, I just noticed there is a 10V difference between two AC adapters that I have on an emonPi and an emonTX, both plugged into the same power board. Is there a way/need to calibrate the voltage levels?

Cheers,

Michael.

Here is a screenshot of the graphs showing the 10-11V difference. The blue and yellow AC plug packs are plugged into the same power board.

I think I figured out the flat line 230V there. The Pi must have been booted / rebooted without the AC in. After a reboot with the AC plugged in, the ‘real’ data appeared.

Yes, provided that you are not using the a.c. adapter to power the emonTx, then any number of emonTx’s and emonPis can share.

The default value of 230 V is indeed used if the alternating voltage is not detected at startup or on a reset.

Calibration instructions for the emonTx are in Learn. Alternatively, you can change the multiplier in emonHub. But if you do that, you must calibrate the powers too.

Looking at a TX schematic, it looks to me as if one side of the AC reference is tied to ground through a capacitor. Would it be important to be sure that the polarity of the common AC reference be the same in the event that the ground side of these two are somehow connected? I realize that the stated intention is to use different power supplies, but should that be a requirement for using the same AC reference?

Hi Bob,

The intention is to check if there was any reason NOT to use the same AC plug pack for multiple emon units. That would at least make sure they all had the same reference.

I’ll look into the calibration, as if it’s out, then all the power readings may well be out by the same amount?

Another data point.

I just swapped the AC plugs on the yellow and blue lines on the graph; my emonPi and a co-located emonTx.

If the issue was different voltages from the plug packs, I would have expected the traces on the graph to "swap’ at the time I changes them over. No! They continued on like nothing changes. So… I think it is a calibration issue.

Noting that the odd one of the three is connected to an emonPi. The two that track closely are emonTx’s.

I’ll measure the AC voltage output of both plug packs, but I expect them to be very close now. I’ll also need to check the emonPi calibration using the documented procedure.

OK, so it looks like I need to tweak the voltage calibration on the emonPi. Not that keen to mess about with serial ports to flash the shield firmware (which I gather is one way to do it).

There is a calibration in emonhub that can be adjusted via the web interface. What I’ve read indicates this is a fine place to do the vrms adjustment, but the power readings won’t be changed. Is that because the current calibration is in the shield, and hence overall power measurements are done before the vrms calibration is applied?

My comment didn’t concern calibration. It was about the potential for short circuiting the AC voltage reference if polarity were reversed in wiring up the splitters. I defer to the official answer that you got.

Thanks Bob. Good point. I’m going to test the AC packs tomorrow to verify the polarity.
Ultimately I’ll use 1x 5V supply and 1x AC pack for an emonPi and 2x emonTx all co-located. For now though I was just using independent 5V and AC packs for each board.

Mike,

I haven’t been following this line of questions, I had only received your direct response to my comment. For what it’s worth, mathematically, I believe you can apply the same correction to both the voltage and power inputs in eMonCMS. Its a shame that you would need to recompile and flash the firmware to change the voltage calibration in the TX. It’s just a number.

https://github.com/boblemaire/IoTaWatt/wiki/Reference-Voltage-Calibration

Great work Bob!

Follow up question related to this…
I now have 2 x TX and 1 x emonPi connected to the SAME AC plug pack, and each is separately powered from a 5V USB source.
The jumper on the TX’s to select power from USB (not AC) is removed.
After a reboot (power cycle) the other day, I noticed that the power readings from one of the TX’s (not all) was inverted (negative). I’m guessing this is either because it’s actually lost it’s AC reference entirely (the power cycle was when I moved stuff) OR, there is a power sequencing requirement between the AC and the USB power?
Does one need to be on and stable before the other for the Tx (and emonPi) to correctly utilise the AC reference?
I guess you don’t want the Tx to power up from AC, then add USB 5V (hence the jumper) but does the emonPi have a similar issue?

The sketch in the emonTx & emonPi is essentially the same. If the a.c. sample is present when the sketch looks, which is 500 ms after start-up for the emonPi, and after the rf test sequence (approx 1 s after the sketch starts) and as part of the initial 10 s power-on-self-test for the emonTx, then it uses the a.c. input and calculates real power. Otherwise it estimates apparent power from the current and the nominal system voltage. That doesn’t explain negative power readings (because you can’t have a negative power if you don’t have a voltage reference to determine the direction of power flow) - unless you’re doing maths and subtracting one power from another.

Usually, powering both the a.c. adapter and d.c. USB supply at the same time is OK. Powering the a.c. adapter late is not a good idea. I’ve never heard of a problem attributable to powering the a.c. adapter first, but this will stress the protection diodes in the ADC input, so it’s probably not advisable.

Going back to @overeasy’s point about commoning the a.c references - yes, you must observe the correct polarity all the way. The plug outer is GND reference on the Pi and on the emonTx V2.5 upwards. It’s only the emonTx V2 where the a.c. input floats at 2.5 V d.c.

Yes, I have taken care to make sure the polarity of my 3 AC reference plugs (fed from 1 plug pack) are all the same.
The other strange thing I noticed was the mains voltage for one of the Tx units and the Pi was showing around 5v (not 240v). After resetting the Tx (reset button) and power cycling the Pi (after shutdown -n) it all came good again.

So I’m not really sure what caused this strangeness or hence how to avoid in future.

So best practice then is to power on the AC and 5V at the same time.

The reset buttons on the Tx seem to brighten them up some times when they are acting strange, but I guess that runs the risk of data corruption on the Pi if that is randomly reset, or is the file system read-only for that reason (prevent OS corruption)?

So you had the full voltage (or enough for it to go into “a.c. input present” mode) when both started up, but then it fell back to 5 V? That sounds to me more like you have a dodgy connection than a software fault, and you disturbed it when you did the reset.

The Pi OS is that way to reduce the probability of corruption. But clearly, you can’t do an orderly shutdown if you have a mains failure (unless it’s battery-backed).

The plug pack (AC) was plugged in, and the Tx and Pi were running from 5V USB in (and the other Tx was fine and showing a measured 240V). Just the measured AC mains as far as emoncms was concerned was around 5V (instead of 240V) on both the Pi and one Tx (but not the other). Maybe it was a dodgy connection, as once I restarted everyting, it was all back to normal (the mains voltage readings and the polarity).

I’ve just noticed sometimes the Pi just stops getting readings, or gives strange readings. Trying to work out if it’s startup power sequencing, or dodgy connections, or RF interference or something I can actually fix!

The two emonTx’s could be blocking each other (transmitting at exactly the same instant), but crystal tolerances normally ensure that it happens only occasionally as the instant at each transmits drifts relative to the other. This doesn’t explain the 5 V though.

The emonhub log will tell you the signal strength of the incoming signal from the emonTx’s, and it’ll show interference as (usually) a low signal strength (-90 or less) and discard it as unreliable.
(See Feeds stopped working after firmware and emoncms upgrade - #6 by philip for an example.)

Strange readings? If the voltage is wrong, so the powers will be wrong.