July
1998, Issue 96
A
PIC-Based AC Power Meter
MY TOP
PIC
The PIC software
occupies 722 of 1024 words of program memory. I havent
yet implemented average power measurement or low-battery
detection. And, I did the initial calibration using
incandescent light bulbs as loads.
The results
appear accurate within 10 W, as Woodwards article
indicates. Calibration using the two trim pots was fairly
easy. For easier calibration, a multi-turn pot could
replace the single-turn trim pot.
Some possible
enhancements include use of a higher resolution ADC
for more accuracy, removal of pots altogether, larger
energy consumption accumulator, and autocalibration.
You just saw
how a simple PIC with Microchips math routines
can be made to do significant computation such as numerical
integration. You can use this project as starting point
for any instrumentation-type project.
And maybe
now I can figure out just whats making my wattmeter
spin so fast.
Rick May
is a principal design engineer at Raytheon Systems.
He currently designs embedded software for a Navy communications
system. You may reach him at rmay@televault.com.