July
1998, Issue 96
A
PIC-Based AC Power Meter
SYSTEM
DESIGN
I want my
power meter to measure AC power, instantaneous and average,
01200 W, as well as measure AC energy consumption
in kilowatt-hours (or watt-hours). Additionally, I want
it to provide digital readout of power or energy, and
it should be easy to hook up using standard power receptacles
and plugs.
This device
is to be packaged as a hand-held instrument, and my
budget dictates some ultra-low-cost parts.
I designed
the power meter around the Woodward power-measurement
circuit. The power source is a 9-V battery, instead
of stealing power from the AC line. This setup ensures
maximum isolation from the AC line and increases safety.
I chose a
nonmultiplexed LCD because of its low power consumption.
I use a simple four-digit, seven-segment type rather
than an alphanumeric LCD module because I only need
to display numeric data. It also costs less.
The user operates
the meter using two momentary switches. The mode switch
causes the display to cycle though the different operational
modes. Regardless of what operational mode the power
meter is in, energy-consumption accumulation still occurs.
The reset switch resets the energy-consumption accumulator
in any operation mode.
This power
meter has four operational modes. The power mode displays
the power consumed in watts. By accumulating power over
time, the energy mode displays watt-hours or kilowatt-hours.
The average power mode displays energy consumed over
time in watts. The remaining mode displays the time
elapsed since reset in hours, minutes, and seconds.
Because the
power meter toggles through these four modes, the user
needs to know the current operational mode. Normally,
this would be done with annunciator segments in the
LCD. However, I want to use low-cost stock parts, so
a custom LCD with annunciator segments isnt an
option.
The LCD I
chose is a four-digit display with three decimal points,
a colon, and an arrow. Because I have no real use for
the arrow, I decided to use it as the mode indicator.
The colon
is used in the time mode, so I only need to discriminate
among three modespower, energy, and average power.
I decided that no arrow indicates power mode, a slow-flash
arrow means energy mode (1-Hz rate), and a fast-flash
arrow is used for the average-power mode (2-Hz rate).