Arduino Forum

Using Arduino => General Electronics => Topic started by: syedamerali on Sep 12, 2019, 04:21 pm

Title: Measuring Low 220V AC Currents
Post by: syedamerali on Sep 12, 2019, 04:21 pm
This project is really an off shoot of a power monitor I was building. I was getting increasingly frustrated in measuring AC currents below 2A accurately with hall effect or current transformers. I finally settled on a current shunt of 1 ohm. The main problem of this being isolation. The circuit I finally settled on is based on this post:
https://forum.allaboutcircuits.com/threads/using-optocouplers-to-transfer-analog-signals.143871/
This particular circuit was producing phase shifts because of the coupling capacitors which was unacceptable for real power measurements. There was also clipping of a portion of the positive wave form with this circuit.
The modified circuit diagram with its simulation is given in the attachment simulation.png.
The scope traces for the actual circuit are given in the attachment scope.jpg. The blue trace is input and the
yellow output. There is some attenuation but it is linear. These traces were produced at a load of approximately 200 W.
A few words of caution:
1. You are dealing with 220V AC which can kill - careful!
2. In the choice of power supplies for powering these circuits - please do not use switching power supplies - all you will get is noise. After many iterations on the power supplies I built my own with transformers - a lot of filtering inductive using ferrite chokes and capacititve followed by a 7805.

After this point I use a modified version of emonlib the ads1015 (it is faster than a ads1105) and a nodemcu (I need to transfer the measurements over wifi).

Hope these notes help someone.
Title: Re: Measuring Low 220V AC Currents
Post by: MarkT on Sep 12, 2019, 08:35 pm
The other problem being the 1 ohm shunt starting a fire if its not a "fusible" type and the circuit get shorted.
Fusible resistors are designed not to start a fire on overload.  Good luck finding a precision fusible >= 4W rated resistor.

A suitable CT would be far better I feel - what turns-ratio did you try?
Title: Re: Measuring Low 220V AC Currents
Post by: syedamerali on Sep 12, 2019, 10:33 pm
Actually, I am using a 50W 1% tolerance resistor which is enclosed in brass (see attached photograph). Chances of this resistor catching fire are pretty slim. It is not one of those cheap ceramic things which you probably have in your mind.

As to your other comment a CT with a turns ratio as low as 50:1 has a voltage induced in the secondary even at no load. This induced voltage causes erroneous readings.
Title: Re: Measuring Low 220V AC Currents
Post by: Wawa on Sep 12, 2019, 11:00 pm
a CT with a turns ratio as low as 50:1 has a voltage induced in the secondary even at no load.
Shouldn't happen, and 2Amp FS shouldn't be a problem.
I think you should use the ADS11x5 ballanced (CT between two inputs), with both inputs biased mid-A/D range.
Posted once a diagram for a CT with ADS and ESP8266 for that.
Leo..
Title: Re: Measuring Low 220V AC Currents
Post by: Wawa on Sep 13, 2019, 12:01 am
Can't find the thread.
Basically need to make a ~1volt (1.012volt) bias source from the ESP's 3.3volt supply with a voltage divider (1k2+2k7), and remove any ripple on the tap with a cap (~47uF) to ground.
Then use two equal resistors (~22k) from there to two ADS inputs (bias both inputs on ~1volt).
Connect the CT (with burden resistor) between the two inputs, and read the ADS in differential mode with a PGA gain of 2. The ADS must be powered from the ESP's 3.3volt supply.
Leo..
Title: Re: Measuring Low 220V AC Currents
Post by: syedamerali on Sep 13, 2019, 04:44 am
Actually I use a buffered voltage bias as suggested here:

https://learn.openenergymonitor.org/electricity-monitoring/ctac/acac-buffered-voltage-bias

This is a better method than the resistor voltage divider that you suggest. In connecting a CT to a ADS1015 a voltage bias is NOT required. Just connect the floating output of the two ends of the burden resistor to the differential input of the ADS. Do not reference it to ground. I normally use a gain of 16.

