Project
by Michael Simpson
The Ultimate Utility Meter
Part 1 — The Basic Components
In December 2001, I wrote an article in Nuts & Volts
called the “Digital Utility Meter.” It was a great success
and many readers built the meter. I think the reason it
turned out so well was the fact that I used the meter to aid
in many of my own projects.
Several months ago, I started a project where I needed to interface a microcontroller to a PC keyboard, and I
was having problems getting it to work with several types
of keyboards. My scope was no help. What I needed was
a multi-channel logic analyzer, so I put my current project
on hold and decided to build one.
After several attempts, I came up with the technique
of capturing the logic data and sending the information to
Figure 1. The completed project.
a PC, where a special program (shown in Figure 2) would
display the results.
After adding a few features and options to the meter, I
solved my original problem and found myself using the
analyzer quite a bit. It won’t compete with a $2,000.00 logic
analyzer, but it has solved most of the problems I have had
while trying to interface my microcontrollers to various
chips and sensors. Best of all, it only cost me about $50.00
and provided me with a tool that I could expand on.
One downside to a PC-based analyzer is that you
must use a PC. While this is okay for some, I constantly
find myself needing the PC for other aspects of the
project. After thinking a bit, I decided that I could build a
small interface that could replace the PC. I could use a
graphic LCD and a second microcontroller. After much
experimenting, I came up with a nice little stand-alone
graphic analyzer. Later, I added a signal generator and
an eight-channel logic probe.
I used the analyzer for a few months and realized I
could add two three-position DPDT switches and gain
access to each of the microcontrollers independently.
With the flip of a switch, I could connect the LCD
controller directly to my PC, and this feature gave me a
serial graphic LCD.
I could also program either microcontroller in place
at the flip of a switch. This allowed me to use the
Ultimate Utility Meter (UUM) as a bench test for other
projects. For example, I was working on a
special digital thermostat for my house and
could not detach the thermostat from the wall
and take it into my lab for any length of time.
In the middle of winter, the family starts to
complain once the house temperature drops
below 60 degrees F. I found myself running
back and forth, as I tested and debugged the
thermostat. After about the 20th trip, I decided to replicate my thermostat project using
the UUM. With very little effort, I created a test
bed for my thermostat project.
Figure 2. Logic data is captured and sent to a PC where it can be displayed.
F
o
r
E
l
e
c
t
r
o
n
i
c
s
NUTS & VOLTS
E
v
e
r
y
t
h
i
n
g
The Ultimate Utility
Meter is Born
50
This is a large project, and I will present it
in two parts. In Part 1, I will show you the construction of the basic components. When it’s
complete, you will have a working serial graphics LCD that you can start experimenting with.
JULY 2005