Okay, so we are building an automatic watering system, which will be activated in certain weather conditions. Besides, we will be able to check the weather conditions on the web page after we’ve connected to a network. We will also be able to activate the automatic watering system
from that same web page. Let’s start by saying that this is a watering system, so we will definitely have a pump. Like I said, the system is dependent on weather conditions. What weather conditions? We will be considering soil humidity, atmospheric temperature and lightness. You might already know that various plants prefer different treatment. So, in fact, we can consider some other parameters too, like soil acidity, watering schedule, aka the exact time when the plants will be watered, atmospheric pressure
or air humidity. However, the first three parameters will suffice to act as a basis. For instance, we can write out that the plant needs not to be watered in darkness or when the temperature is lower than “x” and so on. Thus, with the help of these three sensors we will know when the plant needs to be watered. We then need to communicate our data from the sensors to the web page, if we want it to be displayed there. Now this is something new. For this purpose, we are going to use a new expansion card called
the Ethernet shield, which will allow us to connect Arduino to the local network and then to the Internet. This means that the web page output will be realized with the help of
the Ethernet shield. Consequently, the command to water the flowers will also be realized accordingly. Everything seems fine for now, but when we start putting the system to practice, we might notice that the pumped water comes to an end. As we know, the pump doesn’t like pumping pure air. That’s why we will need to determine the moment when there is no more water in the container. As a result, a new function appears which was not mentioned in the description of the device. We will need to find a way to determine whether or not there is water in the container. I can suggest three options off the top of my head: use an ultrasonic distance meter, point it to the container with water and measure the water level. Thus, when the water level is too low, i.e. when the distance to the water is too high, it’ll mean that there
is no more water. This method has another advantage: we can measure out water more accurately. If we know the water surface area and the distance to it, we will be able to figure out the volume of the pumped water. This is our first option. Another option is: we can place some float in the container with a magnet on it, and install a Hall sensor on the body of our device (aka magnetic
Field sensor). Thus, we will be able to monitor when the magnet passes by the sensor. Otherwise we can draw some colored marking on the float, and determine with the help of a grey color sensor if the marking has passed by the sensor. For now, I’m suggesting the simplest option which we shall name “wires in water”. What we need to do, is simply place 2 wires on the bottom of the container
and transmit a signal onto one of them, and use the second one to read off the signal. Since our water is not distilled, it contains some matter, which makes it a conductor. If both ends are in the water, we will be receiving a simple digital signal at the input, which will resemble a button being
pushed. By the way, when we were preparing to shoot this video, my colleague suggested another clever option: we can direct a laser ray in the container, which will refract differently when it passes through water or an empty container. By the refraction of the ray we can determine whether or not there is
water in the container. But we will go with the simple option dubbed “wires in water”. What will we do when we find out that there is no more water left? Connecting to a water pipe line to refill the container would be a bit too much. That’s why all we can do is inform the user of this emergency and cease the watering process in order not to
agonize the pump. To inform the user, we can try an audio alarm if the user is nearby. Another useful thing would be to display the information on the
web page, because if you are on vacation, for instance, and you are closely monitoring your
plants back home, when you find out that there is no more water in the container, you won’t be able to automatically water
it, so you’ll have to take measures and maybe even return home to refill the container. By and large, we have a basic device with a pump, an Ethernet shield and
sensors, to which we have added two wires: a water level sensor and a piezo buzzer which indicates when there is no more water left. What about the transmission of the signal? We already know how to connect the temperature and the light sensors. The connection of the soil humidity sensor is still Greek to us. We will have to work on that. We also know how to connect the pump by using an agent, which is a transistor in the “Power key” module. We connect the Ethernet shield as an expansion card. But what do we do with the code and with all this web page stuff? We still don’t know, that’s why we have another blank space here. We can receive and record simple digital signals, as well as work with a piezo buzzer. Thus, we have two blank spaces in our diagram which we need to figure out.