Wireless Water Level with the AD-101 Bubble Sensor and XBee3

image

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

Enclosure and Connectors

Supplier Documentation

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.