## Measuring 220 AC with an ADC

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
abahler
Posts: 7
Joined: Wed Jun 20, 2007 11:49 am
Contact:

### Measuring 220 AC with an ADC

Ok I'll use a transformer. the question that leaves me with though is how do I know what the measured voltage is in relation to the ADC reading.
Say I have everything set up so the input to the ADC is 2.5VDC when the
input to the transformer is 240VAC. Now when the ADC reads at 2VDC how do I know what the trans input is.
See what I mean?

dyarker
Posts: 1752
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:
Scale it so when then input is 240VAC the ADC sees 2.4VDC. Then the reading is ADC output times 100.

Or, with your original 240VAC gives 2.5VDC, then 2VDC is:
240 / 2.5 = 96
2 * 96 = 192VAC in.
96 is the constant multiplier, basic math.

For better resolution scale it so 300VAC in gives 5VDC to the ADC. Then the multiplier is 60.

To make it easier to multiply in binary, change the scale to make the multiplier 64. (shift left 6 bits)

Cheers,
Dale Y

Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.
Personally seeing that a set point is required,... and not a fancy read out, ....I would use Zeners and a Led to tell me where I was at. Three or five.

A step down transformer can be handy, a DC full wave rectification is also handy, and IF you need to drop any readings like mentioned above, a â€œResistor Divider Net workâ€

MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:
Hi there,

After reading the posts i have to agree that a transformer would be
good here because it would provide isolation from the line to the
circuit board.

Choose a transformer with 12v output (probably more common)
and then use this circuit:

Code: Select all

``````
D1
-----|>|----R1--------------
|               + |    |    +
V1                  C1  R2    Vo
|                 |    |    -
----------------------------

``````

In the above circuit,
V1 is the output from the 12vac secondary (transformer is 240vac to 12vac)
D1 is a diode, 1N4001
R1 is 16k, 0.25 watt
R2 is 10k, 0.25 watt
C1 is 100uf electrolytic
Vo is the output that connects to the ADC input

With this circuit, when the input is 240vac rms the ADC sees 2.4v dc.
When the input is 200vac rms, the ADC sees 2.0v dc.
Table:
In..........Out
280vac : 2.8vdc
260vac : 2.6vdc
240vac : 2.4vdc
220vac : 2.2vdc
200vac : 2.0vdc
LEDs vs Bulbs, LEDs are winning.

L. Daniel Rosa
Posts: 400
Joined: Tue Dec 25, 2001 1:01 am
Location: Bellingham, WA
Contact:
I am sending this in relation to your reply to my question on the Nuts& Volts forum.
Would you be so kind as to tell me what a running average accumulator is.
Does it average the incoming sample with the average already in it or what.

Aaron Bahler
Have you sent this message twice? It may have been snagged by the spam filter before.

By running average accumulator, I mean storing and manipulating a value. The workings of it are identical to a digitally implemented low pass filter. http://en.wikipedia.org/wiki/Low-pass_filter explains a lot.

I want to say more, but at the moment I'm not thinking clearly and I have to go to work. Perhaps this evening I will be in the proper mindset.

Engineer1138
Posts: 458
Joined: Thu Feb 05, 2004 1:01 am
Location: Minneapolis, MN
Contact:
abahler:
You're getting a lot of stuff thrown at you here. It's not a difficult task, but you will have a steep learning curve.
First heed ecerfoglio's statement: 220V is nothing to screw around with. BE CAREFUL!!

Next, you are asking for better than 0.3% precision (1 volt out of 310V peak), so keep that in mind. Your transformer will probably have to be calibrated since I don't know that I would trust any old power supply transformer to be exactly n:m ratio. A plain rectifier will add 0.6V of offset, so the precision rectifier (op-amp with rectifier in feedback loop is a good idea), but you'll need to watch out for op-amp offset.

Here's what I would suggest:
1) Get a transformer and learn how it works. Connect it to the 240VAC and measure the output with a DVM. See how the voltage changes as you load the output with resistors. Compare the input voltage to the output voltage and calculate the ratio. Is it exactly what you'd expect based on the rating on the transformer?

2) Read up about opamps and in particular, precision rectifiers. You can find sample schematics online.

3) Now, if all you need is an indication when the voltage is at a certain level, learn about comparators and how they can turn an LED on or off. ANd also read about voltage references and what they are used for.
Alternately, if you need to measure the voltage, you'll need at least a 10-bit A/D due to your precision requirements.

There you have it. Take it in little bites and you'll get there. It's a lot to learn all at once.

What is the final device going to be used for?

abahler
Posts: 7
Joined: Wed Jun 20, 2007 11:49 am
Contact:

### Measuring 220 AC with an ADC

Yes I realize the danger with 240. And I also realize the steep learning curve.
That is the way I've learned a lot of things and I guess I enjoy the challenge.
I'll read up on precision rectifiers.

### Who is online

Users browsing this forum: No registered users and 38 guests