Skip to content

Code for an ESP8266-based device that measures the water level with a float switch

License

Notifications You must be signed in to change notification settings

MasterFox/WifiWaterSensor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

This repository contains the code and 3D source files to create a simple water level sensor that can be attached to a bucket of water, e.g. on your balcony, from which you're watering your plants using self-watering probes.

Parts

You will need a few things to assemble the water level sensor:

These parts cost about $1 each.

  • A 18650 lithium ion battery. Available e.g. at Amazon. Don't take the cheapest ones.
  • A programmable microprocessor with Wifi, e.g. the Adafruit ESP8266 Huzzah or a generic NodeMCU board. Maximum size about 25mm x 50mm.

These parts cost about 10$ each.

  • You'll probably need a soldering iron and some cables.

And last but not least a 3D printer to print the enclosure and inner structure that holds all these things together.

Assembly

image

  • Download the STL files from thingiverse.com and print them.

  • Connect battery holder and charging circuit e.g. by soldering them together.

  • Connect charging circuit and ESP8266 board with (female) jumper cables. (That's important! Don't solder them together. I had problems flashing the chip when it ran directly off the battery. Probably because the battery provides more than 3.3V which may have confused the USB-serial converter.)

  • See the documentation of the ESP8266 board that you use. You probably need to connect GPIO16 to the RESET pin to enable deep sleep mode. Other boards than the Adafruit board may require more connections to work at all.

  • Stick float switch cables through the hole in the outer sensor enclosure. Connect them to the Wifi board. One cable goes to GND, the other to GPIO13. Again, it may be a good idea to solder the switch cables to female breadboard connectors.

  • Glue everything in place. I used strong double-sided foam tape.

Attention: Be careful with Lithium batteries. I have not tested the enclosure for safety. It is certainly not entirely weather-proof. Safety will depend on your choice of batteries, battery protection circuits, charging circuits etc. I do not take any responsibility if your batteries suddenly catch fire.

Flash

  • Change Wifi configuration in sketch/sketch.ino and register at thingspeak.com. Also insert your thingspeak.com API key.
  • Again, see the docs for your ESP8266 board on how to flash it.

Finish

  • Insert a battery, put everything inside the enclosure and close it with two screws.

About

Code for an ESP8266-based device that measures the water level with a float switch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 54.8%
  • Other 40.5%
  • C 4.7%