Introduction
A water level is an age old tool still in use today that provides a simple means of matching elevations between two different points. For this project a retail water level was modified by adding a sensor and wireless link to provide a visual indication when the “level position” between two points is met. TE Connectivity’s AD-101 non-invasive sensor detects presence of a break in flow of any type of liquid in 4mm tubing that has been inserted into the sensor’s “u” shaped channel. For the water level project the AD-101 is simply used detect presence of water in a 4mm tube. The retail water level was modified by adding a 4mm tube in parallel with the main tube to provide an interface for the TE sensor. A pair of Digi International XB3 2.4GHz wireless modules provide a wireless link between the sensor and remote visual indicator. Since there are only two wireless nodes in the system, Digi International’s point-to-point 802.15.4 wireless protocol for the XB3 is used for wireless communication. MicroPython scripts running on the XB3 modules monitor the sensor, control the LED indicator and setup/maintain the wireless link.
Hardware Utilized
- XB3-24Z8US-J Digi XBee3 RF Module at Digi-Key (note: module was re-programmed with 802.15.4 firmware)
- XBee SMT Grove Development Board at Digi-Key
- TE Connectivity AD-101 Air Bubble Detector at Digi-Key
Enclosure and Connectors
-
PN-1323-CMB Bud Industries enclosure at Digi-Key
-
T4070014041-001 TE M8 male, panel mount, 4 position connector at Digi-Key
-
T4070014031-001 TE M8 male, panel mount, 3 position at Digi-Key
-
1-2273003-1 M8 female, cable assembly, 4 position
-
1-2273001-1 M8 female, cable assembly, 3 position
-
1528-1126-ND 2 pin JST PH 2mm connector / cable assembly (Grove battery connector) at Digi-Key
-
1597-1092-ND 4 pin Grove connector / cable assembly at Digi-Key
-
ARF2406-ND U.fl to RP-SMA adaptor
Supplier Documentation
- Digi International Digi XBee3® 802.15.4 User Guide
- Digi International Digi MicroPython Programming Guide
- Digi International Xbee Grove Development Board User Guide
- TE Connectivity AD-101 Bubble Detector Datasheet
Sensor Hardware Setup / Wiring Diagram
The sensor hardware consists of an XB3 wireless module mounted in a Xbee Grove board, AD-101 sensor and LED indicator. The XB3 checks the sensor output logic level once a second, sends the sensor output level to the remote over the wireless link and controls the LED indicator based on the sensor output.
Remote Hardware Setup / Wiring Diagram
The remote hardware consists of an XB3 wireless module mounted in a Xbee Grove board and an LED indicator. The XB3 receives the sensor output logic level once a second and controls the LED indicator based on the sensor level.
Prototype Setup
Example Code
Description
MicroPython scripts running on two XB3 modules implement a wireless link, sensor monitor and LED level indicator. The TE8_sensor_end.py script runs on the XB3 monitoring the AD-101 sensor and TE8_remote_coord_r1.py runs on the XB3 controlling the remote LED “level” indicator. Digi International’s 802.15.4 protocol example code is used to implement the wireless link (the coordinator is implemented on the remote XB3 and an end device on the sensor XB3). State of the sensor is read once a second and sent to the remote over the wireless link.
Field Test
Wireless Hardware
The two XB3 Grove boards were mounted in Bud Industries IP67 rated enclosures fitted with IP67 rated panel mount TE Connectivity M8 connectors and Amphenol RP-SMA antenna connectors for use in field testing. M8 based cable assemblies were built for the TE AD-101 sensor, power input and LED level indicator. The two XB3 enclosures are connected over a wireless link that transmits sensor status and controls a LED to turn on or off.
Water Level Test Setup
For testing, the modified water level was connected to a standard garden hose filled with water and the 4mm tube inserted into the AD-101 sensor. The test consisted of raising and lowering one end of the water level to change the sensor output state and control the LED level indicator.