Coder Social home page Coder Social logo

auto-waterer's Introduction

Auto watering system using Raspberry Pi

This is a software package for a Raspberry Pi based automatic watering system built with an analog moisture sensor. The software design supports up to four independently managed plants (each handled by one sensor and one pump). Besides monitoring moisture and watering as needed it also captures measurements and pump activity in a database and charts stats in a web diagram. Hardware is only covered to clarify compatibility, this is not a step-by-step guide on wiring your system (see for example here for a guide on wiring everything together).

Also provided are 3d print models for the enclosure of the control unit as well as an adapter to spread water evenly over the surface of the pot.

Software

Starting from Raspbian Lite OS install perform the following steps:

  • raspi-setup - configure wifi, locale and in Interfacing Options enable I2C
  • apt-get install sqlite3
  • apt-get install libsqlite3-dev
  • apt-get install i2c-tools
  • apt-get install python-smbus
  • pip install pysqlite
  • pip install flask
  • pip install adafruit-ads1x15

Unpack this software to /home/pi

To detect moisture and possibly water the plant periodically, run:

crontab -e

Add this line to the bottom to run every 2 hours

* */2 * * * (cd /home/pi/pi_auto_waterer/ || exit 1; sudo python ./auto_water.py)

To start the web server automatically, add the following line to /etc/rc.local

python /home/pi/pi_auto_waterer/web_plants.py &

Edit config.json to match your hardware configuration (e.g., GPIO assignments) as well as the watering parameters appropriate for your plants. The stats web site is available at the root of your device, ie. http://<IP address of your Pi here>

Hardware

This software is built for the following hardware. Since a single AD converter can handle up to four separate analog signals, it is easy to modify the hardware configuration by adding sensors and using a relay with more channels to support up to four plants.

Box

You can 3d-print the box to put everything in using the included STL files. You will need the following fasteners:

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.