Это видео недоступно.
Сожалеем об этом.
Arduino plant watering system (simple)
HTML-код
- Опубликовано: 16 авг 2024
- code and scheme:
github.com/woj...
Thanks for watching. Keep in mind that you will probably need to personalize your project for your needs. Please make sure to work in safe environment (it is electronic!). I do not take any responsibilities for any inaccurate or incomplete use of this video. I know that this project can be made without arduino or with a transistor instead of relay module but I wanted to keep it simple.
Parts I have used:
Arduino Uno Rev3
FC-28 Soil Moisture Sensor
Relay module 5V 10A/125VAC
12V 0.5A dc power supply (with stripped cables)
5V usb power supply
12V water pump
small breadboard
cables
plastic pipes and water bottle
music:
Covert Affair - Film Noire by Kevin MacLeod is licensed under a Creative Commons Attribution license (creativecommon...)
Source: incompetech.com...
Artist: incompetech.com/
This is my group project for second year bachelor degree. Thanks man, this is soooooooo helpful!!!! I appreciate your work.
pls dont delete this video. This is my final year research for my bachelor degree.
No worries, I wont delete it, good luck :)
Did you passed your degree?
@@Presso99 yes thank you for asking man
@@zafriizzat747 congratulations!!
@@zafriizzat747 are you still here, I have a question for you
I have followed the same code and connected everything as show in the video and the picture. When I give power to the arduino Uno and the water pump the pump doesn't stop running and never stops. A great video btw, thanks.
You are already a third person dealing with that problem, so it may be my bad or some library issue. What you can try is to check if you are using the same relay module and if yes use different port in the relay (the one on the left) for the black cable. If that does not help try to switch lines of code with setting pin - first set it to low - the input voltage may be reversed if something is different in your hardware
@@wojciechniedbala Guys, I had the same issue, I think the schematics has a minor mistake or is a different relay. I tried connecting the pump's positive to the opposite connector at the relay and it works fine.
Like your video very much, only the humity-sensor seems to be a problem, but if that one is swapped everything is beautiful, easy and cheap. Thanks for the clean and easy descriotion box. I found it very educational.
I will definitly build that type of watering system
Thanks and have fun! I chose those sensors from my local shop so there can be better options. Parts can be easily swapped, only you should check if they wil be compatible.
@@wojciechniedbala can you help me and give me your phone number
This is a great vid, keep up the great work. Currently I have something to ask which is it possible if I change the 12V DC Power Supply to be a 9V battery?
If I don't want to check soil moisture
But I have to feed water to plant every hr for 5 minutes then what are the changes in program..
I don't want to check moisture in need to feed continuously for 5 min after 55 minutes
Please do needful..
Okay, so the power supply is 12V DC but the relay is 5v 125VAC.
“A Dc relay coil has resistance that limits the dc current. An AC coil relies on its impedance for governing the current.”
I see that yours is working but can you explain to me in depth so I can understand?
Thanks!
With the mini diver pump with arduino, transfer water from one jar to another at regular intervals (without moisture meter). I'd be very happy if there was a video of this.
Great quick video! I’m building something similar. Lots of questions about the tech here but I didn’t see anyone asking about the plant. How did the plant react to this system? How often did you find it waters? It’s been quite some time, do you still use this? I’ve read that the conductive moisture sensors oxidize, but I wondered whether that was with continuous use and if turning them on for brief periods as needed would extend their life - what have you found? Have you experimented with different hose configurations? I am thinking to try a ring with holes to water from all sides that feeds back to the reservoir.
Thanks :), ring with holes seems like a great idea. Truth is I do not use this that often, because I like to do it manually for some reason. Here are answers to your questions:
1. All plants reacted really good to this system, at one point I had small glasshouse with chilli peppers and that also was a good idea.
2. It was watering once or twice a day, I have added some personal improvements later (glasshouse, watering only during day to not wake me up, connected pipes to multiple plants, LED lights at night for chilli peppers).
3. There are surely better moisture sensors that the one I have used but I think they are good enough when cleaned periodically (there was no rust or any other signs of wear).
4. I have always used same hose (some cheap plastic pipe), never thought of changing it.
Overall I made this project, because at that time I did not find any other like that and was curious how it will end up so I made tutorial that was meant for people like you who want to base on it but personalize it for their own needs (that is also the reason why it is short, quick and simple).
ruclips.net/video/ienj1llTVkI/видео.html check out this one...it may help you...
Hi, How did you get on with your project. Would love to get a bit more detail on what you did as I too want to explore the items you have mentioned.
thanks for your help, great video by the way it works well
mark sherborne thanks :) I'm glad it worked
Plz send me the program plzz1🙏
Sir how can i set a value to moisture in arduino say 40%or 50% at which the motor should start ? Please
There should be a small button on moisture sensor to adapt sensitivity or you can use analog input to read exact values
@@wojciechniedbala let them check thanks sir
how to do this project with capacitive soil moisture sensor??plz reply sir
Thank you very much! Is this possible with an Arduino Mini or Nano? I would like to hide it a little bit
No problem :) It is totally possible to do it with smaller boards, you just need two digital ports, two 5v and two ground ports (I had only one 5v port on my board so I have used breadboard to split it.) One thing to look up for is that it is easier when board operates on 5v not on 3.3v. Arduino Nano should be fine, but you will probably need to solder ports, good luck!
@@wojciechniedbala Nice! Ok I’ll try it. I bought a 5V Water pump, do you think that’s necessary to add the Relay and another power supply? Or can I connect the water pump directly to the Arduino Mini? Thanks a lot again!
@@Shhhpablo I have never tried 5v water pump but direct connection should work fine
@@Shhhpablo You need to read the spec of the motor and the total output current from the port. If the motor current drawn is more than the Arduino board maximum port current, then you will likely kill the port.
Great Idea. Thank you
Can you give the link for buying 12 v power supply
My water pump is always sending water to the plant(doesn't turn off) and Idk why, do you know what it could be?
Always hard to tell. What if you just run the code that turns the pump on and off with few seconds delay - skipping the if digitalRead part? If the pump will still be running then probably something with connection or relay module and if it will start turning off then it could be something with moisture sensor. If that does not help then it is worth to check specification of the parts you are using, maybe there is some difference there
i am getting this error
exit status 1
too many arguments to function 'int digitalRead(uint8_t)
can you show the code with use of digitalRead function?
Are you using 'int' and 'uint8_t' in the same line? Is it an integer or an unsigned integer? You need to show the code so people can make sense of what you're trying to do.
I have the same error, could you solve it?
Sir, if I want to send a message to my phone when the motor is on and off, what are the additional things I 'll require?
You can use free trial Twilio account for sending SMS
I would do it by adding a wi-fi hat to your arduino you can then make your arduino send a tweet or activate a webhook to send a push notification
Can we use capacitive moisture sensor.
why it always high? the pump keep on pumps water eventhough the moisture level is high?
It may be caused by a moisture sensor - there should be a small regulator/winder on this sensor to adjust sensitivity
great, but why is the sensor high, does a analog result makes more sense ? Sorry for my english ;-)
analog is better when you need exact value of humidity and I've just needed to know if it is low enough so there was no need to use it
Thanks a lot man
I have a Capacitive soil sensor v1.2, what changes do I need to do to get it working? the sensor does not have a Digital Output, only Analog. Thanks.
ruclips.net/video/ienj1llTVkI/видео.html check out this one...it may help you...
Sir can you pls provide schematic for multiple soil moisture sensors
Hi, unfortunately I do not have original schema anymore, but you can infer how it would look by taking this code github.com/wojtii/arduino/blob/master/plant_watering_system/sketch_water_pump.ino and this schema github.com/wojtii/arduino/blob/master/plant_watering_system/arduino_water_pump.png
and simply adding another ports for next moisture sensors. Do not hesitate to ask me if anything is not working and good luck :)
Ok sir thanks for your help but I am a beginner so idk how to represent it with the code.
@@mentesravanti4498 Okay, I will try to help you, connect next sensor to the ground and vcc (like for the first in schema) and DO (digital output) of moisture sensor to port no 4 (for example), then in code you should add variable for this: int secondDigitalSensor = 4; and change the condition in loop to: if(digitalRead(digitalSensor) == HIGH || digitalRead(secondDigitalSensor)) {. Keep in mind that this is just an example and I do not know what are you exactly doing with multiple moisture sensors.
Thanks a lot for helping me out and if possible I will make a schematic and send it to you sir.
@@wojciechniedbala sir I am just using to water multiple plants so instead of buying more ardwino's I can just use 1
Where can I download the water pump and power supply parts on fritzing?
Kiedy podpinam zasilanie do gniazda dc silnik sie ciagle kręci, i nie działa zgodnie z programem :(
Na początek się odpala to jest poprawne ale powinien się zatrzymać po tylu sekundach ile ustawisz
if you allways put voltage to you sensor, it will corrodiate wery quickly. How to fix this?
Hmm, I didnt think about it, soil moisture sensor is said to be stainless so it should be fine and rest of the sensors can be placed in some box with i.e. silica gel in it
could you power the 5v pump straight from the arduino?
teoretically 5v yes, but it may be not enough power to move water
I tried your code sir, and in your code it states that there is a duration of 1500 milliseconds until the pump stops. But when I tried it my pump won't stop until from 4 seconds to 15 seconds.
It sounds like some connection problem, did you check if all the cables are connected correctly?
on your sketch you set a delay(1500) is that the amount of time that the pump runs for ?
yes, it is in ms
excellent video Thanks
So, Arduino checks the water every hour. When it is dry, it will watering. But when 1 hour later it is dirty, will arduino watering again???
Yeah, each hour there is an independent measurement which can result to watering
Does the moisture sensor only reads 'high' and 'low' data?
I thought you could measure the moisture percentage with this kind of sensor.
You can measure both, in this case reading only high and low makes sense because you can adjust the sensitivity on the sensor and reading percentage would require more logic in code and I wanted this tutorial to be as simple as possible :)
@@wojciechniedbala makes sense! Thank you
Can I add LCD to the circuit? if yes can you tell me how?
Yes you can and it should be very easy for 16x2 lcd. Just follow this www.arduino.cc/en/Tutorial/HelloWorld
Question, will it water itself when the sensor feels that water is needed?
Not immediately, but in the next hour
@@wojciechniedbalado I connect the USB to the Ardunio to get the power?
I am positive that I did everything correctly, but check my relay, www.amazon.com/gp/product/B07L6J6FHH/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1 , is this the correct relay because my water pump doesn't stop.
@@cutety-minecraftandmore7564 yes you power Arduino through usb. Relay seems to be correct, so it may be a problem with connection. Did you check it with the scheme on my github?
@@wojciechniedbala It worked, only 1 more problem how I connect the water pump? I have the same pump as yours.
hai can i get the file of your fritzing circuit?? cause i already download and it does contain that type of moisture sensor
I only have png :(
Hi sir
I've gone through your video n I've made connection as per your video n code
Even though I'm getting a pblm that only the motor pumps even the sensor is in the soil
I've tried 3 relays n the pblms occurs again
try to log soil moisture sensor reads to the serial monitor and check if they are correct
I dont recommend that soil sensor, it corrodes super quickly. Capacitive soil sensor does not, get that instead. Also you might have to adjust the blue thing on soil board
Sir, I have a question about the crocodile cable that I must use or I can use normal wire?
thanks
I've used crocodile cable just for convenience
@@wojciechniedbala Thx
@@wojciechniedbala Sorry, the last question is how many cables and wires should I need and their names and numbers?
sorry for a lot of question
@@adlymaged7730 Number of cables - look at the scheme, name - jumper cables are the standard ones and I have used one crocodile cable for the pump, it is hard to use jumper wire there
Great video! May I ask, my connection with arduino with relay seems to have no problem but my water pump doesnt run when arduino is turned on. May I know the reason behind this??
Thanks, it does not run at all or in some situations?
@@wojciechniedbala the water pump doesn’t run at all. But the relay functions well according to the code/moisture sensor
@@muhammadsyauqiridwan8551 Hard to say, but check the connection between relay and water pump, also you can write a simple program to test if the water pump is working
@@wojciechniedbala help me please & give me your phone number
I need a watering system that turn on pump every hour without moisture senor, can provide related code? Thanks!
Should be something like this but I have no way to test it right now:
int pumpPin = 8; //relay pin
void setup() {
pinMode(pumpPin, OUTPUT);
}
void loop() {
digitalWrite(pumpPin, HIGH);
delay(1500);
digitalWrite(pumpPin, LOW);
delay(3600000); // 1hour
}
@@wojciechniedbala Thank you so much🙏. I will try this👌
@@marcoswwong1 Thanks and good luck 🤞
how can i put the arduino to sleep when inactive can you show me the added code i would need thanx
mark sherborne i am using the simple delay function, which allows interruptions so it is not a sleep mode. For a full sleep i would use these instruction: www.kevssite.com/arduino-power-consumption-delay-vs-sleep/
couldnt you just use a timer on the outlet?
Why do we use the FC-28 Soil Moisture Sensor ?
Why not?
Sir,
is it possible to use mini (Centiot Arduino Pro Mini Atmega328 5V 16Mhz) or nano (ARK Technosolutions Arduino Nano With ATmega328) ?.
yeah they both should work as well as arduino uno, just mind that pins may be different
Can someone leave me a link for the 12 volt power supply for the pump
Hi, do I need to keep the Arduino uno connected to my computer for Arduino or can I disconnect the cable after it’s programmed? Because the pack that I bought comes with a battery pack.
Hi, after it is programmed, you can unplug it and connect to the battery pack, just note that every reconnect to power will restart the program :)
@@wojciechniedbala thank you! Also I bought these materials on Little Bird but the jumper wires that came were round on both sides instead of a needle looking shape on a lot of RUclips videos. I was wondering if I need to get separate jumper wires? Because they don’t fit into the little bird Arduino uno
@@Nikki-fn4qw If they don't fit then probably you need new ones, but maybe they could fit somehow, do you know what exact cables are the ones you bought?
What is the purpose of your relay module in your project? and Can I do that project without relay module?
I have used relay module to control water pump. That is the only possible way to do it that I know about, there might be another solution though
there is a connection for the water pump ????
can i use 2-channel relay module instead of 1-channel? would it be the same?
Yeah, just use one of those channels
How to use this project in real time
Water level is decrease then motor pump is off ?
The sketch download ok. But when I connect the system the pump start and don't stop.what I'm doing wrong?
If you have same code then it only can be wrong connection on relay module (you probably use wrong pin) so try another one
Or you need to adjust the blue thing on sensor board
Can i use other type of soil moisture sensor type? I want to use YL - 69
Yeah, pinout seems to match fc-28 so it should work as a substitute
Does it water every hour or it will water only when soil is dry... Pls help me sir.. I am confused
It checks every hour if soil is dry and only then waters
Where we should find the project report
I dont recommend that type of soil sensor, it corrodes super quickly. Capacitive soil sensor does not, get that instead
Can you make a schematic, please?
Praneeth Mandalapu check description
what is the rotation per minute (RPM) for this watering system?
no idea
why did you not base the code depending on the soil moisture sensor data is sending you?
Cause I want the pump to activate 1 time per hour at maximum
@@wojciechniedbala You should make it so it doesnt turn on the pump if value is at the lowest, so when the soil sensor eventually corrodes it doesnt flood things, needs analog for that though not sure what you use. Better to get a capacitive soil sensor. Takes like a week or two before regular sensor corrodes to bits. Youre an MVP for answering so many of these noobs btw. But its a pretty bad idea to use resistance soil sensor for long term
Sir instead of crocodile cable can we use normal wire?
Sure
Can I use 3-6volt water pump without using relay ??
I dont think so
Its ok but why are you using a relay when you can control a motor with a motor control or a transister and the code is a little weard but for the rest good video
Thanks, there are 2 reasons for that:
1. I think relay is much simpler and safer to use.
2. Some transistors I was using were heating up which i did not like.
Nonetheless you are right :)
Im trying to make this for a project but i just want to clear things, is it alright to not use any kind of resistor or transistor here? because i found other works like this but they used transistors and resistors
Were they using relay module as well?
@@wojciechniedbala on the other videos i saw no none of them used a relay module but they used different kinds of transistors and resistors
@@im_your_greatest_nightmare Yeah, the project can be done with transistors and resistors (I have it in the description) but it can be also done with relay module and that is what I have chose to do, does not really matter for side project I think
@@wojciechniedbala well i follow the video but the difference is i used dual channel relay but anyway it worked even without using transistors or resistors anyway thnx for this video
@@im_your_greatest_nightmare That's great, thanks for feedback
nices Video 👌
Is it possible to do the same job without using arduino? if yes then please guide
The logic behind this is that FC-28 gives 1 on digital output when plant needs to be watered, so you can connect digital output directly to relay or transistor and it will switch on the pump without arduino controll (without delays). There are 2 problems with this approach: 1. you need to provide 5v power to FC-28 and other parts. 2. Because there is no delay in watering the pump can switch few times in a row.
wat is the power source to use a 9V battery or a 1A adapter???
Zain Ahmed for what u want to use the battery?
How do you connect the pump to the pipe? Anyone help!
Just push it or use tape
Sir how can i give power to arduino withoud chargey by battery
you can do solar
everything is working except the soil moisture sensor which doesn't stop the flow of water
you should have small potentiometer on your soil moisture sensor controler, try adjusting it to the right level
Is it normal that even if I do that it still doesn't work ? It seems like the sensor isn't able to detect the moisture
mandeep201087 you could use analog pin to check if it is sending any data. If not sensor is not working but otherwise you have to regulate the digital pin with potientometer to change its value on a lower threshold
The moisture sensor only tells the pump to turn on for the designated period of time. In this video, he instructed it to turn on for 1.5 seconds. Then he programmed it not to check the moisture for 1 hour. If all goes as planned, once the moisture in the dirt is good, it will only need to deliver the water a couple times per day. If the sensor detects enough moisture, it won't turn on again. It will keep checking hourly until it reads that the moisture is low. At that time, the plant will receive another 1.5 seconds of water.
Sir can you tell the ptoblem in my connection the motor directly starts and do not stop
First check output from your soil moisture sensor in serial monitor.
@@wojciechniedbala thx sir i have done modifications in code and its working well
@@Lavanyabarhate1234 plzz send me the code.. 🙏🙏
@@Lavanyabarhate1234 plzz
Sir can I use bc547 transistor instead of relay module
Chetan Kumar i dont think so, since it can only handle 100mA and pump draws near 500mA
can u give me information about the materials required for this project
they're in the description
Where did you buy all those products? Did you buy them all separately?
i bought all of them on the local store :)
Ebay dude
how u connect the pipe to the water pump
Just a straight plug in and it fits
please can you help me the pump do not stop
Söù Må Yã can you show the code?
int sensor_pin = A0;
int output_value; //outputvalue
int relay_pin = 8;
void setup()
{
pinMode (relay_pin, OUTPUT);
delay(2000);
}
void loop()
{
output_value = analogRead(sensor_pin);
if(output_value < 50)
{
digitalWrite(relay_pin, LOW);
delay(1000);
}
else
{
digitalWrite(relay_pin, HIGH);
delay(1000);
}
delay(1000);
}
Söù Må Yã in if you should probably have 500 instead of 50 which is very low value
nothing changes I do a test but nothing of all the pump does not stop despite the sol is very wet
Söù Må Yã what if you try to use my code instead and see then it works?
Can i use a 12V 20A battery ? Is the current hight ?
If you want to power an arduino I would not use 12v. If you want to power the pump (mine takes less than 1A) it should be okay as long as the pump needs 12V power supply. But I would still check if the pump is not getting hot and is working properly. I may be wrong here since I am not an expert in electronics.
Robie taki projekt . skad brales oprogramowanie do arduino
Z oficjalnej strony arduino - arduino ide, powodzenia!
can i use 240 volts AC water pump?
Ed Marjosef Mendez You can but this can be dangerous. Please make sure that your relay can handle its voltage and current. Also you will need appropriate power supply. I did not try such a high voltage pump but it should work. Be carefull with that.
Hi, what transistor could I use instead of the retransmission module?
Instead of relay module you can use any transistor (with resistor) which can hold 12V, for example TIP122 should work.
Thak you!
hey..im using double water pump..can you help me on relay use? coz i dont really understand how to use it
do i need to use 2 relay also if i use 2 motor?
@@ezzathaziq9045 You can use one relay with two channels or two relays with single channel, keep in mind that you will need to control them separately (two different pumpPins), you can base your code on this: github.com/wojtii/arduino/blob/master/plant_watering_system/two_water_pumps.ino which uses two pumps with two sensors (if you have one sensor just reuse the same pins twice), good luck :)
@@wojciechniedbala owh thats nice but did you have like a circuit diagram for it..it would be more helpfull🙌
@@ezzathaziq9045 No, I only have diagram for single water pump
@@wojciechniedbala can i pm you somewhere maybe like whatsapp? Maybe i can show you if im wrong
What is the system that you use for the code
Arduino IDE
Sir how can I connect a LCD display to it?If yes then will there be much change in the code of this program?
Koyana Singh can you tell me the name of your lcd display? It should be easy to add this to the code.
I just want to add a 16×2 character LCD display. So that it can show the process.
Like wet soil detected, turning pump off, dry soil detected, turning pump on.
So will it be easy???
Koyana Singh for 16x2 LCD there is LiquidCrystal library. It should be easy to add it to the code
Okay...
Thnk u so much...
please can you give the code to add to the one on the video to make sure it is display on lcd
did you connect the 5V arduino power supply to the plug?
No, it has to be separate
@@wojciechniedbala so you used two plugs? one for the water pump and one for the arduino?
@@azuhasyuhada5706 yes, these are two separate connections
my pump turns on after an hour but the soil is wet can somebody help me xD
nevermind i fixed it xd
@@dxt3d how?
hi! I've been watching your video 1 million times, I have the same components. the pump won't cut me. What
What do you mean by 'won't cut me'?
Will it work on any pump
can u make with sms alert
Arun Sarang hi, i would rather do it with internet connection, atm i am waiting for delivery of WiFi module
can i use L293D motor driver to run the motor pump
Sorry but I do not know, I was not using those.
no problem i tried it out with l293d motor driver and it worked and tq for the vedio and reply
thanks :) glad it worked
can i know how u did ur project with arduino and L293d motor driver please
i dunno how to connect
does anyone have a schematic
Can we use 9v battery for a 9v DC pump
You can try but the battery will not last long. I strongly prefer standard power supply
@@wojciechniedbala I'll use two batteries since I'm running out of my budget thanks alot for the reply since my project is due tomorrow!! 😊
@@kushiananya2366 no problem :) I am glad I helped you
Is it pump when the 🌲 tree need water
Yes, but it checks every hour, so it is not immediate reaction
oo thanks
I have a grove moisture sensor. Can I use it instead of yours?
Yes, but make sure to adjust to it measurements
@@wojciechniedbala Thanks
If I want to work with the analog output then what should I need to change in the Arduino code
@@mohammadsazzadurrahman3591 check if input is bigger than some (try different) threshold integer instead of checking if input is high
And also you need to use analog port in arduino
Are you connected with social media?? Please.
I want you to send pic of my circuit..
Can we use 5v motor and 5v adapter
Yes but pump will be slower then
Why the motor doesn't stop
@@makeallthethingsmakeallthe3177 it can be wrong connection, different parts that I used, soil moisture sensor giving different results
how much did it cost to build this project?
with arduino around 50$ I think
@@wojciechniedbala thanks
How can we connect with solar panels give full detail
can u send me the programming
there is a link to my github in description
what's cable did U Use?
For what exactly? I used few different cables in this project
for this project did u used the jumper wire male-male or female-male ?
and how about the crocodile cable?
is that the power supply sold separately?
sorry for asking you...i'm Beginner
Please For Help.
thanks
If you are a begginer then it is a good idea to do some basic tutorials first. I used all 3 types of jumper wires. Crocodile cable helps connecting pins sometimes. Power supply is sold separately, you would need any of 12V and >=0.5A.
the code works fine ?
yes
where do i FUCKING CONNECT IF YOU JUST LIKE SHOW THE PICTURE FOR A SEC THERE