3–397
Motorola Sensor Device Data
For More Information On This Product,
Go to: www.freescale.com
+
–
+
–
+
–
+
–
Figure 2. Amplification Scheme
R5
1K
R7
10
R8
10
R6
1K
R11
1K
R9
1K
R10
500K
R12
500K
V2sensor
V4sensor
Vout
Vcc
C5
0.1
μ
F
14
6
5
7
2
3
1
9
10
8
13
12
11
4
Vcc
VA
VC
VB
Microprocessor
To provide the signal processing for pressure values, a
microprocessor is needed. The MCU chosen for this
application is the MC68HC908QT4. This MCU is perfect for
appliance applications due to its low cost, small 8–pin
package,
and
other
on–chip
MC68HC908QT4 provides: a 4 channel, 8–bit A/D, a 16–bit
timer, a trimmable internal timer, and in–system FLASH
programming.
The central processing unit is based on the high
performance M68HC08 CPU core and it can address 64
Kbytes of memory space. The MC68HC908QT4 provides
4096 bytes of user FLASH and 128 bytes of random access
memory (RAM) for ease of software development and
maintenance. There are 5 bi–directional input/output lines
and one input line that are shared with other pin features.
The MCU is available in 8–pin as well as 16–pin packages
in both PDIP and SOIC. For this application, the 8–pin PDIP
was selected. The 8–pin PDIP was chosen for a small
package, eventually to be designed into applications as the
8–pin SOIC. The PDIP enables the customer to reprogram the
software on a programming board and retest.
resources.
The
DISPLAY
Depending on the quality of the display required, water level
and water flow can be shown with 2 LEDs. If a higher quality,
digital output is needed, an optional LCD interface is provided
on the reference board. Using a shift register to hold display
data, the LCD is driven with only 3 lines outputted from the
microcontroller: an enable line, a data line, and a clock signal.
The two LEDs are multiplexed with the data line and clock
signal.
Figure 3. Multiplexed LCD Circuit
HC908QT4
HC164
LCD
EN
RS
RW
DB0
A
B
CLK
PTA4
PTA3
PTA5
R3
1K
R2
1K
Multiplexing of the microcontroller output pins allows
communication of the LCD to be accomplished with 3 pins
instead of 8 or 11 pins of I/O lines that are usually needed.
With an 8–bit shift register, we are able to manually clock in 8
bits of data. The enable line, EN, is manually enabled when
8 bytes have been shifted in, telling the LCD that the data on
the data bus is available to execute.
The LEDs are used to show pressure output data, by
displaying binary values that correspond to a pressure range.
Leak Detection or water–flow speed is displayed by blinking
a green LED at a speed relating to the speed of water flow. The
Red LED will display the direction of water flow. Turning the
Red LED off signifies water flowing into the tub. Turning the
Red LED on signifies water flowing out of the tub, or there is
a leak.
Digital values for water height, rate of water flow, and
calibration values are displayed if an LCD is connected to the
board.
OTHER
This system is designed to run on a 9V battery. It contains
a 5V Regulator to provide 5V to the pressure sensor,
microcontroller, and LCD. The battery is mounted on the back
of the board using a space saving spring battery clip.
F
Freescale Semiconductor, Inc.
n
.