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.
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.
Both Arduinos must have their common GND (the negative side of the 12 V) terminals connected together.
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.
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.
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.
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.