circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

September 2006, Issue 194

Multifuctional Wireless Alarm
Freescale Wireless Design Challenge 2005


by Carl Smith


StartSystem Overview Installation & Operation Garage Door Module Water Level Module Temperature Module Hardware Design Garage Door Sensor Water Level Sensor Temperature Sensor Software Design Improvements Peace of Mind Sources and PDF

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 compensation and calibration circuitry, which allows for a simple and reliable 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 electrical 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 came with the contest kit, and an additional board for signal amplification and conditioning (see Figure 2, p.33). The signal amplification circuit is an adaptation of the one described in Michelle Clifford’s 2004 application note, “Water Level Monitoring” (Freescale).

cc

(Click here to enlarge)

Figure 2—The MPX2010GS sensor measures the water level by the air pressure in the tube. The op-amp circuitry changes the differential sensor signal to a ground-referenced signal and amplifies the signal to a range appropriate for the MC13192 SARD board’s analog input.

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 equally well, as should any 5-V single supply 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 summarize it here. The pressure sensor’s output is a differential signal not referenced to ground. The amplifier converts this differential voltage to a ground-referenced, single-ended voltage 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 follower to drive the ADC.

Five-volt power for the pressure sensor and 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.

cc

(Click here to enlarge)

Photo 2—Check out the completed water level sensor unit. The MC13192 SARD PCB, pressure sensor PCB, battery, and signal conditioning circuit are mounted in a standard black project box.