Autonomous Plant Watering System

My project is a convenient way to water your plants when you don’t have the time to do it yourself. For my project I used an Arduino, Raspberry Pi, sensors, a pump, and a relay. It can be modified to your liking for how long you would like to water your plants and how often.

Here are the Build plan and the BOM.

I based my project off of this website.


Charlie Gross

Area of Interest

Mechanical Engineering


Junipero Serra San Mateo


Incoming Junior

BlueStamp was a great experience for me. I love to learn but had little experience in engineering. Very often the instructors would lecture us on basic things such as transistors, resistors, and a simple circuit. They also spoke about the various things that they learned in college. I had to work hard to figure out the many problems that I faced when trying to build my project. But I really enjoyed working to solve my problems. It felt really good when written code ran successfully on the screen. I had an issue for a week and tried so many different things to fix it that I ended up learning more through the troubleshooting process.  I think that engineering is a path in which I would like to take in college and hopefully in my free time I will continue to build and create projects.

Final Milestone

My final milestone is designing a housing case for my hardware as well as adding more functionality to my relay. I decided that I wanted the LCD screen to display on the outside of the box so that the user can see what is happening as they water their plants as well as when the plants need water. I drilled a hole and screwed in the LCD. I also wanted to conceal as much as a could, so I screwed In the Arduino, the Raspberry Pi, and the relay. The components coming outside the box through a wire hole are the bilge pump and the two sensors. I drilled a hole so that you can plug in the 12v adapter into the box and power the pump.The pump is connected to a switch . The reason for the switch is so that you can turn the relay on and off. This is useful because if you are not running your code and your pump is always on, then it will drown your plant. But, if you run your code then turn the pump on it allows for the pump to only turn on for what your programmed. This is a simpler way of plugging in the 12v powersupply after you run the code. The switch just makes the relay more user friendly and easy to use.

Second Milestone

My second milestone was getting everything working and being able to pump water to the plant. In my project, I was originally going to use wifi to connect to my pump. Through Amazon Web Services, I was going to be able to turn it on and off. Amazon was hard to work with because it required very stable wifi. Originally I thought the issue had to do with my code, either the host, port, or the certificate files. I even went into an AWS script in java and edited the throw error so that it would try and re-look up the wifi. At this point, I realized that the raspberry pi had inefficient hardware for connecting to the wifi. If I had more time I probably could have configured the wifi modem a certain way by connecting it with my raspberry pi using a static IP related to the modem, but I thought that there was an easier and better way to water my plants without using wifi given that I only had two days before I had to present my project. So I decided to delete all the AWS code in my index.js folder. This allowed for the sensors to display without using wifi. The next step was to figure out what to do with my pump. I thought about putting it on the arduino but the code for the pump combined with the Standard Firmata might cause a slight issue just because of the complexity of the Standard Firmata code. I looked in the index.js because originally the pump was going to be on the raspberry pi. I found the code for an LED light to blink. I realized that I could copy this code and use it for my relay to my pump. Using this simple code you can tell the pump to turn on and off every five seconds or every 10 hours. This was effective for something like an autonomous system.

First Milestone

My first milestone was getting the sensor values from my Arduino to display on my LCD. The LCD I’m using was connected to my raspberry pi. A raspberry pi is an extremely basic version of a computer the operating system that it uses is Linux. Within linux I ran a program called node which is a programming platform for javascript. I used an arduino which is like a raspberry pi. The pi, instead of operating similarly to a computer,  uploads code and it runs continuously. The Standard Firmata that I put on the Arduino allows for it to communicate with the pins on the Raspberry Pi. A problem that took me a while to figure out was when my LCD wasn’t displaying anything. I ran some code in python to get the LCD to display “Hello World” this assured me that the LCD screen was working fine and that the issue was something else in my code. I suspected it had something to do with the way the code wanted to read the LCD. Because I was using python I realized that different raspberry pi’s required different bus numbers. I ended up changing the bus number from 0 to 1 and it worked. I learned an important lesson that if you can’t figure something out with error messages that you should get it working outside of your code. By ensuring functionality you narrow down the issue.

Starter Project

My starter Project is the Minty Boost which is a portable USB charger. The minty boost uses two double A batteries. The batteries have an input of three volts and an output of five volts from the USB. To get an increase in voltage the Minty Boost utilizes a boost converter. The boost converter includes a power inductor, the integrated circuit, and the diode. When a USB is not connected to the device the current is continuously flowing through the boost converter and the integrated circuit has a switch that is going back in forth very fast so that the current can flow through. When the USB is plugged into the switch stops moving and is closed. The current builds up in the power inductor and it has nowhere to go; because the switch is closed the current goes straight to the diode. The diode carries the current in one direction. There are four resistors on the data lines. A 75k resistor is paired up with a 49.9k resistor on each side of the motherboard. Next to the resistors are a capacitor. The capacitor makes sure that the inductors don’t get too much current. I had to go into the schematic of my 5v boost converter and learn about what the different pin functions where so I could learn how it worked. I looked up my boost converter model and found a datasheet with large amounts of information that allowed me to understand the boost converter and what I was building.

Leave a Comment

Start typing and press Enter to search

Bluestamp Engineering