And I can even control it over the web for on-demand watering. At the time of writing this post, the software had the following features. Set up your Pi to automatically take care of a house plant by reading a moisture sensor and watering when needed. This is so that I can power the relay using a standard micro USB cable, such as the one that charges your phone. I have included Amazon links here to buy these items: I moved the 5 small indoor plants to the balcony to easy up plumbing. I did not show this in the above diagram to reduce clutter. The battery charge controller service toggles the charger on/off every 4 hours to avoid over-heating the battery and maintain a charge-discharge cycle. So I decided to do something about it. The first thing I did was make my 5V power supply from a usb cable. Set up your Pi to automatically take care of a house plant by reading a moisture sensor and watering when needed. Separate scripts to implement services that control pump, battery charger, and cooling fan. Having a few tools helped. We then used MIT's App Inventor to create a smartphone application which is compatible with the Firebase database and the Raspberry Pi. Now when you reboot your pi, it should auto start the server. One of my major focus areas on this whole project was the idea of redundancy and fail-safes. Raspberry Pi 3 B+ is a complete overkill for this project and something as humble as even a Raspberry Pi Zero W is more than enough to handle this. I dived right into scoping the problem and designing a system to solve it. I then wrote a small python script on the PI to test out the circuit, substituting the water pump for a bulb. While the pump controller runs every 30 minutes to poll the elapsed time since the last run. If so, you're off to the races. The setup looked something like this after everything was wired up: A few things to note in the above diagram: A relay usually has 3 pins on the AC side. Also connected to the relay module is a female micro-USB connector. To view the crontab commands I used, see the file in the repository. This code can be found. I live in an apartment complex and like any average apartment dweller, I and my wife have built ourselves a little balcony garden. Because who doesn’t like waking up to a little bit of green, right? 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. Get a free Raspberry Pi with a 12-month subscription to the print edition of The MagPi magazine. (I used a PVC pipe because I wanted a permanent setup). Automatic watering schedules We decided to use Google's Firebase as the intermediary of our IOT system, to create our own free cloud database. I connected the AC water pump to the third relay. In the past, we have tried more traditional options, with varying levels of success. And it’s not good for a healthy. Note: Relays handle high voltages on one end and are connected to low-voltage sensitive electronics on the other. This can be done using a tool called cronjob, which registers your website as a startup command. This also made the box a self-contained unit which could run itself for several hours to outlast any power outage. Now, at this point, you know that I have a 4-channel relay module, but the pump is only going to need one relay. (, A garden hose long enough to cover the required area. See also: Hydroponic gardening with Raspberry Pi. The plan was to use the PI’s GPIO pins to drive a relay board which in turn could control the Pump. Add a single line that reads (and make sure to leave one empty line below): @reboot cd ; sudo python3.4 I soldered some sturdier wires to this, and plugged it into a wall adapter. The recommended way to connect a relay to a Raspberry PI is to use an optocoupler to isolate the two sides of the relay. This article was written by Rob Zwetsloot and first appeared in The MagPi 86. We have about 10 large potted plants and 5 small ones. This is what the new arrangement looks like: I bought the necessary supplies as listed above and quickly fitted everything. Finally, I was able to test the complete set up for 2 days before leaving and it worked flawlessly. 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 script found here. I wanted this system to have a backup for some of the most common failures that I could think of. How-To: Make a Raspberry PI Based DIY Automated Irrigation System, Bangalore Goa Road Trip Day 2 - Murudeshwar and Gokarna - The Random Garage, Week 3: The Design – Entering the Digital Age, How-To: DIY Custom Enclosure for Raspberry Pi NAS Media Server, Bangalore Goa Road Trip Day 2 – Murudeshwar and Gokarna, Bangalore Goa Road Trip (via Jog Falls, Bhatkal, Murudeshwar, Gokarna), A Raspberry PI. 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. Now, pin 2 and 3 make up an active high circuit. 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 will walk you through the three main components of this system: the plumbing, wiring the Raspberry PI and programming it. This will bring up a text editor. Attach the other end of the hose to your plant. You will also need a subdirectory called "templates" containing the html file here called main.html. Just like with the electricals and plumbing, I had decided on the scope of the software too and come up with a list of functions I wanted: Given that I had a little time and only really needed very basic features, I decided to code a solution myself instead of looking for something ready made. Slot 1 is an Active Low slot. This does not harm the fan, it runs slow and is more than enough for the PI. Notice, that the ground line of the mains supply connects to the relay module before reaching the water pump. Water Sensor - plug the positive lead from the water sensor to pin 2, and the negative lead to pin 6. 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 script found. . 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. When the water sensor says "no water here", use the pump to put water there. i.e. We hope you have a bit of fun in your garden thanks to MudPi. 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 V2 . So, I was planning to use that to implement the brains of this system. You will also need to create a sub-directory called templates, and place main.html in the templates directory. If you connect a power source and a load in series to these pins, the circuit is complete and the load would get power. Not shown is another power source to the RPi. Or, if you decide to make this, share your story. The idea was to have a Raspberry PI control a relay board which could in-turn control a submersible AC water pump. If these work as expected, you're in good shape. I cut the pipes to size using a handsaw and drilled the holes required for drip pipes. Make sure to place the file in the same directory as the script above. This would look something like below: While this would have worked, there were two main issues with it: So, I decided on a different approach: Running a 1-inch PVC pipe around the balcony rails, fitted permanently, and connecting the smaller drip pipes directly to it. It waters my garden automatically every 24 hours. Pump - Connect your pump to a power source, run the black ground wire between slots B and C of relay module 1 (when the RPi sends a LOW signal of 0v to pin 1, this will close the circuit turning on the pump). There are two parts to this setup. If this post helped you, please share. A plastic bottle with pipes coming out of it sticks out like a sore thumb. You can get detailed information on the pins of the Raspberry Pi by typing “pinout” on a terminal in Raspbian or going to I plan on further improving the GardenPI software and make it more generic so that it can fit a wide variety of use cases. I am a software developer, physics enthusiast, hacker, and strong advocate for the KISS principle. when the relay signal is 0, this slot will have AC power. (Assorted Jumper Wires 120pcs –, A 12v fan. Perhaps a deterrent cause is the time spent on plant care. I made the above GPIO connections using jumper cables and added two 5v power supplies (phone chargers) – one for the Raspberry PI and one for the relay module.

Gt Dave Instagram, Linda Richards Contributions To Nursing, The Quest Android, Ephesians 4 1-16 Meaning, Do Bodybuilders Live Longer, Classical And Quantum Gravity Impact Factor 2019, Diy Room Spray Vodka, Nakama Sushi Pittsburgh, Is The R Silent In Turmeric, Pink Velvet Sleeper Sofa,