Searching \ for 'Measure 115VAC with a 'C67X' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/index.htm?key=measure+115vac+with
Search entire site for: 'Measure 115VAC with a 'C67X'.

Truncated match.
PICList Thread
'Measure 115VAC with a 'C67X'
1998\07\23@140607 by Calvin

flavicon
face
Hi All,

I need to measure the AC line voltage (around 115VAC) with a PIC12C67X, and
was wondering if anyone can suggest the cheapest, easiest way of doing this.
The most important condition is that no transformer is allowed.

BTW, how a common multimeter does it?

TIA

Calvin

1998\07\23@162942 by Thomas McGahee

flavicon
face
Calvin,
How accurate a measurement do you need? What *range* are you interested
in? You realize, of course that without a transformer you have no
isolation?

You may have to play a couple of tricks.
Trick 1) Convert the AC to DC. That will cost you a diode and a cap.
Trick 2) Assume you want 128 VAC max. 128*1.414=180.992
 Use a two resistor voltage divider to convert the 180.992 to 5.0 vdc
Trick 3) Measure the 0-5.0 voltage using the PICs A/D converter.
Trick 4) Scale the result. 128/256=0.500 so each of the 256 possible
 counts corresponds to the voltages 0  .5  1.0  1.5  2.0  2.5  etc.
 all the way up to 127.5 volts AC RMS

By scaling based on 128 VAC, which is a perfect binary multiple, we keep the
conversion process really simple.

Using a couple of op amps you could improve matters tremendously if you are
really interested in measuring voltages *between* say 100 and 125.5

Since the difference is 25.6 volts and you have 256 counts, that would give
you a resolution of .1 volt. Count 0=100.0vacrms  1=100.1  2=100.2 ....
254=125.4  255=125.5

When choosing your scales and ranges, always try to select binary related
numbers like 32 64 128 256 512 so you keep the conversions simple.


BTW, you test the above circuits FIRST with a standard DVM/DMM. Once you
have the circuit outputting the proper voltages, then you interface
the circuit to the PIC.  NOT before! You will save lots of money on PICs
this way!

Hope this helps.
Fr. Tom McGahee
----------
{Quote hidden}

1998\07\23@173853 by Calvin

flavicon
face
>Calvin,
>How accurate a measurement do you need? What *range* are you interested
>in? You realize, of course that without a transformer you have no
>isolation?


I only need 1V accuracy, the range: between 70 and 170 would be more than
enough.
I know about isolation.

>
>You may have to play a couple of tricks.
>Trick 1) Convert the AC to DC. That will cost you a diode and a cap.


I realize that I need a relatively large cap, doing this. Not good for what
I want.

>Trick 2) Assume you want 128 VAC max. 128*1.414=180.992
>  Use a two resistor voltage divider to convert the 180.992 to 5.0 vdc


I thought on doing this without the cap, just the diode, and then make
several fast A/D conversions, then pick the largest value and convert to rms
(assuming a nice sine wave, of course).

>Trick 3) Measure the 0-5.0 voltage using the PICs A/D converter.
>Trick 4) Scale the result. 128/256=0.500 so each of the 256 possible
>  counts corresponds to the voltages 0  .5  1.0  1.5  2.0  2.5  etc.
>  all the way up to 127.5 volts AC RMS
>


Calvin

1998\07\24@084224 by Peter L. Peres

picon face
On Thu, 23 Jul 1998, Calvin wrote:

> >Calvin,
> >How accurate a measurement do you need? What *range* are you interested
> >in? You realize, of course that without a transformer you have no
> >isolation?
>
>
> I only need 1V accuracy, the range: between 70 and 170 would be more than
> enough.
> I know about isolation.

1 V at 70 V is slightly better than 1.4 %. 8 bits A/D is 0.4 % roughly.
You can only afford to drop one bit (you need a span of 100, i.e. <128),
with a running CPU around the A/D and line noise of all kinds. This means,
that the divider won't work well enough (too much noise/low resol. in the
upper end), and you should substract a constant before dividing. A
relatively HV (65V)  zener in series with the divider will do this.

If I'd have to do this, I'd probably measure a whole half wave every
second at the max. speed of the converter (that many samples, summing in
an accumulator), and use this averaged over no. of samples and
extrapolated x frequency x 2 (also measured on the side) to obtain true
RMS readout regardless of waveform.  Note that some assumptions need to be
made about the wave shape where it is 'hidden' by the zener. The
calculation is directly equivalent to a squares method integral, with some
parts implied.

I'd like to know what a 65 Volt zener does when heated from 10 deg to 80
deg. C. I know that 33 Volt ones are pretty stable (tuning voltage
stabilizers in TV - mass produced and thus low cost).

Peter

1998\07\24@172905 by Mark Willis

flavicon
face
Peter L. Peres wrote:
> <snip>
>
> I'd like to know what a 65 Volt zener does when heated from 10 deg to 80
> deg. C. I know that 33 Volt ones are pretty stable (tuning voltage
> stabilizers in TV - mass produced and thus low cost).
>
> Peter

 Thought: Series two 33V units to get 66 V?

 Mark, mwillisspamKILLspamnwlink.com

1998\07\24@183159 by Peter L. Peres

picon face
On Fri, 24 Jul 1998, Mark Willis wrote:

> Peter L. Peres wrote:
> > <snip>
> >
> > I'd like to know what a 65 Volt zener does when heated from 10 deg to 80
> > deg. C. I know that 33 Volt ones are pretty stable (tuning voltage
> > stabilizers in TV - mass produced and thus low cost).
> >
> > Peter
>
>   Thought: Series two 33V units to get 66 V?

1. These are not THAT cheap. Two are more than $2, which approaches the
cost of the PIC.

2. These are chips really. Simple chips, but not zeners. They positively
do not like ESD, spikes and assorted things coming from the power outles,
even through a resistor or two. I can vouch for them being static
sensitive, even if the damage becomes visible later as temperature or time
drift or noise.

A good old 65 V zener should be used. If you wouldn't need 1.4 % I'd
suggest a neon light, which drops 70-90 V, and used to be used for
precisley this application in the Valve era.

Peter

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...