So, I threw in an old, but functioning battery pack I had, in the mix and ended up with something looking like this in a new box: The battery pack has two outputs to connect two devices simultaneously. This python script runs a web server enabling various actions from the script described above. So I decided to do something about it. Not that the device could do much if there was a power outage, but I still wanted it to have backup power at least for the Raspberry Pi. We then used MIT's App Inventor to create a smartphone application which is compatible with the Firebase database and the Raspberry Pi. Automatic watering schedules We decided to use Google's Firebase as the intermediary of our IOT system, to create our own free cloud database. Now when you reboot your pi, it should auto start the server. This is to make identification easier during coding. (Assorted Jumper Wires 120pcs –, A 12v fan. So, I started thinking about uses for the other three. Because who doesn’t like waking up to a little bit of green, right? I'd like to be able to go on vacation and not worry about whatever houseplant I'm fruitlessly nursing at the moment. It took 2 all-nighters to achieve the bare minimum functionality I was shooting for, work reliably. We have about 10 large potted plants and 5 small ones. Once I had the plumbing setup finalized, it was time to move on to the second stage. I wanted all of them to survive our week-long trip. A small DB that keeps a log of each event happening in the system, such as pump runs, battery charger toggle, and fan toggle. Attach the other end of the hose to your plant. Now let's start with the code for controlling the GPIO. The white line connects Pin 1 and 2 in the symbol. Finally, you probably want the website to auto start when the RPi gets turned on. This python script runs a web server enabling various actions from the script described above. Sure, you can leave a key with a helpful neighbor, but that might not be an option for everybody. Now let's start with the code for controlling the GPIO. SmartPlantPi – Raspberry Pi Plant Watering and Environmental Kit This Product has been replaced with the Smart Garden System V2 SwitchDoc Labs has now released the newly designed version of SmartPlantPi, the Smart Garden System … I had a Raspberry Pi 3 Model B+ lying around collecting dust. This requires the RPi.GPIO python library which can be installed on your Raspberry Pi as follows: With that installed, you should be able to use the water.py script found here. Automatic Plant Watering with a Raspberry Pi. Make sure to place the web_plants.py file in the same directory as the water.py script above. I wanted something a little more permanent, which I could activate in the future whenever need be. Note: If you get the wiring exactly as described above, my code in the next section will work with no modifications. My initial thought was to hang a small plastic container from the ceiling and run drip pipes from it to each of the pots. I wired the setup in such a way that GPIO 1 on the PI controls Relay 1, which controls slot 1 on the extension board. Set up your Pi to automatically take care of a house plant by reading a moisture sensor and watering when needed. Therefore, this project involves the creation of an automated Raspberry Pi greenhouse, which reduces the work to a minimum. About a week before the trip, we realized that we had no backup this time around. I plan on further improving the GardenPI software and make it more generic so that it can fit a wide variety of use cases. Now run the following command command to start your web server: $> sudo python3.4 web_plants.py Now if you navigate to the ip address of your RPi, you should see a web dashboard something like this: Try clicking the buttons to make sure everything works as expected! When buying a relay module, make sure to read the description to find if the relay is suitable for direct connection to a logic circuit such as Raspberry PI / Arduino. In this post, I will show you how to build an automated irrigation system using a Raspberry PI. This article was written by Rob Zwetsloot and first appeared in The MagPi 86. Seek qualified help if you are not comfortable doing this yourself. Once this jerry-rigged proof of concept setup was tested, it was time to put this all in a bigger box and have all the components fixed securely, so they don’t bump into each other and set my house on fire. See also: Smart Herb Garden project showcase. While the pump controller runs every 30 minutes to poll the elapsed time since the last run. The idea was to have a Raspberry PI control a relay board which could in-turn control a submersible AC water pump. I chose my design based mostly on what I already had available in my parts bin. So I decided to build the bare minimum - get a plant, a pump, and a water sensor. But, the flip side to keeping plants is that your travel plans are affected. In an increasing number of cities, the trend is towards organic or even self-grown fruits and vegetables. When the relay is turned on though, the connection between pins 1 and 2 will be broken and instead, pin 2 will be connected to pin 3. A plastic bottle with pipes coming out of it sticks out like a sore thumb. I have included Amazon links here to buy these items: I moved the 5 small indoor plants to the balcony to easy up plumbing. Checking with a voltmeter, this gave me 5V output. in a file called web_plants.py. Slot 1 is an Active Low slot. (I used a PVC pipe because I wanted a permanent setup). Notice, that the ground line of the mains supply connects to the relay module before reaching the water pump. This might seem counter-intuitive at first, but it’s not. Set up your Pi to automatically take care of a house plant by reading a moisture sensor and watering when needed. It waters my garden automatically every 24 hours. This is the active low state of the relay. You can test this is working correctly by running an interactive python session as follows: $> python3.4 >>> import water >>> water.get_status() >>> water.pump_on() This should print a statement about whether your sensor is wet or dry (get_status()), and also turn on the pump for 1s. In all the planning leading up the to trip, we almost forgot about this problem. Automatic Plant Watering with a Raspberry Pi. This requires the RPi.GPIO python library which can be installed on your Raspberry Pi as follows: With that installed, you should be able to use the water.py script found. And it’s not good for a healthy. Managing a full-time job and DIYing on a time-table is hard. Not shown is another power source to the RPi. Please see the GitHub repository for more information on how you can use the code. You will also need to create a sub-directory called templates, and place main.html in the templates directory. After reading about how well things can grow indoors, I started thinking that maybe automation was my path to healthy plants. I also decided to run it all through a Raspberry Pi to as an excuse to interact with the RPi GPIO. When the water sensor says "no water here", use the pump to put water there. I really like your post, it’s very inspiring to me. I cut the pipes to size using a handsaw and drilled the holes required for drip pipes. If that happens, the PI and relay would shut down and the slot 1 being an active-low slot, would automatically turn on the charger. You will need to keep web_plants.py in the same directory as water.py and auto_water.py described above. Using an old iphone cable, I cut the iphone side off and fished out a red and black wire. Enter your email address to subscribe and receive notifications of new posts. It was perfect for this purpose as I could connect both the Raspberry Pi and the relay module to the battery pack and did not have to worry about running 2 charging wires into the box. I soldered some sturdier wires to this, and plugged it into a wall adapter. I attached the PVC pipe to the balcony using zip ties. I have numbered them 1-3 in the image below for easy identification: The symbol denoted by K1 to the right of these pins explains how the internal circuitry is wired up in the relay. If these work as expected, you're in good shape. Now plug in all power sources (and make sure your Raspberry Pi is running some version of an operating system, like this one. So, I wired up one of the relays with a 5v power supply (from the battery pack) and connected it to a CPU fan that I fixed to the box lid. This is the default state of the relay: pins 1 and 2 are connected when the relay is off. If so, you're off to the races. Similarly, GPIO 2, 3 control slots 2 and 3 respectively and GPIO 4 controls the fan.

Positivism And Post Positivism, Types Of Fatty Acids, How Is Fish Oil Extracted, Personal Development Plan Definition, Lamb Farm Near Me, Best Chocolate Wafers, Dell Inspiron 13 7378 Ram Upgrade, Luke 5:1-11 Object Lesson, Social Media Marketing Course, Where To Buy Chocolate Eclairs Near Me, Sardines Hot Pepper, Sonstegard Family Farms,

Share This