Skip to content

graffenwalder/growPi

Repository files navigation

growPi

Raspberry pi, with GrovePi+ to read plant data. Data is saved to temp.csv. Takes a picture on every interval. If moisture readings are "Dry" for 3 consecutive intervals, the waterpump will activate.

Sensors: moisture, light, temperature, humidity and distance.

growPi

Hardware

Setup

  1. Download and burn Raspbian to SD card.
  2. Do initial Raspbian setup, make sure to setup an internet connection.
  3. Update Raspbian:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade
  1. Attach GrovePi+ To Raspberry Pi and run:
$ sudo curl -kL dexterindustries.com/update_grovepi | bash
$ sudo reboot
  1. After reboot run:
$ sudo i2cdetect -y 1
  • If the install was succesfull, you should see "04" in the output.
  • See GrovePi Setup if unsuccesfull.
  1. Connect waterpump to Mini Fan board:
  • Carefully take off the plastic shell of both the jumperwires, on one end.
  • Pull the waterpump wires through the small holes of the shells.
  • Put the waterpump wires in the stripped opening of the jumperwires and attach them with some plyers
  • Pull back the shells.
  • Attach the other end of the jumperwires to the Mini Fan board, where the Mini Fan plug normaly goes.
  • Attach aquarium tubing and put in watercontainer. waterpump
  1. Connect sensors to the GrovePi ports:
Module/Sensor Port
Moisture Sensor A0
Light Sensor A1
Mini Fan board (waterpump) D2
LED Red D3
Temperature & Humidity Sensor D4
Ultrasonic Ranger D6
LCD RGB Backlight IC2

Feel free to use different ports, just be sure to change them in growpi.py.

Website Setup

website screenshot

  1. In your growpi directory, create a file called secrets.py.
  2. Inside it fill out your ftp url, username and password:
FTP_URL = '<your_ftp_server>'
USERNAME = '<your_ftp_username>'
PASSWORD = '<your_ftp_password>'
  1. Copy the contents of the website directory, to the root of your website.
  2. Launch growPi:
$ python growpi.py

ToDoList

  • Base script
  • Add Sensors: Moisture, Temperature, Humidity, Light
  • Add red led as indicator for low moisture
  • Add display, that displays current data
  • Save sensordata to csv file
  • Add camera
  • Add waterpump
  • Write watering logic
  • Write waterpump setup
  • Get stable sensor data from Ultrasonic Ranger
  • Make Webapp/site that auto updates with sensordata
  • Add Jupyter notebook with EDA if interesting
  • Should really change ledmoist.py filename

Notes

  • The waterpump in this setup produces about 5ml/second. Make sure to test how much your setup produces, results may vary.
  • If you don't want to use the website, just remove all uploadCSV() and UploadImage() functions from the main loop.
  • If you want to get the timelapse video, download timelapse.py and secrets.py, and run timelapse.py on your local machine. Or upload them to a server and add timelapse.py to a cronjob, so the video will get updated automaticly.

About

Raspberry Pi and GrovePi, connected to small plant. Stores all sensor readings and auto waters the plant.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published