Introduction: Wireless Pool Filter Pressure Sensor

I have a small in-ground swimming pool, with a sand filter. The filter occasionally needs to be backwashed, when the sand has filtered a lot of dirt from the water. The filter has a pressure gauge on the top, providing a PSI reading. The pressure reading is used to determine when it is time to backwash. For my setup, the filter starts clean at around 10 PSI, and needs to be backwashed at around 20 PSI.

OK, I'm lazy. I can see the pool from my window, giving me a overall visual of how the pool is doing. But if I want to know how the filter pressure is doing, I have to walk, ALL THE WAY OUTSIDE.

So, I thought I would see if I could develop a wireless pressure sensor to send the pressure reading to me.

Step 1: Arduino and XBee to the Rescue

These are the main parts I used for my wireless pressure sensor system. I chose the Arduino Nano because I already had a shield that fit nicely in an otterbox that I had on hand. You could use any arduino and shiield combination that works for you. You will need a shield for an XBee radio.

  1. Arduino Nano V3 (5V)
  2. Nano IO shield from iteadstudio
  3. XBee 2mW Wire Antenna - Series 2 (ZigBee Mesh) (qty 2, 1 for inside, 1 for outside)
  4. Otterbox for weatherproofing
  5. Generic Carbon Steel Alloy Variable Pump Water / Air Pressure Sensor(DC 5V)
  6. Anderson Metals Brass Pipe Fitting, Barstock Street Tee, 1/4" Female Pipe x 1/4" Male Pipe x 1/4" Female Pipe
  7. A generic 9V wall wart (DC convert for power)
  8. XBee Explorer USB

For inside the house, I have the 2nd XBee radio with the SparkFun XBee Explorer USB, attached to my computer.

Step 2: The Pressure Sensor

I searched for a long time trying to figure a way to get a pressure sensor into the system.

I knew that the top of the filter where the existing pressure gauge was attached, was the best place. And then I noticed a lot of nice brass fittings on Amazon. So it dawned on me that I could install a Tee fitting where the existing gauge is connected, and install my electronic sensor there. The sensor that I found is also on Amazon. The threads on the sensor are not exactly correct for the fitting, but it works. The brass fitting is "NPT", which is tapered, but with some teflon tape and a little thread sealant, it works fine.

The sensor takes a 5V supply, and gives an analog reading between 0.5V to 4.5V. I found this in the "product details" section on Amazon (the sensor came with no documentation). This is perfect for an arduino analog input pin. This is another reason why the Nano IO shield works well, the pins are broken out with 5V and GND conveniently next to each I/O pin. I'll talk more about reading the analog pressure later when we get to the code.

Step 3: Weatherproofing and Wiring

The arduino and shield obviously need to be protected from the elements. The sensor itself is very rugged and has a waterproof connector. I drilled 2 holes on opposite sides of the otterbox, 1 for the sensor connection, and 1 for the power supply. I sealed the holes with a little silicone sealant. This should keep everything dry. At this point, the weak link is probably the AC adapter. I have a protected outlet for the AC adapter, but the wire is not ideal for an outdoor application. I plan on replacing the wire with something better for outdoor use.

Step 4: Attaching to the Filter

Velcro is your friend. I used some velcro inside the otterbox to hold everything in place, and I used some rugged outdoor velcro to hold the otterbox to the side of the filter.

Step 5: The Code

I made the code a little more complicated than most people might want. You can use my code as an example, especially reading and translating the analog value into PSI.

But, I use the XBees in API mode. This is mostly because I am used to doing it that way. You can simplify your setup by simply programming 2 radios to automatically connect to each other in AT mode like a "wireless serial cable", if you desire. There should be many examples on the Internet for that.

Additionally, I encode the pressure reading into a little bit of XML. I might have gotten a little carried away, but it could be useful later.

The XML is sent once every second.

I also increment a counter that is sent with each reading, and a UUID, because again, I got carried away. The UUID is created with a library called TrueRandom. The sketch file is called, PoolPressure.ino.

Inside the house, I use Linux with the XBee Explorer USB. For this, I use Attie's awesome library, libxbee. The code simply connects to the remote radio, and logs whatever comes from the radio. For now, I simply look at the end of the file to see the latest pressure reading. The code for Linux is in the file, pool.cpp.

Step 6: Finished

I hope this project gives you ideas for your pool.

The code may be a little advanced for some, but can be simplified if you look at common examples of using XBee radios with arduino.

Please leave feedback. This is my first Instructable, I hope you enjoyed it. I will update to make things more clear if there are questions.


MichaelC867 (author)2016-12-24

Thank you for sharing! Your project has inspired me to take it a little bit farther and create a true IoT device, I planning to connect it with ESP8266 and create alerts in case of HI/LOEW pressure as well as calculate average pool running time.

bsmith5 (author)MichaelC8672017-01-23

HI there - I'm looking at doing very similar - how did you go connecting up the 4.5v sensor to the 1v A0 pin on the ESP?

MichaelC867 (author)bsmith52017-02-28

IIC I2C Logic Level Converter Bi-Directional 5V to 3.3V - suppose to do the conversion job, here is bunch of them on ebay:

bsmith5 (author)MichaelC8672017-02-28

Unfortunately that wouldn't work as far as I understand it. That is a logic shifter - not a voltage(?) shifter. This device allows you to receive data from a 5v devicem downshift the voltage to 3.3v and move the data on. For a pressure sensor the pressure value is represented as a voltage between 0 - 4.5(?)v. For an ESP I've read that the A0 pin can read only 0v to 1v. More than that can cause a reboot. So we would need to reduce the output of the maximum reading of 4.5v to 1v - and all the values down to 0v.

rkrayer (author)MichaelC8672016-12-24

Sounds great, I look forward to seeing an instructable on that.

bsmith5 (author)2017-01-23

Hi there!

This little number is on my to-do list!

I have a pressure sensor in my sights, as well as fittings for mounting. I intend to use a ESP8266 as I have a few around, they're tough as nails and they have built-in wifi. I intend to publish the pressure readings over MQTT to my home automation system.

Here's the catch - if the sensor outputs 4.5v for a high pressure reading - the ESP analogue in handles a max of 1v. You can see where I'm heading. How do I help the ESP cope - (if it was a digital i/o I could just use a 5v>3.3v logic step down - no such luck here).

I also intend to take water temp readings - I have a wireless thermometer in the pool - so this arduino will pull double duty - using RF to intercept the temp and post it to MQTT as well.

I'm eyeing off the pH too... but you should nibble a biscuit before you scoff the box!

Any tips?

rkrayer (author)bsmith52017-01-24


If I had it to start over again I would definitely consider the ESP8266.

I suggest looking for level shifter and perhaps combining with a multiplexer like this article combined a 74HC4051 with a level shifter circuit ( The multiplexer would allow you to add the pH and temperature sensors and more. It sounds like you have a solution for the temperature sensor already; I found a waterproof temperature sensor on Amazon that I plan to incorporate but have yet to get around to it.

Good luck.

KelemenL (author)2016-05-28

Thanks really helpful project.

DIY Hacks and How Tos (author)2015-07-12

Nice sensor project. Thanks for sharing.

About This Instructable




More by rkrayer:Wireless Pool Filter Pressure Sensor
Add instructable to: