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.

Rough AC current measurement.

Status
Not open for further replies.

PICMICRO

New Member
My application requires measuring AC currents of few 10s Amperes.
I am using a CT and a 5 ohm resistor for converting current to proportional voltage.
Now, in software part,
Instead of taking a no. of ADC samples and finding the average current, could I just put in a diode and a Capacitor, such that the capacitor will hold the peak voltage. I will take just 1 ADC reading once in a while to find the peak voltage, and from it estimate the Average or the RMS current.
What practical problems do you see in this?
and what workarounds do you purpose?

the measurement needn't be precise, but it shouldn't be orders of magnitude off. :)
 
That's how I do it. Then you turn the input port to an output, drive it to 0 to discharge the cap (put a resistor in there so you don't blow the port pin), and that resets it for the next peak read.
 
Last edited:
That's how I do it. Then you turn the input port to an output, drive it to 0 to discharge the cap (put a resistor in there so you don't blow the port pin), and that resets it for the next peak read.
Thanks for the suggestion. I was thinking of using a bleeder resister across the capacitor, to discharge the voltage, but your method is superior.
Do you think any of the following poses problem?
1. Current spikes
2. 0.7V diode drop

For the 1, I think, if I place a small resistor in series in the charging path of the capacitor, spikes should do no harm.
For 2, I am not sure. 0.7V drop is when there is some current flowing. In the steady state condition of fully charged capacitor (fully charged to the peak), there is no current, so ultimately the 0.7V should have dropped to somewhere around 0.01 Volts?

This is the arrangement we are talking about
**broken link removed**
 
Last edited:
The cap generally flattens the voltage spikes induced from any current spikes because the sensor coil itself usually has a fair amount of resistance. Your "small value resistor" there will certainly improve this effect.

This is assuming you don't want to read those current spikes. Sometimes you want to read them because (unlike a voltage spike) these things are difficult to detect and can cause problems you can't see on a scope without a special clamp-on probe.

The .7V is always a drop, the steady-state voltage will still be .7V lower than the peak. So long as your minimum voltage is still above the .7V this generally isn't a huge issue...

...however, I typically use a schottky diode here both for speed and because the forward voltage drop is less than half the standard silicon .7V drop. This improves the range of valid readings. If you use a 5V A/D converter, the .7V drop accounts for 14% of the span. A schottky like this one -
https://www.electro-tech-online.com/custompdfs/2012/06/ds30492-1.pdf
- has just a .21V drop at 100ma, so it only eats up about 4% of the span.
 
Last edited:
Thanks duffy.
I tried the Diode-capacitor method, but I have run into another problem.
The current I am trying to measure isn't sinusoidal. It has large DC offset and Lots of discontinuity (due to IGBT switching of the load). So, the CT isn't faithfully reproducing it, and the Peak is way off form what it should have been.
I don't think CTs will work for such currents, so I am looking for a better method to measure the current.

I will come up with diagrams, and explanations for why my current is of that nature and will also be posting some Oscilloscope images of the CT currents-->Voltage for such system. But thats for tomorrow.
 
CT can not pass DC. Any "offset" will not come through.
So you are not measuring the power line but the current in a IGBT?
Is there a current scene resistor at the bottom of the IGBT?
 
it would make a lot more sense to rectify the CT and put the current sense resistor after the FWB. then feed that directly into the ADC.

use a resistor inline and a zener to clamp the voltage below 3.3 volts to keep the pic safe from 1000 amp line transients blowing it up.

you will have to make sure that the 1.4 volts in addition to the voltage dropped across the current sense resistor does not saturate the CT.
 
Little more explanations

My project goes like this.
View attachment 64943
There is a small 3 phase Alternator in a remote place operated from a small stream.
Some consumer loads are connected to it.
But the consumer loads are constantly changing, so it can create change in the Generator frequency.
Since the Prime Mover (water jet from the stream) is constant, we need to make the total Loads also constant.
To achieve that, a dummy load is connected to the Generator and its power is varied by switching the IGBT.
The timing of the IGBT gate signal is managed such that, it draws different current from different phase of the Generator, so that, the unbalance in the generator current due to unbalanced consumer load is compensated.

The main issue here is to sense the DC-offset and Chopped/Discontinuous Generator Currents of all three phases and find out their relative magnitudes.

In addition any tips/suggestion for the whole project is also happily welcomed. :)
 
it would make a lot more sense to rectify the CT and put the current sense resistor after the FWB. then feed that directly into the ADC.

use a resistor inline and a zener to clamp the voltage below 3.3 volts to keep the pic safe from 1000 amp line transients blowing it up.

you will have to make sure that the 1.4 volts in addition to the voltage dropped across the current sense resistor does not saturate the CT.
I am not sure what you mean by FWB.
I guess you mean to rectify the CT current rather than the CT voltage.
That was what crossed to my mind. Apparently, CT (a current source) should happily flow undistorted current through the Diode-Resister-Diode configuration. So, apparantly, I should have got a perfectly Full-wave rectified waveform across the resister.
But unfortunately, when I tested in hardware, It was nowhere near. I am puzzled.
View attachment 64944
When there is no rectification, I get a nice smooth, nearly sinusoidal voltage across the Resiter
View attachment 64945
I used 1n4007s, do you think it was the problem?

In your last paragraph, I am not sure how you can estimated if the CT will saturate by adding up voltages. The nameplate says it can provide 10VA, so I guess, V*I shouldn't cross 10.
In the above graph, this limit wasn't crossed.

Please mind that all these waves are when the primary current was sinusoidal. Not for the DC-offset and discontinuous current I am currently facing.
When I had to sense such currents, the CT didn't work.
I got something like this.
View attachment 64946
 
Last edited:
So, apparantly, I should have got a perfectly Full-wave rectified waveform across the resister.

No, you will only get half-wave rectification with this. You need to replace the diode with a bridge to get full-wave. I don't generally like to do this because it eats up 1.4V of the total span, however it does improve some other things -

- this "saturation" problem, for instance. The secondary of the current-sense transformer can get saturated because the half-wave rectifier can build up a DC current offset because of constantly discharging the cap with the μC or using a low-value bleeder resistor.

With the full-wave bridge you get both the + and - cycle, so it reverses direction and does not build up this offset current. I have not seen this problem in low-frequency (50-60Hz) current sensors before, but it would be worth trying a bridge instead of one diode to see if this will solve the problem.
 
No, you will only get half-wave rectification with this. You need to replace the diode with a bridge to get full-wave. I don't generally like to do this because it eats up 1.4V of the total span, however it does improve some other things -

- this "saturation" problem, for instance. The secondary of the current-sense transformer can get saturated because the half-wave rectifier can build up a DC current offset because of constantly discharging the cap with the μC or using a low-value bleeder resistor.

With the full-wave bridge you get both the + and - cycle, so it reverses direction and does not build up this offset current. I have not seen this problem in low-frequency (50-60Hz) current sensors before, but it would be worth trying a bridge instead of one diode to see if this will solve the problem.

I always did use full Bridge rectifier. I admit that I didn't word it correctly in my previous post, though.
I understand that a simple half-wave rectifier on the CT secondary, would pose drastic problem to CT because, during the negative half cycle, the current will have no path to flow.
But quite surprisingly, even with a bridge rectifier, I got voltage waveform resembling half-wave rectifier. (See oscilloscope images on prev post)

But presently, I have entered to new problem of of measuring non-sinusoidal DC offset and chopped current.
 
What is the period and volts/div on that first scope pic, and where is 0V? If it is full-wave, then the cycles should be 100-120Hz, and the problem would be clipping. The most likely cause would be the processor port pin - you can't go over the +V supply on the micro or the internal diodes will shunt the input to +V and cause clipping.

CT transformers *do* give you some strange looking outputs at times. This is because we are so familiar with voltage waveforms it is unusual to think in terms of what the current is doing.

What size cap are you using? It might be a good idea to start with a larger cap on the output of the bridge (like 100μf or more), disconnect the port pin, and just see if it will give you a DC level that corresponds to a simple scalar current that you can read with a clap-on meter or voltage drop across a shunt resistor.

You don't want to discharge a 100μf cap with the processor port pin, but for now it is more important to figure out what the problem is.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top