PDA

View Full Version : How can I measure 0-3V AC using an 8-bit A/D?



Tony_tsi
04-03-2012, 08:58 PM
I need to measure ac voltage as accurately as possible using an 8-bit a/d controller.
The voltage will be 1-3V AC.
I prefer not to convert to DC unless I can convert it to the same voltage very accurately.
If any one can point me in the right direction i would relay appreciate it.
I am using this to measure current using the current transducer in the link below.
http://www.eio.com/p-23820-velleman-ac97-modular-ac-current-transducer.aspx


(http://www.eio.com/p-23820-velleman-ac97-modular-ac-current-transducer.aspx)

jmg
04-03-2012, 09:17 PM
I prefer not to convert to DC...

Why not ? - That allows you to externally average over time, which will have less reading jitter.

Does this need to be RMS current ?

Alternatives are frequent AC samples, but you need to know Zero - so you could take a lot of samples, ideally over a whole number of cycles (can be a SW decision) and then you can fix Zero, and from there, do a RMS sum.

Tony_tsi
04-03-2012, 10:08 PM
THE FOLLOWING IDEAS ARE MY THOUGHTS AFTER BRAINSTORMING THE IDEA OF CONVERTING TO DC AND ARE PROBABLY WRONG DUE TO MY LACK OF EXPERIENCE WITH BRIDGE RECTIFIERS AND AC CIRCUITS!
The only way I know to convert to ac to dc is by using a bridge rectifier. Bridge rectifiers do not output clean dc signals so I will need a smoothing capacitor. The output from the amperage clamp is liner ( 1mV AC per .1Amp AC). If i run this signal through a bridge rectifier and use a smoothing capacitor the capacitor will skew the reading and it will no longer be liner. As far as i know a bridge rectifier is made up of 4 diodes. A diode needs something like.5-.7 volts to work. so if i were trying to read a 1 amp line current the output voltage of the clamp would only be 10mV. Not nearly enough to make a diode work.

jmg
04-03-2012, 10:13 PM
http://en.wikipedia.org/wiki/Precision_rectifier
and follow the links also, for full wave, and half wave.

lyassa
04-03-2012, 10:29 PM
If the voltage vary between +1V and +3V then it is not AC. It is DC with varying voltage levels. The electric current is AC only if it reverse direction, that is at one moment it is +1V, and later it is -3V. If the former is the case, you can simply use the 8 bit ADC in this link http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/ADC/List/0/SortField/4/ProductID/245/Default.aspx, sample it at at least twice the frequency of your signal, then calculate the max, min, average, rms, ...

If you mean that it is actually AC, such that the min voltage is -3V and the max is +3V, then you can use an adder circuit (using op amps) and add 3 volts to the input signal. This will make it DC varying between 0V and 6V. You can then two resistors to scale the voltage to 0-3V.

Rayman
04-03-2012, 11:39 PM
BTW: You can actually use Propeller Sigma-Delta ADC to read AC voltages...
Play with the resistors on this calculator to see how:
http://www.pulsedpower.net/Applets/Electronics/SigmaDeltaADC/SigmaDeltab.html

The Quickstart has pads for the important resistors and capacitors...

Bean
04-04-2012, 11:42 AM
Tony,
All you need to do is to bias the AC voltage up.
Assuming you are using the propeller with a 3.3V Vdd, I would run the AC thru a 10K resistor and then add a 10K resistor to 3.3V to bias the voltage up.
This should give you +0.15V at the ADC when the AC is at -3V and 3.15V at the ADC when the AC voltage is at +3V.



10K
3.3V ---/\/\/\/\---|
10K |------ to ADC
AC ----/\/\/\/\----|


Bean

Dr_Acula
04-04-2012, 12:21 PM
The voltage will be 1-3V AC.

How fast is the AC voltage moving?

If it is a mains voltage, eg 50Hz or 60Hz, and your A to D sampler is sampling 5000x a second, it is almost a DC voltage as far as your sampler is concerned. Just sample many times a second. You can do all the maths in the chip with the samples you have.

And you can probably do better than 8 bits - maybe 10 or 12 bits.


The only way I know to convert to ac to dc is by using a bridge rectifier. Bridge rectifiers do not output clean dc signals so I will need a smoothing capacitor. The output from the amperage clamp is liner ( 1mV AC per .1Amp AC). If i run this signal through a bridge rectifier and use a smoothing capacitor the capacitor will skew the reading and it will no longer be liner. As far as i know a bridge rectifier is made up of 4 diodes. A diode needs something like.5-.7 volts to work. so if i were trying to read a 1 amp line current the output voltage of the clamp would only be 10mV. Not nearly enough to make a diode work.

You are correct. In the olden days you might have used and op amp with a couple of diodes back to back such that the op amp cancels out the diode voltage drop. Then it is linear, and with a few resistors you can even do the RMS conversion as well. But these days, why not sample the voltage many times a second in your microprocessor, and then do the clever maths in the micro?

What is the maximum volts of your sample, and the minimum volts, and the frequency?