Go Down

Topic: DC Bias of AC Signal? (Read 5234 times) previous topic - next topic


At least as typed,  some of the posters here are mixing up peak values with peak-to-peak values, they are two different measurements of the same waveform. Again 3 vac (rms) has a peak value of 4.24 volts but indeed has a peak to peak value of 8.48 volts. So if you want to 'center' the complete ac waveform onto a single polarity DC measurement range you must have a DC offset equal to one half of the peak to peak value, or 4.24vdc. The complete 3vac (rms) wave form will then totally fill the a 0-8.48vdc measurement range. That would then require a voltage divider to cut down to a arduino compatible 0-5vdc measurement range.

So lets try and keep our peak and peak-to-peak values separated. Peak (p) is the value spanning from zero crossing to either the negative or positive peak. Peak-to-peak (pp) is the value spanned from the maximum negative peak to the maximum positive peak.  ;)



Thank you retrolefty!  I guess the peak vs. peak-to-peak was confusing me.  I now see how this will work.   :D


Yes, I agree,
But if someone want to measure AC level, there is no point to "shift ,or  bias"
a level.
As negative self period of sine wave is equiale to positive  half wave,
ordinary "envelope detector" will produce an output correctly.
There is only one reason to shift or bias if you try to interpreter input,
perform FFT or other sound analisis function.
There would be a trade off between frequency of input signal an frequency of scaning input.
In other words, if software check input with 40 Hz, it's cannot see anythyng below that.
For regular AC measurements, 1 Hz would be o'k, and there is no needs to measure both half
periods of the sine wave. One would be enough.



'Peak value' for a sinusoidal signal is usually called 'amplitude'.  Of course people have noted that the output won't be sinusoidal in general due to non-linear loading, so 3V RMS could mean peaks in excess of 4.2V - allowing some headroom call it 5 or 6V.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


Mar 06, 2011, 07:52 pm Last Edit: Mar 06, 2011, 08:10 pm by Loudhvx Reason: 1
Retrolefty's strategy (rectify/filter/scale) would be the best, in my opinion.  If the maximum range will truly be significantly less than +/-12v, then you can use opamps to do the rectification so there will be no .7v rectifier losses. (That's how ac voltmeters do it.)  Another advantage of using opamps to do the rectification, is that you may also be able to do the scaling using the same opamps. Also, the opamps won't load the output of the CT, (in case it has a higher output impedance, in which case other types of scaling would affect the voltage levels). Once it's scaled and rectified with opamps, you can use a simple capacitor for filtering high frequency noise.

I think I read the purpose of this is to measure the power usage at the mains of the house. In that case you will need more info than the simple current to time function. You will need to correlate the current to the voltage of the mains. As was mentioned, this is because current and voltage don't always line up due to inductive, capacitive, or active loads.  You may have to research how the power meter from your utility company compensates for power factor correction. At larger industrial facilities, at least here in Illinois, we are required to install large capacitor banks in order to compensate for the large motor loads we have. This is simply so the power factor is correct for the usage meters, so we get billed correctly.

If all you have around the house is lighting, then current and voltage will be in phase, but if you have a large refrigerator, airconditioning, etc, then the current and voltage will be out of phase slightly, and this will affect the wattage measurement.

A quick google search for opamp rectification found this, it was the first one I clicked on: http://sound.westhost.com/appnotes/an001.htm
Be sure to take note of when to use buffer blocks in case the CT is a high impedance output.


Dec 12, 2012, 10:42 am Last Edit: Dec 12, 2012, 11:06 am by tack Reason: 1
Quote from: Loudhvx link=topic=54434.msg390274#msg390274
At larger industrial facilities, at least here in Illinois, we are required to install large capacitor banks in order to compensate for the large motor loads we have. This is simply so the power factor is correct for the usage meters, so we get billed correctly.

It's not about 'the power factor being correct for the meters', it's about lowering the current drawn in order that electricity bills are lower.

For larger supplies, billing is usually done differently than for smaller (like domestic) supplies. CT metered supplies simply measure the current and volts to calculate kVAh. 'Whole Current' metering measures 'True Power' only so a domestic customer is usually billed purely in kWh so any reactive loads aren't paid for.

An industrial customer will pay for reactive power and so correcting the power factor as close to unity as possible will result in cheaper bills.

As far as CT's go, remember that they are designed differently to a voltage transformer. CT's are designed to deliver the rated current into a specific load impedance range. I.e a 200/5 CT will try and output 5A secondary current for 200A in the primary, or a direct ratio of any current up to that 200A. It will try to do this regardless of the load impedance. This means that it's the voltage that changes to try and drive the current through a particular load. If the load is a very high impedance then the voltage across the CT terminals will be correspondingly large. This can exceed the minimal insulation and cause damage, arcing and fire. If the output terminals are open circuit, with a primary current flowing, then you effectively have infinite load impedance and extremely high voltages can be generated. This is why it is always important to short out CT's when not in use.

Be very careful with CT's, they can be extremely dangerous if you just expect them to act like a voltage transformer, as they are not the same.

As far as this project goes, you need to understand that a CT outputs current in ratio to the primary NOT voltage. The Arduino pins will measure voltage so you need to translate that somehow. If you had a fixed resistance in the CT secondary then you'll know how much secondary current will flow for a given primary so you could then calculate/measure the resultant voltage across that resistance at different current levels. The voltage and power developed will be purely a factor of that impedance so it would need to be very low. If you consider a short then you'd see a 5A current in the short for 200A primary but the voltage across the short would be very low, based purely on the impedance of the short itself and the CT impedance.

EDIT: The first link to CT's isn't working for me. The site shows additional CT's or CT's plus an MTU. I can't see any specs for this 3V RMS output either. Can the OP add a working link to what has actually been bought. I can only assume that this 3V output is from the MTU and NOT the CT's, as they would simply have a ratio of say 200/5A or 200/1A. CT's also have a Class, usually 0.5 for metering CT's which would mean a standard 5% error tolerance.


How is the 2.5v arrived at?

In a 5v environment, a 2.5v bias provides the maximum swing for the ac signal before clipping.

The approach you are considering isn't a good approach. For your approach to work, you have to constant adc the voltage and current signals over the whole cycle and then perform multification / summation to arrive at the power consumption. Very time consuming.

A couple alternatives:

1) using a power metering ic: Analog has a few of them;
2) using hardware multipliers: this is typically done by four pairs of opto-couplers; Alternatively, you can use analog multipliers (opamp-based) to your voltage / current signals. They use diodes and as such are subject to thermal drift which needs to be software corrected.


What I do is to put a 1:1 voltage divider across the 5V supply to get a 2.5V DC mid point reference. Feed this into one analog input and connect one side of the current transformer to it. Put another voltage divider across the current transformer to reduce the output from 8.4V p-p to less than 5V p-p. Another 1:1 voltage divider will do. Feed the midpoint of that voltage divider to another analog input. Then the difference in readings from the two analog inputs gives you the instantaneous current.

To measure power or true RMS current, you will need to sample the current at frequent intervals. I trigger ADC conversions on a 1ms or 500us timer interrupt and read the results on the ADC conversion complete interrupt. Or, to get a higher conversion rate, you could trigger a new ADC conversion on the conversion complete interrupt, or put the ADC into free running mode.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131