Current draw to get a voltage reading?

I am using an Arduino Uno to monitor electrical current on 4 electric cables using current transformers (CTs) connected through a resistor so that I am reading a sinusoidal voltage on 4 analog pins A0 - A3, using analogRead.

A sinusoidal voltage fluctuates from positive to negative. The pins report a positive voltage of 0 - 5 volts as a 10-bit value from 0 - 1023, but since the sinusoidal voltage goes both positive and negative, I can only capture the positive half of the sine wave.

See attached graph.

This is fine from a data collection point of view, I am getting good usable data, but this setup must be risky for the Arduino for 2 reasons -
A) I have no protection if any sort of voltage spike occurs.
B) When the sine wave goes to the negative side, it is putting a negative voltage on pins A0 - A3 relative to ground. This may be a no-no ?
Nothing bad has happened yet, but the voltages have been less than 1 volt, so maybe I have just been lucky so far.

I do not expect voltages could exceed 3.5 volts, maybe never more than 2 volts, but, still, probably not smart to be unprotected.

Question is, how to protect without distorting the data ?

Can anyone tell me how much current flows through any of the pins (A0 - A3, Gnd) while Arduino is getting a voltage reading ? I could simply put a resistor in series in each wire leading to a pin. For example, if I put a 5K resistor in each wire, then as long as a voltage never exceeds 5V, no more than 1 mA could ever flow through a pin - is that a safe maximum current ? At the same time, if the Arduino only needs 10 micro-amps to get the voltage reading, the distortion of the reading would be 0.05 volts.

But this is only to illustrate the question - I have no idea if the current flow in an analog pin to take a voltage reading is nano, micro, or milliamps. And is it variable depending on what the voltage is ?

image

Yes it is.

You need to bias your signal to a mid range point, that is half way between ground and the reframe you are using. This is normally done by having a 100K pull up and pull down on the analogue input, and connecting your signal to it via a series capacitor of about 1uF or higher.

It is technically known as sod all, the inputs are so high impedance that if you wanted to measure it you would be hard pressed to do so.

You do not connect a CT through a resistor, you have a "burden" resistor connected across the output of the CT and you read the voltage across that - in parallel. You may also add a Zener or similar in parallel to account for spikes.

Just put a diode in series with the current transformer. Negative potentials no more. If you are worried about a voltage spike, just put a 5V Zener on the analog inputs to grounds.

One side of the current transformer is normally connected to a virtual ground that is mid-way of the Arduino supply. That mid-point can be made with a two-resistor (2x10k) voltage divider.
Now the 10-bit A/D outputs 512 without current.
The code can capture/store any deviation from that, and convert it to a current reading.
There are many current transformer schematics and Arduino examples like that on the net.
Leo..

The OpenEnergyMonitor web site is an excellent resource for household AC voltage and current monitoring, with well thought out Arduino examples and code:

https://learn.openenergymonitor.org/electricity-monitoring/ct-sensors/interface-with-arduino

You do not seem to understand what a current transformer is! :astonished:

Thanks jr, that link (and series of further links) is an excellent source of info.

Paul_B, -
I know about the burden resistor, I was talking about another resistor between one connection on the burden resistor and the analog pin of the Uno. The Zener is also what is needed, thanks.

I looked for impedance info on the analog pins, but didn't find it in the Uno R3 datasheet.

No, you don't.
Zeners introduce non-linear errors, and maybe don't protect the way you think they do.
If you need protection, then use (Schottky) clamping diodes.

Infinite (>100Megohm), until you go more than 0.3volt beyond VCC or ground.
Leo..

Why I hedged with "or similar". :grin:

As long as you realise that. A protective resistor can be relatively high, but there is a problem with charging the sampling capacitance in the ADC of the Arduino. It gets a trifle difficult.

You arguably could put a diode in series with the current transformer as Steve suggests; it would have to go before the burden resistor in order not to cause a voltage drop and you would then have to provide a second diode to conduct in the opposite direction.

It is in the data sheet for the ATmega 328 processor chip, that is used in the Uno and Nano.

It says input leakage current I/O pin with 5V supply and pin high or low is 1uA.

It's simply a transformer. The output is an AC signal around 0V. The "burden resistor" is on the transformer secondary to provide a voltage that can easily be measured. But it's still AC.

You can rectify it to make all readings positive, or you can raise the zero point:
schematic

But it's still AC.

A diode rectifier has a threshold, so low currents can't be detected.
Much better to use a virtual ground, and sample the whole wave (or several waves).
Then you can extract, with code, whatever you want.

Not sure about the electrolytic cap.
It sort off ruins ratiometric behaviour (could introduce instability).
Leo..

Low voltages.

Indeed it is, and apart from the losses in the magnetic circuit, it transforms current so without the burden resistor, its output is unconstrained and the voltage could be extremely high, no directly longer proportional to the current.

I note your diagram incorporates the burden resistor into the transformer. Is that usual?

Indeed - in fact its dangerous to operate a current transformer without a suitable burden resistor as the output voltage could be extremely large. The CT may come with an internal burden resistor, but if not you have to provide one. One's with their own internal burden are intrinsically safer I reckon.

There's nothing magical about a current transformer, any transformer with a low impedance load becomes a current transformer, but ones designed for the task have a large turns ratio (primary one turn usually, secondary has 100's or 1000's). For instance a 1:1000 turn CT with 500 ohm load resistor will look like a 0.0005 ohm resistor to the circuit being measured, as the impedance is transformed by the square of the turns ratio. 10A into its primary will create 10mA in the secondary, giving 5V output (but only 5mV dropped across the primary)

It is in the one I am using: Amazon.com

Well in that case you cannot go putting diodes in series with it to measure as they will have a threshold voltage and nonlinearities.

Yeah, right, I was going a step further. Can't display low currents.

It is with a SCT-013-020 clip-on transformer.
They are listed as 20A/1V (2.88V peak/peak).
Leo..