PiPlanter 2 | DIY Lite Version Release!

Since I returned to college the PiPlanter has been running without me having to do any maintenance on it at all. The plants are still alive and growing and all processes associated with the PiPlanter are still going. I figure now is a good a time as any to bring together all of the work I’ve done to till this point in one concise post.

This does NOT mean I’m done working on future versions of the PiPlanter. I’ll hopefully write another post stating goals for the future sometime soon. Now onto the build tutorial.


The Hardware


First, the hardware of the project. A good place to start would be the parts list:

In the previous version of the PiPlanter, I didn’t have a concrete parts list for the project. Hopefully I’ll be able to keep this spreadsheet updated if the project changes. A lot of these components are mix and match, you could use pretty much any pump (The math for volumetric pumping is done with this pump) or any tubing or any power supply that can do 12v and 5v. A computer PSU would work great as well.

This is the hookup guide for the system:

(Thanks to tamps for the help!)

The two sets of header blocks are to be replaced by the moisture sensors, and the motor replaced with the pump.

For a physical configuration, I’ve found through multiple times doing this that mounting it on a wire rack works the best as seen here:

Edit (10/19/2014) Here is the same group of plants two months later without any direct human interaction. They grew from the light in the window and used up all of the water in the reservoir which was totally filled before I left.

To distribute the water to the plants, attach the vinyl tubing to the outflow of the pump and seal off the other end of the outflow tube. Run the tubing along the plants and drill holes wherever you’d like the water to exit.

You’ll also need to install the camera module in the Pi and point it wherever you’d like the frame of the photo to be.


The Software

As a preface, I’d like to at first say that this software was written entirely by me. I’ve never had any formal training in programming of any kind, so if there are obvious flaws with my code please let me know. That being said, I’ve found that this system is very effective and has worked for me and kept my plants alive for months.

All of this runs off of a base install of raspian on a raspberry pi model b.

There three major parts to the software. First, the prerequisites:

You’ll need to enable SPI on your Pi in order to use the MCP3008 ADC. Do this by running the following commands:

Comment out the spi-bcm2708 line so it looks like this:

Then run this to make it more permanent.

And finally reboot your Pi with:

Then the php code that renders the pChart graph. More details for installing pChart here and officially here.

And now the star of the show, the python script:

Before running, make sure you make the following changes to the script:

You’ll need set up access to twitter API’s, seen here. You’ll need to input your information about your twitter app into into 331-334 of this script.

You’ll need to input information about your YouTube account on line 429

On line 473 you’ll need to input your mysql information.


Output Demos

The PiPlanter is very connected. It renders graphs of data, takes images and renders timelapse videos.

Here’s a standard tweet showing the plants:

Here’s a tweet showing a day’s worth of data in  a  graph render:

Here’s a tweet showing a week’s worth of data in a graph render:

Here’s a timelapse video of three days:

Follow @PiPlanter_Bot for updates on my plants.

That’s pretty much it! Please feel free to modify this code for any use you’d like.

All of my research on this project can be found here.

Thanks for reading, and please leave a comment if you like my work!

Hey! This post was written a long time ago, but I'm leaving it up on the off-chance it may help someone. Proceed with caution. It may not be a good idea to blindly integrate this code or work into your project, but instead use it as a starting point.


  1. Thanks for sharing all the work you put into this. I think I’ll give it a try. Can you offer a recommendation for the light sensor and the thermistor? They appear to be on your diagram but not in your parts list.

  2. Amazing project! Is it still going?
    I’m about to attempt your instructions, just waiting for two more parts, so should start putting it all together early next week.
    Any advice you can offer before I begin?


  3. Very cool! I always dreamed of having something like this to grow fresh herbs without having to look at them. As you say you didn’t work on it anymore, however I am curious are you still using it?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.