I love basil but I always forget to give water. So after a week I end up with a dead basil plant. This has to stop!
As a nerd there is only one solution for this problem (Improving my memory has proven to be very difficult). Build an automatic watering system for my basil plants.
The electronics and software are straight forward: arduino mini, 5V peristaltic pump, soil moisture sensor, leds/button/potentiometer.
What is new for me in this project is the enclosure. A enclosure is required because I can not put the electronics on the kitchen counter. As a first lasercutting project I decided to lasercut a simple enclosure, this wil hold all the electronics. The leds/button/potentiometer and pump are all fixed to the enclosure, the arduino mini will be put in heat shrink.
I have been working with the esp8266 for the last 2 weeks and I love it.
I have setup a arduino (1.6.5) sketch using the staging (unstable) version of esp8266. I have added Over The Air update so I can update the sketch using wifi. Also debug information is send using wifi by simply connecting telnet. Check the github repository for the sketch.
I have seen a lot more interesting new software features of the esp8266 which I will explore later.
Also looked at why the peristaltic pump leaks. The silicon tube got damaged. I think the gears rolling over the silicon tube is not the best idea. Also where the tube enters the pump there is a sharp corner. Well you get what you pay for ;)
OK some busy (non hacking) summer months have passed but I have not stopped this project.
Won a stick vise Thanks Hackaday!
Did not make the next round hackaday price 2015 :( but should get a t-shirt :)
The peristaltic pump started leaking, so I had to take it offline. The part of a small container make little mess was correct :)
So new ideas are: using the esp8266, Chirp sensor and a ds18b20 and start logging the data. For this I am using thingspeak My Channel for now I just have the temperature sensor. Later I will add the chirp and start measuring.
Also I am looking for a better way to pump the water. The container should still be a wine bottle. Just looking for a better way to pump water. It should make as little noise as possible. With the esp8266 it will also be possible to run it at night.
Also I have some ideas about scaling this up (see previous post). I am very pleased on how the hydroponics worked this summer. So the next month I will also research a bit more on running a hydroponics setup, indoors in the winter. So I will need some lights, logging of variables .....
So I will try to update this project a bit more the next few weeks.
Ok, so my quick and dirty capacitive sensor is not very successful. Maybe it is that it needs temperature compensation, maybe I am just measuring noise. The biggest problem is that I do not know.
So time to collect data. I have bought a ESP8266 board and a sensor version of the Chirp. So I am probably connecting these as a (temporary?) logging solution and send everything to thingspeak or something similar. If only I had some time the next few weeks to put it together.
Ok i wanted to use the Chirp as a soil moisture sensor but they are out of stock :(
Than I started thinking, why spend extra money on a seperate sensor? The teensy LC has some very capable capacitive measuring pins on its own.
So from some left over PCB material, 2 layers of copper, I created a capacitive sensor. I cut a strip of 80mm x 10mm. 1 layer is connected to ground the other to pin 16. Next I wrapped this all in electrical tape.
From some quick testing it seems to work. Using touchRead() I get a value of aprox 2200 when it is out of the soil (or very dry) and > 3000 when it is wet.
So this is going to be tested for the next couple of days (weeks). If everything works I am going to create a PCB version of this sensor.
Today I found some time to connect everything for some initial testing.
I have created a new repository on Github this contains the code and laser cut designs.
I have connected the moisture sensor, leds, button and the pump to the Teensy LC.
I tested the pump, it pumps 23ml/min. The seller says it should pump 100ml/min MAX @ 6V. But I guess I can not complain, since it is a very cheap chines item.
Also looked at the moisture sensor. It was very simple to connect but I noticed it is very sensitive on how I stick it in the dirt. I am not sure if it is going to be reliable enough. I placed the watering hose in the center of the basil and the moisture sensor in the edge.
The next few days I am going to see how/if these components work and where I need to improve. If anybody has some suggestion please let me know.
I have been thinking about scaling it up. A couple of months ago when I started thinking about this project I also started an experiment with other (non automated) ways of keeping the basil alive.
I have some dirt based solutions. Which are nice and traditional but have some drawbacks: it is messy and you need to constant water it. But I am already solving this part.
The one I want to scale up is my deep water hydroponics setup (on the right side of the picture above). At the moment I have 4 pots filled with hydro clay pebbles in a small ikea tank with an air pump powered aquarium airstone.
As seen in the picture above I have some intruders (non basil) in my setup which seem to grow well.
My plans are to increase the number of hydroponics pots. I have setup the hydroponics next to the refrigerator and this seems to be a good place. I would like to expand vertical. Build a second setup above the current one.
I can use the water from the hydroponics to water the dirt based plants, using the electronics I am developing now.
Noise: the bubbles from the airstone are noisy. So some sound proofing has to happen because it is in my living room.
Space: There is not a lot of space so a nice efficient structure has to be made.
Monitoring: I need to get some sort of notification if I need to do something (add/change water or nutrients). Failure notifications, temperature, light conditions, pH and nutrient level. And report this all to some web based service.
Light: It get dark here in the winter. If I want to keep the basil alive in the winter I need to add light.
I have been thinking about this problem and its solution for a couple months. In that time several basil (and other) plants have died because of drought. Which is unnecesay because they where right next to the faucet.
So finally I ordered a peristaltic pump from ebay and a soil moisture sensor from aliexpress. When I finally received the parts I tested them briefly. Everything seems to work so it is time to design an enclosure.
The enclosure will be put on the kitchen counter. So it should be possible to easily move it, also when cleaning the kitchen there is a lot of water involved. Also I want to try lasercutting so I designed a 3mm plywood box.
During the design I also needed to find a suitable water container. It must not be too large, because if there is a problem with the electronics I do not want to have clean up my entire kitchen. Also the container must be dark to prevent algae, if there are algae in the container it should be easy to replace. After a quick scan in the kitchen I found a suitable container: a red wine bottle of 0.75 litre.
Next was the user interface. A couple of leds, potentiometer to set the point at which the system should start to water and a button to manually start the pump (For initial startup/new plant). The laser cut design has mounting for all these parts and the pump. The arduino mini pro has no mounting and will be put in a heat shrink.
The laser cut design is send to snijlab.nl for cutting so in about 2 weeks it will arrive.