Community
OpenEnergyMonitor

Community

One AC transformer to rule them all (for multiple emonTx Shield)

Why can’t I use the same AC transformer for multiple arduino + shield?

As soon as I plug in the second shield, the first one’s readings go wild

Both arduinos are powered by 12V DC using the jack

I have a dual 9V AC-AC transformer (9V-0-9V)
Even when I power the second shield from the other AC secondary output, it still messes up the power readings of the first one…

I’m totally confused there. Are you talking about an emonPi, or an Arduino with an emonTx Shield? The two are totally different and have totally different power supply requirements.

Look at the Shop pages to correctly identify what you have, then someone might be able to help you.

ok, I edited the post, check if it makes sense now

That now makes sense.

You aren’t powering the emonTx Shield from the a.c. transformer - that voltage is only being used to measure a representation of the mains voltage. The power actually supplied by the a.c. transformer is about 1 mW - almost nothing. All the power to operate both the Shield and the Arduino comes from the 12 V d.c.

There’s no reason why what you’re trying to do won’t work, but you must get the connections right.

  1. Both Arduinos must have their common GND (the negative side of the 12 V) terminals connected together.
  2. You should only need to use one half of the 9 - 0 - 9 V transformer, and the a.c. plugs must be connected in parallel, barrel to barrel and centre pin to centre pin.
  3. If you need to use a separate half for each Arduino (because of phase considerations), then you must connect the two barrels to the 0 V centre tap and the two centre pins to the 9 V ends.

The load on the 9 V transformer is very low, approximately 100 µA, so if the connections are correct, there should be no discernible effect when both are connected, once the software filter in emonLib has correctly stabilised. If you connect the second whilst the first is running, then I would expect a disturbance that will die away after about a minute.

If this does not solve your problem, then you must say exactly how the results you see differ from what you expect.

If the hardware is indeed not an emonPi, then the thread title should be edited to avoid confusion.

It appears that’s the case - or, I’ve answered assuming that what we now have is the accurate description of the equipment that the OP has.

I’ve changed the title.

He mentions two Arduinos as well as two shields.
Sure sounds like he’s not speaking of an emonPi.

Now, yes. Originally, I thought that’s what was meant, but I wondered whether he had two sets of emonPi + Arduino + EmonTx Shield:

multiple emonpi (arduino + shield)

which might have been an unlikely combination but it wouldn’t have been impossible.

Had it been that, there could well have been a problem because the barrel of the a.c. input connector on the emonPi is GND, whereas on the emonTx Shield it sits at 2.5 V d.c. above Arduino GND.

I suspect the original problem was that barrel and centre pin were crossed between the two, so the 2.5 V midpoint was getting pulled about.

Yep. One never knows. :wink:

I did not think that it would matter how would I connect the AC wires. I will check, though :slight_smile:

It always matters how you connect the a.c. wires. If you reverse them, it is just the same as reversing all your c.t’s on their cables - what you saw as power coming in (positive real power) will change to power going out (negative).

If you look at the circuit diagram for the emonTx Shield, you will perhaps understand what is happening when you connect the two together - both when the connection is as I instructed, and when you cross over the connections to one of them.

I did notice before that reversing the mains connector also reverses the current direction in emoncms

Today I checked and indeed the barrel and middle were reversed on one of the 2 connectors.

I still don’t understand why this causes issues for the OTHER arduino+shield. It caused the power to be wrong: instead of ~1500W it measured ~3500W

If anyone cares to explain why, it will remain here for eternity (or at least for a while :wink: )

Anyway, my problem is fixed, thanks!