Water Level Sensor/Alarm System for MAXQ3210 Controller
The MAXQ3210 ia a powerful RISC microcontroller. This device have features and capabilities to make it compatible for battery-powered applications that detect a condition and sound on alarm. Piezoelectric horn driver, 5V to 9V regulator, and analog voltage comparator support a minimal component count system are integrated on this microcontroller. Additionally, this microcontroller is allowed to operate for significant periods when powered by a 9V battery by various low-power modes, including Stop mode and Wake-up timer.
The upper part of the figure shows a water sensor probe. This probe is made using a piece of scrap plastic material drilled to snugly hold the leads fashioned from a paperclip. The spacing between these leads is subjectively and arbitrary depend on the available materials. A 4-pin connector with 0.1 spacing lets it to be plugged directly into connector J4 (pins 9-P0.4, 11-P0.5/CMPI, and 13-P0.6) of the MAXQ3210 evaluation board to connect the sensor. A 1.0 Mohm resistor (visible in the picture inline with one of the wires near the connector) is soldered directly to one of the connector pins and this resistor will work as a pull-up for one lead of the sensor.
The lower part of the figure shows a schematic diagram of the water sensor probe’s connections to the processor. The MAXQ3210’s built-in analog comparator’s input CMPI, P0.5 is connected to the one side of the sensor. 1.0 Mohm also connected to this input, which is, in turn, connected to the processor’s port pin, P0.6. P0.6 as an output and sets it high as part of the system initialization is configured by the software. This configuration pulls CMPI up close to VCC under normal conditions (i.e., sensor leads not immersed) because of the comparator’s high input impedance. Port pin P0.4 which is configured as an output pin and set low is connected to the other side of the sensor. The water’s conductivity forces the comparator’s input to be pulled down toward ground when the two sensors leads are immersed. The comparator’s output CMPO changes state when this occurs. [Source: MAXIM Application Note]