Pages: 1 [2]   Go Down
Author Topic: DC Bias of AC Signal?  (Read 3436 times)
0 Members and 1 Guest are viewing this topic.
Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17253
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  smiley-wink

  
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Montreal
Offline Offline
Faraday Member
**
Karma: 27
Posts: 2556
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
.



Logged

0
Offline Offline
Shannon Member
****
Karma: 198
Posts: 11620
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

'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.
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Jr. Member
**
Karma: 0
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: March 06, 2011, 02:10:08 pm by Loudhvx » Logged

UK
Offline Offline
God Member
*****
Karma: 17
Posts: 568
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: December 12, 2012, 05:06:09 am by tack » Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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.

Pages: 1 [2]   Go Up
Jump to: