sylvainkalache / water-height-sensor

Arduino based sensor to measure Fort Lauderdale canal water height

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code for an D1 Mini pro to measure water height via a JSN-SR04T and send the result to IFTTT that will send it to a Google spreadsheet. enter image description here

Project goal

There are only a few tide sensors in Fort Lauderdale's new river; after Andrews Avenue bridge, there are none. With 300 miles of canals, many owners don't know the water level in their canal at a given time. This can be an issue if there is a fixed bridge and high water levels mean that you cannot get out or get back home. A low water level could mean that you run your board aground.

That's why I decided to build a custom made arduino-based tide sensor. By placing it on my dock, I can have live data on the water height and decide if it's a good time to take the boat out. enter image description here

What the code does

The code is well document but in a nutshell. The board connects to the wifi and uses the JSN-SR04T to take 5 measurements. If the measurements match (within 1cm close), it is sent to IFTTT, if they do not, another 5 measurements are taken until they do match. This loop happens every 5 minutes.

Wiring schema

enter image description here Make sure to use D1 and D2. I tried using other ports to connect to the JSN-SR04T and it would not work.

For the instruction ESP.deepSleep(300e6); to work – which puts the board in deep sleep for 5 minutes - you must connect D0 with the Reset pin.

Note: the ESP board on the schema isn't an exact reproduction pin-wise

Box setup

We get some rough weather here in Florida and the air is often pretty humid, that's why I decided to go with an IP65 box that would be weatherproof.

Because JSN-SR04T angle is super wide (75°) I had to move the sensor away from my dock using a PVC pipe. I used PVC because it is cheap and light, easy to cut, and the box can handle it's weight

Requirements

Hardware

What's needed for this project:

About

Arduino based sensor to measure Fort Lauderdale canal water height

License:Apache License 2.0


Languages

Language:C++ 100.0%