The idea came from a good friend of mine, Josh. But I had to tailor it to a
specific application, or else the project would be waaayyyy too
complicated.
I call it, AquaBot! A watering system controlled by Arduino to turn on a water pump. Simple right? well... not entirely.
Phase I: Soil Moisture Research
Josh and I discussed the topic of a soil moisture sensor to detect the amount of water in the soil. The logic would be, dry soil = turn on sprinkler, wet soil = turn off sprinkler. Of course there are levels of moisture like really dry, a little moist, muddy, fully saturated...etc. When the soil reached a certain amount of water content, the sprinkler would shut down. That was the idea back then, but the thing is, reading a soil moisture level isn't a piece of cake.
Key things to consider: Research and Think. Then think some more.
Research included soil resistivity readings, dielectric constant of soil, and frequency readings. The most basic and crude idea is just poking two nails into the ground, use a voltage divider, and get a voltage reading (Example1; Example2). I won't get into details here because that would require some electronic theory and maths that would make people sleep. The problem in this case is electrolysis. Using DC (like a battery) to drive the current between the two nails eventually builds up electrodes on one nail and increases corrosion, thus giving us very inaccurate voltage readings.
Second idea is to measure the dielectric constant of soil. Sounds cool. Wait what?
Dielectric constant of water is much much greater than air, enough to tell when soil is saturated or dry. A great example is seen here where capacitors are placed on a PCB, and you just stick the PCB into the soil. It outputs a voltage that is understandable to a micro-controller.
Frequency readings requires more thinking. It will gives us a more accurate reading of soil moisture than the previous methods. A good example is Vegitronix. The idea here is to monitor the change in frequency of the device and again, outputs data that are understandable to a micro-controller.
Back to the drawing board.
I definitely wanted to keep the cost relatively low. So I decided to just develop a simple timer to turn on the water pump for t seconds every day, or every other day. You can do this by buying a digital timer that has a AC plug connecting to an AC pump. But that's way too easy. The problem I see with using an AC source is that the watering system is limited to power only from the wall outlet. Now if we decided to use a DC source, say a battery, we could make this system portable! and no worries about finding an AC outlet. Even more, we can attached solar panels to charge the batteries, send you a txt or tweet that the plant is being watered, play a tune as it waters... wow the possibilities open up with using DC :)
OK calm down a sec and stick to the bare minimum. We just want to water an indoor house plant everyday. #1 Rule is KISS (Keep It Simple Stupid).
Phase II: Arduino Programming, Parts Procurement, and Technical Details
Sponsored by Mr. Lau
Parts List:
-Arduino UNO
-Lightobject's 6V 1L/min Water Pump; P/N EWP-2502HT6 (or EWP-2501HT on Amazon)
-10' x 1/4" Inner Diameter Clear Vinyl Tube
-10' x 3/8" Inner Diameter Clear Vinyl Tube
-7.2V Power Supply
-NPN transistor; P/N 2N3904
-PNP transistor; P/N 2N2905A
-Various Resistors
I got the power supply from an old RC car battery charger that actually outputs 9V@400mA and knowing me, I got the transistors and resistors in stock already. The water pump requires 6V@300mA which is fine. I don't expect the Arduino to use a ton of current. Guys, milliamps or mA is a measuring unit of current also in Amperes or Amps for short... keep up with me here.
The reason I chose the transistors is because my Arduino cannot output 300mA of current but a max of just 50mA per single pin. Any higher and I'll have a mini barbeque. But what are transistors?! I will try not to get too technical, but they are devices that physicists created to manipulate and lure electrons into traps and force them to do our bidding. Mwuahahaha! Bottom line: I'm using them as a switch to drive current to the water pump's motor. You can read more about the circuit theory behind this idea here where an NPN transistor is used to control a PNP.
Current Status:
The current status of the project is calculating resistor values using good old maths and analog circuit theory which shouldn't take long. Then do some wire soldering and get some soil to test how long to turn the pump on to sufficiently water a plant.
Frisbee time, later
No comments:
Post a Comment