34
Issue 194 September 2006
CIRCUIT CELLAR
®
www.circuitcellar.com
The minor exception I mentioned
earlier is power management. One of
the great things about the 802.15.4
wireless networking standard and the
protocols that build on it (e.g.,
Freescale’s Simple MAC and Zigbee) is
low-power consumption. Units can
sleep the majority of the time and
thereby reduce the average power.
Unfortunately, with the hardware pro-
vided for the Wireless Design
Challenge, there was no way to put
the accelerometers or serial port chip
on the MC13192-SARD board into
Power Down mode, so I couldn’t
implement a low-power Sleep mode.
With a custom PCB, I could have
included power control for these com-
ponents as well.
WATER LEVEL SENSOR
The water level sensor module
enables you to monitor the level of
water in a sump pump hole. You
could also use it to detect water
levels in a bathtub or hot tub.
The water level sensor is
designed around a Freescale
MPXM2010G pressure sensor. This
sensor works well because it has
on-board temperature compensa-
tion and calibration circuitry,
which allows for a simple and reli-
able design. One end of a tube is
connected to the pressure sensor
and the other is placed in the sump
pump hole. The use of a pressure
sensor gives you the flexibility to
calibrate the trip level and avoid elec-
trical contacts that may corrode when
repeatedly exposed to water.
The water level sensor design is
based on a Freescale MC13192-SARD
PCB, a MPXM2010 breakaway board
that cam
e with the contest kit, and an
additiona
l board for signal amplification
and conditioning (see Figure 2, p.33). The
signal amplification circuit is an adapta-
tion of the one described in Michelle
Clifford’s 2004 application note, “Water
Level Monitoring” (Freescale).
The Analog Devices AD8544 is
available only in a surface-mount
package, so I used two AD822 dual op-
amps instead. The AD822 is a DIP
package, which makes construction
easier, and I already had some on
hand. The AD8544 should work equal-
ly well, as should any 5-V single sup-
ply capable rail-to-rail op-amp. The
other change I made to the application
note design was to double the gain to
increase the sensitivity in the range
that is useful for this application. The
application note describes the process
of measuring the water level in a
washing machine tub, which is much
deeper than the range necessary to
detect a filling sump pump hole.
I will leave it up to you to read the
AN1950 application note for a more
detailed description of the amplifier
circuit’s operation. But let me summa-
rize it here. The pressure sensor’s out-
put is a differential signal not refer-
enced to ground. The amplifier con-
verts this differential voltage to a
ground-referenced, single-ended volt-
age appropriate for the MC9S08GT60
microcontroller’s ADC. An op-amp is
connected to each output of the sensor
to buffer the signals and add a small
offset to the positive sensor output.
The difference is amplified by a third
op-amp circuit with a gain of 1,000 to
scale the sensor’s several millivolt
range (in this application) to a range
useful for the microcontroller. A
fourth op-amp is a simple voltage fol-
lower to drive the ADC.
Five-volt power for the pressure sen-
sor an
d amplifier circuitry is obtained
by a connection to TP104 on the solder
side of the MC13192-SARD PCB.
Ground is obtained from the J101 BDM
port pin 2. The signal is connected to
the ATD2 input on pin 3 of J105.
The MC13192-SARD PCB, pressure
sensor, amplifier circuit board, and
9-V
battery
were all mounted in a black
plastic project case for protection.
Instead of a 9-V battery, power may be
supplied by an external power source,
such as the wall plug power supply
supplied with the kit, by plugging
power into the J106 power plug on the
SARD. Photo 2 shows the completed
water level sensor.
TEMPERATURE SENSOR
The temperature sensor module is
another simple design. With the high
level of hardware integration on the
MC13192-SARD PCB, all you need is
a National Semiconductor LM34 pre-
cision Fahrenheit temperature sensor.
The measurable temperature
range is 0° to 256°F. The upper
limit is the result of the 8-bit data
field in which the temperature is
transmitted to the base. And
although the LM34 can measure
below 0°, this requires a negative
supply. That would have complicat-
ed the design so it wasn’t necessary
for the application (to measure the
proper operation of an HVAC
sys-
tem or watch for temperatures that
may cause water pipes to freeze and
burst). Measurement from 0° to 256°F
is sufficient for these purposes
.
Connections for the LM34 sensor
are shown in Figure 3. Like the
water level sensor, 5-V power for
the temperature sensor is obtained
Kommentare zu diesen Handbüchern