The accuracy of measurements at low currents for CT's is horrible:
A commonly used CT is the SCT013 by YHDC. The data sheet for this CT states the following:

"Non-linerity±3%(10%--120% of rated input current)"

The full data sheet can be obtained here:
https://www.mcielectronics.cl/website_MCI/static/documents/Datasheet_SCT013.pdf

Further, have a look at this:
https://www.magnelab.com/explanation-of-accuracy-specifications-for-current-transformers/

CT's CANNOT be used for low current measurements if accuracy and linearity below 1% is required.
If you could get away with CT's the likes of Fluke would not be measuring low AC currents with Shunt resistors.
Title: Re: Measuring Low 220V AC Currents
Post by: Wawa on Sep 13, 2019, 05:12 am
Actually I use a buffered voltage bias as suggested here (https://learn.openenergymonitor.org/electricity-monitoring/ctac/acac-buffered-voltage-bias).
This is a better method than the resistor voltage divider that you suggest.
Absolute/stable bias is not relevant if you measure ballanced.
Any bias voltage variation will be cancelled out by the other A/D input.
Zero current will also not drift because of that.

You only need to provide bias to one input, the other one will receive bias through the CT and burden resistor,
but it's nice to keep things 100% ballanced, at the cost of a 22k resistor.

I think you should use a gain of 2, and max swing possible within the limits of the A/D on a 3.3volt supply,
(and maybe to keep ADS noise down with lower gains).

Also use max range of the CT by using multiple turns of BOTH neutral and phase wires through the CT.
Ofcourse neutral and phase in opposite directions.
Leo..



Title: Re: Measuring Low 220V AC Currents
Post by: syedamerali on Sep 13, 2019, 05:34 am
You miss the point. No biasing is required for the ads if used in differential mode. Biasing is only required if you are using the ads in single ended mode and measuring with reference to ground.

Increasing the number of turns merely increases the induced voltage in the secondary at no load. Please try it and look at the signal with a decent scope with a high input impedence.
Title: Re: Measuring Low 220V AC Currents
Post by: Wawa on Sep 13, 2019, 07:01 am
You miss the point. No biasing is required for the ads if used in differential mode. Biasing is only required if you are using the ads in single ended mode and measuring with reference to ground.
I understand where you're coming from.

Did you see any common mode range of the inputs mentioned in the datasheet.
I don't know if -0.5volt and +0.5volt is reliably read as 1volt p/p.
Better keep all voltages positive, like in single-ended mode, to be sure.
And reference them to a fixed point, so they are not (DC) floating).

Increasing the number of turns merely increases the induced voltage in the secondary at no load.
A current transformer transforms current. If there is no primary current, there is no secondary current and no secondary voltage. If you DO have something without primary current, then there is something wrong with your build.
Leo..
Title: Re: Measuring Low 220V AC Currents
Post by: syedamerali on Sep 13, 2019, 07:05 am
With respect to the current transformer; theory and practice are very different. There is always current because of the resistance of the wire. Please try what I suggested earlier with a scope.
Title: Re: Measuring Low 220V AC Currents
Post by: MarkT on Sep 13, 2019, 04:43 pm
Actually, I am using a 50W 1% tolerance resistor which is enclosed in brass (see attached photograph). Chances of this resistor catching fire are pretty slim. It is not one of those cheap ceramic things which you probably have in your mind.
What does the datasheet say?  Fusible means its passed tests that it doesn't create fire when overloaded, not that it looks rugged!  Certainly isn't enclosed in brass though, its wirewould ceramic in an aluminium heatsink.
Quote
As to your other comment a CT with a turns ratio as low as 50:1 has a voltage induced in the secondary even at no load. This induced voltage causes erroneous readings.
Its a transformer, no current in the primary, no magnetic flux, no current in the secondary.

Accuracy will be less, percentage-wise, at very low currents, but its a small effect: https://wiki.openelectrical.org/index.php?title=Current_Transformer#Accuracy (https://wiki.openelectrical.org/index.php?title=Current_Transformer#Accuracy)