3–398
Motorola Sensor Device Data
For More Information On This Product,
Go to: www.freescale.com
Table 2: Parts List
Ref
Qty.
Description
Value
Vendor
Part No.
U2
C1
C2
C3
D1
D2
S2,S3
U1
U3
U4
R1
R2
R3,R6
R4,R5
R7,R8
R9,R10
U6
U5
1
1
1
1
1
1
2
1
1
1
1
1
2
2
2
2
1
1
Pressure Sensor
Vcc Cap
Op–Amp Cap
Shift Register Cap
Red LED
Green LED
Pushbuttons
Quad Op–Amp
Voltage Regulator
Microcontroller
W Resister
W Resister
W Resister
W Resister
W Resister
W Resister
LCD (Optional)
Shift Register
1
Motorola
Generic
Generic
Generic
Generic
Generic
Generic
ADI
Fairchild
Motorola
Generic
Generic
Generic
Generic
Generic
Generic
Seiko
Texas Instruments
MPXM2010GS
0.1uF
0.1uF
0.1uF
AD8544
LM78L05ACH
MC68HC908QT4
5V
8pin
22K
2.4K
1.2M
1.5K
10K
1K
16x2
L168200J000
74HC164
Smart Washer Software
This application note describes the first software version
that was available. However updated software versions may
be available with further functionality and menu selections.
Software User Instructions
When the system is turned on or reset, the microcontroller
will flash the select LED and display the program title on the
LCD for 5 seconds or until the select (SEL) button is pushed.
Then the menu screen is displayed. Using the select (SEL)
pushbutton, the user can scroll through the menu options for
a software program. To run the water level program, use the
select button to highlight the “Water Level” option, then press
the enter (ENT) pushbutton. The Water Level program will
display current water level, the rate of flow, a message if the
container is “FILLING”, “EMPTYING”, “FULL”, or “EMPTY”,
and a scrolling graphical history displaying data points
representing the past forty level readings.
The Water Level is displayed by retrieving the digital voltage
from the internal A/D Converter. This voltage is converted to
pressure in millimeters of water and then displayed on the
LCD.
Calibration and Calibration Software
To calibrate the system, a two–point calibration is
performed. The sensor will take a calibration point at 0mm and
at 40mm of water. Hold down both the SEL and ENT buttons
on system power–up to enter calibration mode. At this point,
the calibration menu will be displayed with the previously
sampled offset voltage. To recalibrate the system, expose the
sensor to atmospheric pressure and press the SEL button
(PB1). At this point, the zero offset voltage will be sampled and
saved to a location in the microcontroller memory. To obtain
the second calibration point, place the end of the plastic tube
from the pressure sensor to the bottom of a container holding
40mm of water. Then press the ENT button (PB2). The
voltage output will be sampled, averaged and saved to a
location in memory. To exit the calibration mode, press the
SEL (PB1) button.
Figure 4. Water level system set–up for demonstration
–40 cm
–35 cm
–30 cm
–25 cm
–20 cm
–15 cm
–10 cm
– 5 cm
Converting Pressure to Water Level
Hydrostatic Pressure that we are measuring is the pressure
at the bottom of a column of fluid caused by the weight of the
fluid and the pressure of the air above the fluid. Therefore, the
hydrostatic pressure depends on the air pressure, the fluid
density and the height of the column of fluid.
P= Pa +
ρ
g
h
where P = pressure
Pa = pressure
ρ
= mass density of fluid
g = 9.8066 m/s^2
h = height of fluid column
To calculate the water height, we can use the measured
pressure with the following equation, assuming the
atmospheric pressure is already compensated for by the
selection of the pressure sensor being gauge:
h = P \
ρ
g
F
Freescale Semiconductor, Inc.
n
.