Software apps and online services
I used to go out continuously but worry about who will water my plants reliably.Also am not sure it would get sunlight anywhere else properly if moved elsewhere
Use my various iot skills and create an auto pumping solution to water plants when I am not home
Challenges faced :-
- Procuring and understanding the Optocoupler relay module electric diagram (Link)
- Continous on line solution which requires separate dedicated water tank (A pipe from bathroom or kitchen and leaving water on with electronics is not really my idea of safe :-) )
- Reliable power supply which gets me 5 v power to power relay separately and in isolation so it can do long term protection to pi
- Procuring a pump motor compatible with my requirements
Challenges Met :-
- I decided to go with LM7805 ic with a 9v battery clip and capacitors to give smooth power to my relay board (This solved the power requirement for me. Plus by my calc the whole thing only takes power from lm 7805 when a input signal from pi is given so I belive its energy efficient enough for my requirements. Later I found out this wasn't the case The LM7805 ic takes standby current of 3 ma or so draining my 9v battery in 4.3 days !! )
- For the pipe I had to go with the local pipe store to obtain a pipe and see that the pipe fits the mini pump
- I had to code very carefully taking into account to dispose and reclaim the gpio pins.Also from what I gather this is an endurance project unlike my previous projects.That means any decision I take will need to be carefully measured against entire year.(For instance if I blink a status led @ 1 min on/off.Number of blinks in years transforms to 525600!!.As the led will blink for 365 days a year till solution is on.) Hence I have to weigh my decisions properly
- I had two choices Get a pump or get a solenoid to turn water on /off.My earlier descision of solenoid however was problematic to say the least as when you go up against a portable tank with absolute low water pressure.Water may not flow from the solenoid.Hence I purchased and went with the submersible pump (link for part attached.Manufacturer of pump was good and went over and above the call of duty to help me )
- The optocoupler ic diagram was hard to procure but once I had it I immediately understood the module and used a transistor to ground the main output line on a signal from the pi.Lesson learnt (ALWAYS go through your parts Documents before you purchase people. Don't rely on youtube videos which just show how they integrated part.For all we know they could be wrong as well !.A part is only as good as its documentation)
- Final assembly and the challenges faced overall is also a point in on itself which I will shed light on in more time
- Long life of the 9v battery is a must.I used BC547a transistor as a switch to switch on the power to LM 7805 (This step was taken after carefully measuring standby and relay active current using digital multimeter )
- I also kept everything in an enclosed Plastic box So that the components are not disturbed.
Enjoy the pics and videos.
Just try doing this on your own and the experience of building this is good in itself
For the code I designed it to be modular and have a boolean value for powering of entire modules selectively .Also headless app seems to be the perfect way to go So that the pi does not consume resources in the long run
The project seems to be running fine uptill this point.Proof in pudding is that Sunday morning i woke up late and sw that the Plant was automatically watered
Added a link for the relay diagram
Added a shutdown tactile switch to the circuit .This will switch off he device if the shutdown switch is pressed when led blinks for safe shutdown .Also covered the whole box so that its in the shade
The project is watering regularly and everything's working good,But I thought to myself why stop here?
I noticed my hibiscus plant always seems to bloom somewhere in the night ,So i decided to catch it in the act !
Attached is a time lapse video created using IPlanty snapshot module (newly created)
For those interested the module opens up a Windows IOT Headed app and takes a snapshot .This is a workaround as my Logitech webcam C210 needs time to warm up and if i try to take a snapshot immediately then i get black images as a result .Workaround for this is that i start the image preview mode(Not available in WinRT due to com issues) and then capture a photo in between.Code for this is attached.
I think this workaround is fine and hope that this trick is not removed in future versions of Windows IOT
Project seems to be going good for now i have increased duration pump stays on
Also in the code i have included a test mode function so that whenever the app starts all the circuits can be inspected visually by me!
Checking time! the plant seems to be holding fine .Also my 9v battery which gives 10v according to my multimeter is showing a drop of 0.18 voltage drop (Total:9.82V) which means my fix of adding a transistor to shut off the circuit is working ! :-)