Maker.io main logo

Wireless Water Level Sensor Using the Xbee3

2019-10-22 | By Scott Raeker

License: See Original Project XBee

This project uses a retail water level setup with a few modifications to add the capability of wireless level sensing. Water levels have been used for centuries to help match elevation between two points. This technique was used in applications such as building structures, placing fence posts, and many other building or structural needs.

To create this wireless water level, a 4mm tube was added in parallel (holes were drilled at the top and bottom of the level, with the tube inserted and silicone in to allow us to add an air bubble sensor. The chosen sensor has a “U” channel that allows us to press fit the 4mm tube inside of the channel. This sensor can detect a break in liquid as small as 70% of the tubing’s inner diameter.

wireless_A

Two XB3 2.4GHz wireless modules are used to send the output of the sensor to the visual indicator. For wireless communication, Digi International's point-to-point 802.15.4 wireless protocol for the XB3 was selected. MicroPython scripts running on the XB3 modules are used to monitor the sensor’s output, control the visual LED indicator, and maintain wireless communication. Note: The XB3 RF Module was re-programmed with 802.15.4 firmware.

Sensor Setup and Schematic

The sensor apparatus consists of an XB3 wireless module that is mounted on an Xbee Grove board and connected to an AD-101 Sensor with an added LED indicator. The sensor output is tested in second increments. The XB3 then takes this reading and sends it to the remote wirelessly and updates the LED indicator state accordingly.

Schemeit_1

Remote Setup and Schematic

The remote hardware setup includes the same pieces as the sensor setup, minus the sensor. It consists of an XB3 wireless module that is mounted on an Xbee Grove board with an added LED indicator. Once every second the XB3 receives the sensor output and changes the LED indicator state based on the sensor level.

Schemit_2

setup_3

Example Code

https://github.com/eewiki/Xbee3-MicroPython/blob/master/samples/TE8_sensor_end.py

https://github.com/eewiki/Xbee3-MicroPython/blob/master/samples/TE8_remote_coord_r1.py 

Field Test

fabrication1_4

fabrication2_5

Fabrication

Bud Industries IP67 rated enclosures house both XB3 Grove boards. Connections are made using IP67 rated TE Connectivity M8 connectors and Amphenol RP-SMA antenna connectors. M8 based cable assemblies are used for the TE AD-101 sensor, LED indicator, and power input.

test_6

Water Level Test Setup

To test, a standard garden hose filled with water is connected to the modified water level (one end to each piece of the level as shown above). As one side of the level was raised or lowered, the sensor acted accordingly to indicate its accuracy.

制造商零件编号 XB3-24Z8US-J
RF TXRX MODULE 802.15.4U.FL SMD
Digi
¥191.45
Details
制造商零件编号 76000979
XBEE SMT GROVE DEVELOPMENT BOARD
Digi
¥285.95
Details
制造商零件编号 071-06403
AIR BUBBLE DETECTOR 4MM
TE Connectivity Measurement Specialties
¥929.89
Details
制造商零件编号 PN-1323-CMB
BOX PLASTIC 4.53"L X 3.54"W
Bud Industries
¥119.51
Details
制造商零件编号 T4070014041-001
CIRC CBL 4POS PLUG TO WIRE 0.66'
TE Connectivity AMP Connectors
¥77.25
Details
制造商零件编号 T4070014031-001
CIRC CBL 3POS PLUG TO WIRE 0.66'
TE Connectivity AMP Connectors
¥68.13
Details
制造商零件编号 1-2273003-1
CIRC CBL 4POS RCPT TO WIRE 4.92'
TE Connectivity AMP Connectors
¥133.90
Details
制造商零件编号 1-2273001-1
CIRC CBL 3POS RCPT TO WIRE 4.92'
TE Connectivity AMP Connectors
¥81.81
Details
制造商零件编号 261
CABLE ASSY JST PH 2PIN 4"
Adafruit Industries LLC
¥6.10
Details
制造商零件编号 110990210
GROVE 4PIN MALE JUMPERS 5PACK
Seeed Technology Co., Ltd
¥26.05
Details
制造商零件编号 336320-12-0250
CBL ASSY AMC-RPSMA JCK-PL 9.843"
Amphenol RF
¥262.84
Details
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum