Tutorial: Adding a USB Submersible Pump to the Smart Garden System
This is a tutorial showing how to add a USB Controlled Submersible Pump to the Smart Garden System.
What is the the Smart Garden System?
The Smart Garden System allows you to build your own remote monitoring and management system for your indoor or outdoor garden. Do you want to share your garden and the weather world wide? You can learn the Raspberry Pi and how to connect to the real world through this easy to build no-soldering kit. You can measure soil moisture and then use that as feedback to provide your plant or garden just the right about of water.
Want to hook up to a Raspberry Pi or Arduino? Check out this article.
USB Submersible Pump
There are many different types of USB Submersible pumps available. Here is the one we use:
Cautions
- Turn all power off and unplug the Smart Garden System and the Grow Lights (or any other device you are using) before starting this project
- Keep water away for uncovered electrical contacts at all times
- Cover all soldered or exposed wires with heat shrink tubing or electrical tape
- Be careful. Electricity is dangerous!
The Controlled USB Ports on the Smart Garden System
Note: In this and other Smart Garden System manuals, for convenience we call the switched USB ports and Relay outputs “Valves”. “Valves” refers to any switched device such as valves, pumps, lights, fans, windows, motors etc. They can all be controlled by the Smart Garden System.
Below are annotated pictures showing the valve number of each of the relays and usb ports on the back of the Smart Garden System in the 3D Printed enclosure
These four USB Ports are controlled by the Smart Garden System. They can be turned on and off by the Python 3 software.
Plugging the USB Pump Into the Smart Garden System
Step 1) Take the USB Submersible Pump and plug the USB cord into the USB 1 Port on the back of the SGS Wireless Extender.
Preparing the Tubes
Note: Any ¼” irrigation plastic pipe will work for this project. Available at any major hardware store.
Here is what we use:
ATP Vinyl-Flex PVC Food Grade Plastic Tubing, Clear, 1/8″ ID x 1/4″ OD, 100 feet Length
Small Plastic Plugs (you can get these at any hardware store that carries watering supplies)
Step 2) Take the a long (say 300mm) and push it onto the nipple of the USB Submersible Pump as shown below. If you are having a hard time pushing it in, soak the end of the pipe in hot water for a few minutes to soften it. Then try again. Plug the other end of the pipe with a plastic plug or crimp it. This will make the water come out of the cuts in the pipe (step 2).
The pump output is on the side of the pump next to the label as show below.
Step 3) With an Xacto knife or sharp blade (be careful!) make at least three evenly spaced holes around this pipe that will circle the plant. Circle your plant with the this pipe.
Now your are done!
Plug in the Smart Garden System Extender unit and connect the power supply to the light using the cables provided.
Now to test the USB Submersible Pump with the Smart Garden System.
Programming the Smart Garden System for Testing the USB Pump
You will program your USB Submersible pump to be driven by your moisture sensor below, but let’s test it out first with a timer.
Step 4) Start up your SGSConfigure program and go to the browser window as shown in the “Smart Garden System Assembly and Test Manual”, go to the SGS Configure Tab, select your Wireless Extender that you have wired the lights into and then select Valve 1 from the dropdown Valve Select Menu. Fill out the rest of the fields as shown and then click “Save Valve”. If you are already running SmartGarden System, click on “Save and Reload SGS”. Otherwise, click “Save and Exit” and start your Smart Garden System as shown in the “Smart Garden System Assembly and Test Manual”. Wait until the quarter hour and you will hear and feel your submersible pump turn on.
Now let’s go apply some feedback.
Setting up the Submersible Pump to Trigger off the Capacitive Moisture Sensor
Step 5) Submerse the pump in a bucket or jar of water. Make sure your tubing is around your plant. Push in you Capacitive Moisture Sensor into the plant. Wait for a few minutes and you can read your Moisture Sensor value on the OLED screen on your Smart Garden System Wireless Extender. It’s being recorded by your Raspberry Pi Smart Garden System too!
Now we will program the pump to only water the plant when the moisture is below 65% so the pump will not turn on.
The Smart Garden System checks moisture sensors every 15 minutes to see if water should be turned on. Generally, you should only water for 30 seconds or so at a time and let the system respond to the moisture sensors.
You can control any pump or valve in your entire system with any moisture sensor from any of your Wireless Extenders. This allows your valves to be far from the plants that you are measuring. You can adjust your watering time in the SGSConfigure Valve dropdown.
Step 6) Start up your SGSConfigure program and go to the browser window as shown in the “Smart Garden System Assembly and Test Manual”, go to the SGS Configure Tab, select your Wireless Extender that you have wired the lights into and then select Valve 1 from the dropdown Valve Select Menu. Fill out the rest of the fields as shown and then click “Save Valve”. If you are already running SmartGarden System, click on “Save and Reload SGS”. Otherwise, click “Save and Exit” and start your Smart Garden System as shown in the “Smart Garden System Assembly and Test Manual”. Within 15 minutes or so, if moisture percent is below 65%, the pump will turn on and water the plant for 10 seconds and shut off. The Smart Garden System checks every 15 minutes to see if it should turn on water to your dry plants.
Step 7) In this case, we wait for 15 minutes and the pump does not turn on because the moisture sensor is above 65%. Now, let’s change the valve so the threshold is set to 75% so it will turn on. If you are already running SmartGarden System, click on “Save and Reload SGS”. Otherwise, click “Save and Exit” and start your Smart Garden System as shown in the “Smart Garden System Assembly and Test Manual”. Within 15 minutes or so, if moisture percent is below 75%, the pump will turn on and water the plant for 10 seconds and shut off. The Smart Garden System checks every 15 minutes to see if it should turn on water to your dry plants.
After 15 minutes (or so – depends on when you started your SGS2.py program), you will see the pump turn on for 10 seconds and then turn off.
Looking at the logs on the dash_app, you will see something like this:
Step 8) Now put your submersible in a bucket of water and you are ready to water your plants with feedback!