Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Using current sensors (transformers) for input to microcontroller

Status
Not open for further replies.
I'm not sure this is the best topic for this question, but probably the best place to start.

I'm looking to read the current draw of a 220VAC single phase motor via a microprocessor (probably arduino).

I found this CT https://www.sparkfun.com/products/11005

which links to this page https://openenergymonitor.org/emon/node/58

which in turn has a link to this page https://openenergymonitor.org/emon/buildingblocks/ct-sensors-interface that has a nice drawing at the bottom of the first screen, as well as some (I think) useful instructions for selecting the resistor values.

Now for the questions: It appears the output of the CT/input to the controller is an oscillating waveform (pin labeled 'Arduino Input'). Won't the oscillation effect the readings by the A/D converter in the controller?

If I was to smooth the waveform, is it just a matter of adding a full-wave rectifier and capacitor? The AC inputs would be the points listed as 'mid-point' and 'Arduino Input'. The new controller input would be the rectifier + terminal, and the rectifier - Terminal connected to the common ground.
 
Yes, if you want the average AC current value, you need to rectify and filter the signal from the current transformer.
For best accuracy you should use an op amp precision rectifier circuit to minimize the error caused by the diode forward drop voltage.

Alternately you can do many voltage samples with the ADC over the sinewave signal period (say ten to twenty samples) and average the values in software. You could even do an RMS calculation of the samples to get the true RMS value of the current.
 
The Arduino circuit is a pretty slick circuit and gives more data than just the motor current. There are current sensors available that will give you an analog DC output proportional to the AC motor current off the shelf, depending on what you want to do.

Ron
 
This time, the circuit is for me personally. I was thinking last night about the setup. (Right now) I want to display the current draw of a 2HP motor, which could be as high as 25A. I am now thinking including an Arduino is over kill. Per the kiss prinicple, current transformer input due to high amperage/voltage involved and a display output (digital voltmeter?). There is no reason why the "arduino CT" must actually be connected to an input on an Arduino. I have a 200mV (**broken link removed**) volt display on hand. The range would kind of stink (0-20A = 0-20mV), maybe I should get the 0-20V version. They are DC meters. At the same time, I probably should not rule out scope creep.

Perhaps I am scope locked, what other information does the arduino circuit provide?
 
... Perhaps I am scope locked, what other information does the arduino circuit provide?
Per the https://openenergymonitor.org/emon/node/58 site:
"The energy monitor can calculate real power, apparent power, power factor, rms voltage, rms current." Useful info, but (since 3 phase related) "apparent power" and "power factor" are not (normally) residential issues and as such have no bearing on, for instance, your energy costs.
 
I read Ron's post too literally. The program can provide that information, the circuit itself does not. And no, I don't want to design a circuit that outputs the power factor.
 
I read Ron's post too literally. The program can provide that information, the circuit itself does not. And no, I don't want to design a circuit that outputs the power factor.
t.GIF

The current through the resistor is the current through the primary divided by the turns ratio. You don't need an op amp at all because the voltage on the diode is reflected to the primary. for less ripple you can add another cap and resistor.
 
The Arduino configuration gives you real power, apparent power, rms voltage, rms current and power factor. Unless you need all that data it is severe overkill. :)

If you just want to look at motor current there are a few ways to look at AC current including but not limited to that CT (Current Transformer) method. You mention a 220 Volt 2 HP motor running single phase. Well in a perfect world 1 HP is equal to 746 Watts but things aren't perfect. A 1 HP motor operating at 84% efficiency will have a total watt consumption of 888 watts. This amounts to 746 watts of usable power and 142 watts loss due to heat, friction, etc. (888 x .84 = 746 = 1 HP). When I did liberal calculations at work for large pump motors I roughed it out at 1 KW per HP. I really don't see this motor going over about 9 Amps under normal load delivering the full 2 HP of actual work. Locked rotor or a stall will shoot the current way up but should that happen there should be thermal overload protection or a fuse somewhere will blow. This motor can easily be run using AWG 12 wire.

