Soil Moisture Sensor with Arduino, Water Pump, Oled display, and Buzzer, Arduino Project
In todays episode, you will learn how to make soil moisture monitoring system using arduino. This new type of the soil moisture sensor, ssd 1306 i2c supported oily display module and a 5 volt buzzer. The basic objective behind designing a soil moisture monitoring system is to ensure that water will be provided to plants on time and in a rightful quantity. If the soil moisture is too low, plants are at risk of being damaged, and if the soil moisture is high, even the plants are liable to be damaged. I do not have that much knowledge about plants and, in particular, have no idea as to how much water is provided to any particular plant. I just know that different soil moisture levels are required to be maintained for the better growth of different plants. So before starting my work on the project, i decided to first study the soil moisture. I read articles of some professional botanists and then i realized that i have always been watering plants in the wrong quantity. Since inception, i used to simply plug a water pipe and did not stop watering a flower pod until it filled up to its frame. Anyway. I have now come to know the recommended soil, moisture values for different plants. The majority of plants thrive in soil. Having a moisture level that ranges between 20 percent to 60 percent any humidity level, over 60 percent can potentially cause damage to the plant, which is relying on moisture from the soil to nourish the 60 limit may vary.
Some experts believe that majority of flowers, trees and shrubs require moisture levels between 20 percent to 40 percent. While if you are dealing with vegetables, then you need to maintain soil moisture between 40 percent to 80 percent. I have two night blooming jasmine plants and i do not want to damage these plants as a result of over watering is night blooming. Jasmine is a woody shrub, so i will maintain a soil moisture level between 20 percent to 40 percent, so keeping this percentage of soil moistening level in mind. I have carried out my programming in such a way that, when soil moisture gets less than 25 percent the buzzer starts to be. I can also set the buzzer to turn on at a twenty percent moisture level. However, i want the buzzer to run a bit early. So that i may water my plans on time, ultim 365 lets you hold the fastest design reviews ever share your designs from anywhere and with anyone with a single click. Its easy leave a comment taking your teammate and they will instantly receive an email with a link to the design. Anyone you invite can open the design using a web browser using the browser interface. You are able to comment. Markup grass, probe inspect and more comments are attached directly to the project, making them viewable within ultim designer, as well as through the browser interface design, share and manufacture all in the same space, with nothing extra to install or configure connect to the platform directly from ultim Designer, without changing how you already designed electronics, ultim 365 requires no additional licenses and comes included with your subscription plan.
Get real time component insights. Is you design with octopart built into ltm365? Up to part is the fastest search engine for electronic parts and gives you the most up to date, part data like specs data sheets gate models and how much the part costs at different amounts, etc right in the design environment. So you can focus on your designs. Links to the ultim designer ultim, 365 and octoport are given in the description i have connected the lm75ai to c supported temperature sensor, a 5 volt buzzer, ssd, 1306 or led display module and the soil. Moisture sensor is for the circuit diagram, which i will explain in a minute. I have also added code for controlling a relay which you can use to turn on and turn off the water pump. I will talk about it when i will be explaining the code anyway. Im going to power up my soil moisture monitoring system using a 4s lithium ion battery bake. If you also want to make a 3s or 4s lithium ion battery bake, then you can watch my video. I will provide a link in the description on the oled display module. You can see the soil, moisture value, ambient temperature and the motor status right. Now you can hear the beeps as the soil. Moisture value is below the set value. You can clearly see that the soil is completely dry, now, im going to add some water and lets see what happens. This is pretty amazing.
As soon as the moisture level reached the maximum limit of 40 percent, the buzzer is turned off and also the motor status is changed from on to off guys. You might be thinking that a higher soil, moisture value shows on the display. It is because initially soil requires some time to absorb water. You can see some of the soil is still dry. When this drying soil absorbs water, then the moisture level surrounding the sensor will start to decrease. If the moisture ranges between 20 to 40 percent, the buzzer will not turn on, but if the soil absorbs more water and the moisture around the sensor, props drops below the 20 percent range, then the buzzer will turn on anyway. Let us leave it like this for around 30 minutes and then we will see so im back after 30 minutes and you can see the moisture value has dropped, but it is still in the acceptable range. So my initial testing has been completed and now lets check. The soil moisture of the night blooming jasmine Music im quite happy with the results. If you remove the buzzer and water pump, then you can also use this as the soil moisture meter and then you can move around and check the soil moisture of different plants. Music. Im sure by now you might have got an idea of how does this system work so without any further delay lets get started: Music Applause, Music access, granted, Music, the components and tools used in this project can be purchased from amazon.
The components purchase links are given in the description here is my soil. Moisture detection kit lets first take a look at the interface circuit. The board is provided with this blue color potentiometer, which is used to adjust the sensitivity. This board is also provided with the most stable lm’3 comparator chip and with on board power and signal indicator leds to display the module working status. The working voltage of this model is from 3.3 volt to 12 volts because of this wired input voltage range. The soil moisture sensor can be used with 3.3 volt and 5 volt compatible controller boards. On the back side, all the four headers are clearly labeled. The first pin is the analog output pin and it should be connected with the analog pin on the arduino. The second pin is the digital output pin, which can be connected with any digital pin on the arduino or any other controller board. Third pin is the ground. Pin and the last pin is the vcc pin, which you can connect with 3.3 volt or 5 volt the, since the props are waterproof and are made of highly corrosion resistant material to ensure long lifetime up to 6 months after being plugged into the soil. The sensor cable length is 1.3 meters now lets. Take a look at the circuit diagram. The analog output of the soil moisture sensor is connected with the analog pin a1, while the vcc and ground pins are connected with the arduinos five fold and ground.
The scl and sda pins of the lm75a temperature sensor and all ready display module all connected together and then connected with the arduinos a5 and a4. Pins a5 is the scl and a4 is the sda, while the vcc and ground pins are connected with the arduinos, 3.3 volt and ground pins. The 5 volt buzzer is connected using d4 pin of the arduino. We use 2n 222 npn transistor and a 10 kilo ohm resistor to control the 5 volt buzzer. The transistor and resistor make the driver circuit on the left side. Is the 5 volt regulated power supply based on the lm7805 voltage regulator, the output of the 5 volt regulated power supply is connected with the vm pin of the arduino since im using 7805 voltage regulator. So i can use voltage between 7 and 28 volts to power up the arduino. Due to this wide input voltage range, i can use a 12 volt adapter a battery, a solar panel, etc to power up the arduino. The 5 volt relay model input wire is connected with the arduino digital pin 2.. We use this relay to power up a 12 volt dc water pump, so thats all about the circuit diagram and now lets take a look at the programming before you start the programming. First of all, make sure you download all the necessary libraries from our website electronicclinic.com. I will provide a link in the description, the adafruit jfx.h and adafruit ssd 1306.
h libraries. I have been using for quite a long time and i have already explained how to download and use these libraries. You can watch my video on the old display module. You will also need the lm75a library which you can download from our website to add this library. Simply click on the sketch menu and then go to include library and click on the add, zip library browse to the desired location and select the zip folder and then finally, click on the open button is, i have already added this library, so i will click on The cancel button i started off by defining the pins and variables the lm75a temperature sensor programming. I have already explained in my previous video. I will provide a link in the description.