I always looked at electronics in wonder, and I always liked circuits. I remember during my high school I have created a project with four light bulbs, powered by a battery: two in series and two parallel to demonstrate how the electricity was splitting between the two. I found it fascinating, but I never managed to get back into it.
The itch to scratch
I have four plants on the window of my kitchen at the moment: a (now dead :'( ) rosemary, a parsley, an orchid and a basil. I never knew when to water them. I never knew if I gave too much water, or too little. On top of that, different plants have different needs, so you have to keep track of it and can’t just water equally.
In the past I have discovered that some of the plants were drowning in water, which was collected in the bottom of the pot, making the roots mostly mouldy and in the end causing the plant to die.
On top of understanding the water needs, I wanted to create an automatic water plant system, which would keep the plant well hydrated automatically, while I could follow what was happening from a web interface.
At the same time, I wanted to explore the robotics world, and to have a project where I could use the Robotic Operative System ROS.
Components to create Gardu
After a bit of thinking, I’ve created a Gardu, which is an automatic way to keep track if the soil irrigation, and having the possibility to follow it from afar.
These are the different pieces of the puzzle:
- ROS based Arduino/RasberryPi (Gardu):
- 4 soil sensors
- a 12 volt pump
- a servo
- Django powered website (Gardenio) to track the readings and associate the plant
This is the flow:
- Gardu acquires analogic read of soil irrigation from a sensor
- Gardu makes a post request to the Gardenio website with a unique identifier (which is unique to each Gardu, and it is embedded in the firmware code)
- Gardenio stores the value for that sensor, finds the associated plant, and responds with the threshold of minimum soil irrigation value for that plant back to the Gardu.
- Gardu process the value: if the read is above the threshold, then Gardu sends the command to water that plant
So far I’ve managed to finish the soil sensor acquisition, while I have an early prototype for the automatic watering.
This summer, while I was away, I could track my plants getting thirsty from far away:
tracking your home plants with @arduino and @Raspberry_Pi using @rosorg to drive the data acquisition to then post it online on a dedicated @djangoproject and see them become very thirsty while you went away? ✓check pic.twitter.com/c6Bjj2zYth— Michele Mattioni (@mattions) August 2, 2018
That’s when the rosemary died, eheh.
I’m still sorting out the water pump, due to the problem with the wiring on the circuit. This is the current circuit for now (the servo is not here).
The soil sensors part works like a charm and they gave me no real hard time, the servo/pump combination instead it’s a little more complicated to handle.
They need external power, which is provided by the battery, but because they are connected on the same circuit, they do not work reliably at the moment. It seems that a possibile solution would be to use a UBEC.
Once that is done, the servo gets hooked up to a custom designed 3D printed valve that looks like this:
The inner red part rotates, do the top hole in the green part is in axis with the one in the red part, which then is in axis with the blue tube which will be connected with each plant. The idea is that only minimal amount of water will go towards the other plants, and most of it will go to the target plant. You can see it on OnShape here.
After some quick testing, I have a strong feeling that this is not gonna work, and the design may have to change.
So, given the automatic water system is still a work in progress, this time I will also be able to track the thirst of the plants from far away.
For now we are looking ok:
The race is on: will I be back before the plants will go completely dry?How many will I loose this time? Future will tell.