So as to current? You can use a CT and each method has good and bad points. Using for example a 50:5 CT you will get 5 Amps out of the secondary with 50 amps in the primary and the primary is just a wire running through the coil. They frequently call them a doughnut and they come in several flavors including "Split Core" but all do the same thing. The down side is they output a current ratiometric to the primary which is still AC. That current is passed through a "Burden Resistor" which gives us a voltage drop that is still AC. The best way to make that AC useful is to either read it with an AC meter and do the math or buy a 5 Amp AC meter and run the coil (CT Output) directly into it. Converting the signal off the burden resistor to DC involves, as CRUTSCHOW points out a "Precision Rectifier" and amplifier circuit, so plan on some building of signal conditioning circuitry. :(

Here is an example of a basic good old CT with it's guts exposed:

Coil 3.jpg


Aside from the old tried and true CTs there are now various current sensors out there including some pretty good HALL EFFECT sensors and what amounts to a CT with a nice 4 to 20 mA output easily run through a resistor to get a nice DC voltage drop. So for example a 0 to 20 Amp AC module will output 4 to 20 mA (standard loop) which when run through a 250 ohm resistor gives us a nice 1 to 5 VDC or through a 500 Ohm resistor gives us 2 to 10 volts so we end up with 0 to 20 amps = 1 to 5 or 2 to 10 volts. They look like this:

CTb.jpg


They are cold by several companies including CR Magnetics and look pretty much like the image I just posted. They do require an external 24 VDC power supply and can be had in many flavors. They afford outputs that can be used in a wide variety of data acquisition systems and can be scaled easily.

The better US stuff runs about $100 a copy. I can't say how good the Chinese stuff is at about 1/5th the price. This all comes down to what you want and what you want to spend as to roll your own or buy a turn key solution?

Ron
 
View attachment 90727
The current through the resistor is the current through the primary divided by the turns ratio. You don't need an op amp at all because the voltage on the diode is reflected to the primary. for less ripple you can add another cap and resistor.

You can't do that with a CT, rest assured that incredibly bad things will happen and give you memories to last a lifetime. :) You can't take the secondary of a CT and just run it into a full wave bridge. Matter of fact, never, ever disconnect a CT secondary from the load (Burden Resistance) while the CT is active because that affords an open circuit. Not a good thing. :(

**broken link removed**. Once you get to Current Transformer Example No1 take note of:

We can see above that since the secondary of the current transformer is connected across the ammeter, which has a very small resistance, the voltage drop across the secondary winding is only 1.0 volts at full primary current. If the ammeter is removed, the secondary winding becomes open-circuited and the transformer acts as a step-up transformer resulting in a very high voltage equal to the ratio of: Vp(Ns/Np) being developed across the secondary winding.

We can't just run the secondary into a full wave bridge, reading the article and doing the math will show why. You run the secondary into a burden resistance and then use a precision rectifier circuit to get it to DC and amplify it.


Ron
 
One of the reason I have picked on this particular sensor is that they are $10 plus S&H. I am hoping it is reasonable. I was think the face plate said 18A which +25% puts the draw in the low 20s. But now that I read your post, that may be been for 120VAC, and thus 9A for 220VAC. I know what is in a CT, I have installed pre-made 'boxes' that use CT and have a built in display, but I have never rolled my own circuit to read one. This particular CT, is 1:2000 or 30A:15mA. The burden resistor (in my understanding) is nothing more than a load resistor, equivalent to the 250 ohm resistor required to read the 4-20mA current loops. The other two resistors supply a DC bias to offset for the low cycle swing.

For the moment I'm going to run away and look at the precision rectifier circuit to see what I will need.
 
You can't do that with a CT, rest assured that incredibly bad things will happen and give you memories to last a lifetime. :) You can't take the secondary of a CT and just run it into a full wave bridge. Matter of fact, never, ever disconnect a CT secondary from the load (Burden Resistance) while the CT is active because that affords an open circuit. Not a good thing. :(

**broken link removed**. Once you get to Current Transformer Example No1 take note of:



We can't just run the secondary into a full wave bridge, reading the article and doing the math will show why. You run the secondary into a burden resistance and then use a precision rectifier circuit to get it to DC and amplify it.


Ron

What about placing the burden resistor across the secondary and parallel with the inputs to the full wave rectifier?

EDIT: Nevermind. that would still provide a nearly no load short circuit across the CT secondary. The resistor would do nothing.
 
Yes, if you want the average AC current value, you need to rectify and filter the signal from the current transformer.
For best accuracy you should use an op amp precision rectifier circuit to minimize the error caused by the diode forward drop voltage.

Alternately you can do many voltage samples with the ADC over the sinewave signal period (say ten to twenty samples) and average the values in software. You could even do an RMS calculation of the samples to get the true RMS value of the current.

Precision Rectifier.jpg



This seems too easy.

Eo is a full wave rectified output to the DC voltmeter, but it has no capacitors. I'll need them.

If Ei is the CT output, then one leg is tied to the same ground as the voltmeter. That doesn't seem right, based on the openenergymonitor documents. Or should Ei be connected to 'mid-point' (see https://openenergymonitor.org/emon/buildingblocks/ct-sensors-interface)? But then what effect will the burden and bis resistors have on this dircuit?
 
Last edited:
You can't do that with a CT, rest assured that incredibly bad things will happen and give you memories to last a lifetime. :) You can't take the secondary of a CT and just run it into a full wave bridge. Matter of fact, never, ever disconnect a CT secondary from the load (Burden Resistance) while the CT is active because that affords an open circuit. Not a good thing. :(

**broken link removed**. Once you get to Current Transformer Example No1 take note of:



We can't just run the secondary into a full wave bridge, reading the article and doing the math will show why. You run the secondary into a burden resistance and then use a precision rectifier circuit to get it to DC and amplify it.


Ron
Hi.
Not only that I can do it I also did it in many of my designs of industrial controls that thousands of them work happily around the world. If you don't understand my simple circuit then you have to go back to school.
 
Hi.
Not only that I can do it I also did it in many of my designs of industrial controls that thousands of them work happily around the world. If you don't understand my simple circuit then you have to go back to school.

I understood your circuit. What diodes were used and what was the open circuit voltage? I assume you know everything in the link I posted? I clearly stated why it was not good design practice and backed that up so how about you share why it is a good design practice? Every company that manufactures current transformers has white papers on open circuit.

Looking back at your design, what will the output voltage be on that bridge? Lets say a 50:5 CT running 25 Amps on a single bus bar primary. What will your rectified output be?

Ron
 
Last edited:
Yes, moty22's circuit will work and works well. The resistor is the burden resistor which is just after the rectifiers, rather than before.
That's an elegant design as the forward drop of the diodes doesn't significantly affect the output voltage since the current transformer has a current (high impedance) output and that current (through the burden resistor) is not affected by the diode voltage.

Basically it's the same as using a precision full-wave rectifier circuit after a burden resistor that is directly across the transformer secondary.

If a resistor is added between the burden resistor and the capacitor to give a sufficiently long time-constant (say 10 times or more the input cycle period) then the output will be the DC average value of the current.
 
Yes, moty22's circuit will work and works well. The resistor is the burden resistor which is just after the rectifiers, rather than before.
That's an elegant design as the forward drop of the diodes doesn't significantly affect the output voltage since the current transformer has a current (high impedance) output and that current (through the burden resistor) is not affected by the diode voltage.

Basically it's the same as using a precision full-wave rectifier circuit after a burden resistor that is directly across the transformer secondary.

If a resistor is added between the burden resistor and the capacitor to give a sufficiently long time-constant (say 10 times or more the input cycle period) then the output will be the DC average value of the current.

Then what would the diodes need to be rated at and what wattage resistor? You got me curious? So why use a burden resistor chased by a precision rectifier?

Ron
 
OK, I figure it this way. First my apologies to moty. The more I look at this I really can't see why it wouldn't work and this sure as hell isn't the first time I have screwed up and been wrong. I have requested of my wife to prepare some crow that I may dine on it. I stand corrected and should have done more homework on moty's design. When forum members I have utmost respect for say something I should damn well listen.

Now since this approach will obviously work I have several CTs here including an Omega Engineering 50:5 Omega Part Number CTL-050005 which I will send to ADW Systems if he can use it, absolutely free at my shipping on me. He is on his own for the bridge though. Again, my apologies and no excuse. ADW Systems, shoot me a PM and if you want this thing give me a mailing address.

Ron
 
In industrial plants the electronic instruments are in control room. All electronic instruments have CT of 5A max input current. The transformer in your pic is at the plant where the high voltages are. The secondary of your transformer takes 5A to the PCB in the control room. In power stations there are several CT each reducing the current to lower level. If you want to measure the current that North Cleveland takes you don't run the high voltage cable to the PCB in the control room at the power station, you send only 5A.
The 5A is not intended to go to the burden resistor, it goes to the CT on the PCB. Normally the current through the resistor is 5mA and the resistance is 1K.

No harm done, we can't help it we both are men, we always go for the gun first. You should punish yourself more, give your desert tonight to your lovely dogs.
 
Last edited:
Then what would the diodes need to be rated at and what wattage resistor? You got me curious? So why use a burden resistor chased by a precision rectifier?

Ron

I want to take a stab at the ratings.

50:5 CT with native 25A current, but two wraps through the core (because I have the headroom and the numbers work nicely) will give an apparent 50A.

Sensing 50A, produces 5A peak (7.07Arms) in the secondary.
The burden resistor is across the both leads, so Aref/2 in https://openenergymonitor.org/emon/buildingblocks/ct-sensors-interface doesn't apply.
I will want to see 5V at 7.07Arms, so R=V/I = 5/7.07= 0.707 ohms. 0.707 ohms is not common, so 0.5 ohms.
As for the power rating of the burden resistor, P=IV=7.07X5=35.35 Watts

Assuming the voltage drop of the diode in the bridge rectifier is 0.7V, P=IV=7.07*0.7=4.94W.

So the burden resistor is 35W(min) 0.5 ohm and the bridge rectifier needs to be rated for 5W(min).

Based on crutschow comment for the output RC, 10 * 1/60hz = 0.16667s. A 2.2uF cap and 10k 1/4W resistor would be 0.22s. I aimed high to compensate for the tolerances of the capacitor and resistor.

Am I close?
 
Last edited:
I want to take a stab at the ratings.

50:5 CT with native 25A current, but two wraps through the core (because I have the headroom and the numbers work nicely) will give an apparent 50A.

Sensing 50A, produces 5A peak (7.07Arms) in the secondary.
The burden resistor is across the both leads, so Aref/2 in https://openenergymonitor.org/emon/buildingblocks/ct-sensors-interface doesn't apply.
I will want to see 5V at 7.07Arms, so R=V/I = 5/7.07= 0.707 ohms. 0.707 ohms is not common, so 0.5 ohms.
As for the power rating of the burden resistor, P=IV=7.07X5=35.35 Watts

Assuming the voltage drop of the diode in the bridge rectifier is 0.7V, P=IV=7.07*0.7=4.94W.

So the burden resistor is 35W(min) 0.5 ohm and the bridge rectifier needs to be rated for 5W(min).

Am I close?

Please read my blog #18.
Instead of using 2 CTs in chain you can look for CT with turns ratio of 1:5000 or 1:1000 and 25A primary. They are available.
Alternatively if you take a 5VA transformer of lets say 120v to 12v the primary will have about 2000 turns. wind around the primary or secondary one turn of 25A wire and you have your home made CT. Because you don't know the number of turns you will have to put known current through the 1 turn, and measure the voltage on 100 ohm resistor across the primary (the 120V terminals, the 12V terminals aren't used at all) . The number of turns is the ratio of the current through the 1 turn to the current through the resistor.
 
Status
Not open for further replies.

Latest threads

Back
Top