Hello
I found an ADC datasheet, and i was wondering how does it measure the current on a 220V power line, while being powered by a 3.3V.
Does it have something to do with differential measuring? If so, if the shunt is 0.002ohms, and you are passing 10A through it, what voltages does the ADC read on CH+ and CH-?
The ferrite beads, resistors and capacitors are used to smooth the signal, to lower the noise on those lines.
Also, there is a voltage divider with 3 100K resistors. I assume that's used to measure the Voltage. But how does it do that?
Thanks in advance!
Differential is helping with the accuracy but isn't the trick.
Trick is that although the ADC is powered with 3v3, that 3v3 is referenced to mains! As you can see, GNDA, GNDB and GNDL are actually the same. But drawn like three different nets (with a net tie) because you want to keep the it separate on the PCB and only tie it together in a single point.
ch- will read nearly 0 but can be a small voltage. That's because compared to a 2mΩ the PCB traces have a similair order of magnitude resistance. The differential measurement cancels that.
CH- being connected to GNDL, it's clear that it will measure arround 0V... but what about CH+?
Simple Ohm:
2mΩ x 10A = 20mVRMS above ch-
But again, on paper the path GNDL has no resistance (aka, is at the same potential everywhere) in reality it's not! The resistance of the PCB tracks can be of the same order. Aka, ch- may already measure 15mV (with respect to the ADC GND) because of the current to the path!
So if you would just look at ch+ that would be 15mV + 20mV = 35mV So from that measurement alone you would think there is 35mV / 2mΩ = 17,5A flowing. But because you measure it differential you get:
(ch+ - ch-) / R = (35mV - 15mV) / 2mΩ = 10A.
The resistance in the path to the ADC doesn't matter because you separated that (hence the net ties) so no (or neglectable) current flowing => no voltage drop.
This is for a low side measurement... What happens if you go for a high side measurement? In this case, you won't read 0mv (+error) on CH-... and you won't read 20mv (+error) on CH+...
The schematic for a high side measurement is this:
ACL - shunt ---- LOAD --- GNDL
| |
CH+ CH-
But you can't because that would blow the ADC 
Or you need to reference the ADC on the HIGH side as well.
But it's AC, high or low is all just a matter of reference 
Kirchhoff's Current Law
the current is the same anywhere in the circut.
your shunt will see the same current
The Voltage you connect to is relavant to how to connect.
if your device is connected, strictly and only to the two sides of the shunt, then the currrent, ergo voltage drop will be the same regardless where you put it.
but, if you connect to the high side and then measure the potential to your ground, you have the high side voltage.
one guiding rule is that if you are not trained in mains voltages, you should not be playing with mains voltages.
your level of electronics understanding is not up to this task.
you are safer to buy a mains voltage device and not try to copy the works of others when you do not understand what is happening.
3 resistors in a row is not a voltge divider.
3 resistors in a row, connected to mains voltage and a capacitor. what happens ?
What is that specific ADC designed for and what is the internal structure of that ADC ?
What effect of the circuit does the ADC have when using it as a differential input ?
They are connecting one input of that ADC to mains voltages, yes there are resistors.
WHY are there 3 resistors and not 1 ? what type of resistors are used and why ?
every single part of a circuit, including wire sizes and chemical composition, proximity to other devices, shape of the PCB traces, the materials of the PCB substrate are all picked by highly trained EE's with knowledge of what they are doing.
this is a fin hobby and you can do all sorts of things with it. but we warn people away from mains voltages because those who have worked with it have been bit, destroyed channels of O-scopes, been glad they were wearing safety glasses when the cap blew up.. things we do not do with the low voltages we see with Arduino's
if you look at the worst possible outcome of your activities. You might kill some plants if your garden project fails, but right now, someone is losing a LOT of sleep over the MCAS control system right now.
sorry to be so bleak, but the cost of an engineered product is much less than if have failures of your home brew.
be safe, buy the interface, then your work will move much faster as will your results.
dave-in-nj:
one guiding rule is that if you are not trained in mains voltages, you should not be playing with mains voltages.
Agreed, but I for one never had the idea OP is planning to actually build this thing.
It's definitely intriguing how it's done, and the explanation of @Septillion makes for an interesting read.
dave-in-nj:
when the cap blew up.. things we do not do with the low voltages we see with Arduino's
This actually happened to me, once. I was not wearing safety glasses, and it was in the 12V part of the system (a power supply for my dad's model railway), so that'd be voltages we DO see in typical Arduino projects - we weren't using Arduinos because the things didn't exist yet. Anyway, the cap was simply wired the wrong way around... luckily it shot away from me, the metal can bouncing off the floor and the wall on the other side of the room, and leaving me sitting in a thick cloud of dust.