Coder Social home page Coder Social logo

watermonitor_controller's Introduction

Water Tank Diagram

Watermonitor Controller

Well water pumphouse esp8266 nodemcu 1.0 microcontroller project for monitoring the depth of a water tank and room temperature, reporting to the io.adafruit.com.

Installation

Dependencies required to build this...

Boards

Configure Arduino IDE for esp8266

Install the esp8266 boards through the Arduino IDE APP

Tools->Board->Board Manager

Search for "esp8266"

Libraries

Adafruit Unified Sensor by Adafruit (Tested with 1.1.9)
DHT sensor library by Adafruit (Tested with 1.4.4)
ArduinoJson by Benoit Blanchon (Tested with 6.21.2)
Adafruit MQTT Library by Adafruit (Tested with 2.5.4)

Configuration

Open the project with your favourite Arduino IDE. I use Visual Studio Code, but it should work from the default Arduino IDE

Create a file called configData.h and include two macros, WIFI_SSID and WIFI_PASSPHRASE like this

#define WIFI_SSID "MyWifiName"
#define WIFI_PASSPHRASE "MyWifiPassword"

Create an account at io.adafruit.com. Create a file called configAdafruitMqtt.h and define the following macros with the appropriate values.

#define AIO_SERVER      "io.adafruit.com"
#define AIO_USERNAME    "Your Adafruit account name"
#define AIO_KEY         "Your Adafruit key"
#define AIO_SERVERPORT  1883

Wiring

A design and components are available on EasyEDA. You can also order PCBs directly from them from them with this design. Note that the pin usage is slightly different than the code to make the PCB design a bit simpler. The code will be updated with the changes.

Circuit Diagram PCB Layout

Download and order the PCB

Output

When the data is regularly published to io.adafruit.com, you can create a dashboard of various stats, including water depth, distance from sensor to water, temperature, and humidity.

Here is a 1 week duration depth chart showing the changes in water depth as the tank is filled and drained. Example io.adafruit.com Water Depth Chart

Final Result

Final Water Tank Monitor Device

See Also

The original server project watermonitor_server. The intention was for the monitor to post to this server, but using the MQTT server at io.adafruit.com was easier. The server may find a dual purpose as a trigger notification from io.adafruit.com to trigger emails when exceptional events occur.

watermonitor_controller's People

Contributors

kokuda avatar

Watchers

James Cloos avatar  avatar

watermonitor_controller's Issues

Add lowpass filter to output data

Add new feeds of data that include a lowpass filter to smooth the inconsistencies in reported data. The cheap sensors are not calibrated or consistent over small periods of time and the graphs would be less jittery if the random variations were smoothed.

Adafruit.io does not appear to support filtering the data for the graphs, so it will have to be done at the source.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.