To stop deterioration of the sensor conductor, only sense for 5-10ms and only sense every hour or whatever suits you, that way it's not constantly on and constantly performing electrolysis. If you don't do this then all the nasty chemicals leach into your soil and kill your plant, while your sensor will be inoperative after only a few weeks at most. The other alternative is to use a capacitive sensor instead.
how is it possible to control that sensor run time? can raspberry turn it on and off by a set interval like a cron job let's say or a python sleep timer? that's the correct way actually - because doesn't make any sense to run sensors 24/7, everyone should put an interval the way his greenhouse needs it based on the plants you grow. i can't find tutorials like this, could you please share the way you implemented the turn on and off for the sensors? =)
by the way what are the best moisture sensors you tried? capacitive sensors can be some good quality model or they are all the same? I see the same models on all websites and it looks flimsy board with flimsy little copper on it, imho the soil can eat it fairly quickly. we need some with 'rods' , why nobody make good quality sensors with 2 aluminum rods or something? like the ones used to measure PH of the soil. it seems best option for a moisture sensors as well.
great tutorial! is there a way to only turn on the sensor once every few hours instead of constant electricity stream? the electricity 24/7 on the sensor anodes and cathodes (lol i feel smart remember some terms from high school classes) is what will make them deteriorate, not the moisture of the water (well that too, but not as fast as if electrons also are running 24/7 across the poles). can raspberry turn on and off these sensors?
I'm thinking about getting a bunch of these to put under the carpet in my basement and measure for leaks in the foundation when in rains. Do you think these sensors would be adequate for that?
Could you please advise me as to the following: How would I alter the code to add a relay to activate a 3v pump to water a plant when the sensor is dry?
This exactly what I’ve been looking everywhere to figure out how to do. Any luck?? I have a raspberry pi I can salvage from an old project in middle school, want a smart irrigation system.
I'm using Mu to run python on my raspberry pi and I noticed the codes aren't the same.is there is diffrance between one and another?(excuse my English)
¡I Love it! I have a question, how can I do the same but getting the measures in number? Can you do a video or give me some references for that please :)
Any text editor will do. You can create a file on your Pi and edit it there, or you can create it on your home computer and transfer it to the Pi. He's coding in Python and is running the code on the Pi.
Kazimir no you don’t need another pi for that. Just connect another sensor to different PIN number and copy that code, then change GPIO number (PIN number) in program
You will not be able to do this with this setup. Due to the nature of the sensor and the information only being shown as 0 and 1 depending on if the sensor detects more or less moisture than what is set up with the potentiometer on the board. A good graphing library for python is PlotLy which can be used to easily create graphs with data that you collect. However, be warned that using this setup you will only get boolean outputs which will make your graph look like a PWM signal and not like a curve which is probably what you want.
Believe it or not, problems like this are how you get better as a programmer / developer. In general, when you have an error, you end up learning a lot that you didn’t know about while trying to fix the error Try googling it. Look on stack exchange in particular, but any other site is probably fine. *dont get stuck on one solution though* read through a few of the solution, and get an idea of what you think is going wrong My guess is, you don’t the correct version of RPI installed. RPI is what’s called a library. It’s a bunch of code that’s pre written that allows python to do stuff on a raspberry pi. GPIO is a module, I.e. specifically the code for communicating with the GPIO pin out. When you import a module, python goes and looks for it. That means that either A) the module isn’t installed B) the module is installed, but is somehow incompatible with your version of python C) python can’t find your module A and B can be solved by reinstalling the version of the module. Just google “how to install ____ for python version ___ on a raspberry pi” C can be solved by finding where your module is being installed, and playing around with environment variables and installation locations (though idk much about Linux yet. I’m not sure how that works on a pi) Your issue is probably A or B, and figuring this out through google is a great exercise and learning experience. Good luck
I can already pridict you future and it is very bright. You should seriously have more subs!
To stop deterioration of the sensor conductor, only sense for 5-10ms and only sense every hour or whatever suits you, that way it's not constantly on and constantly performing electrolysis. If you don't do this then all the nasty chemicals leach into your soil and kill your plant, while your sensor will be inoperative after only a few weeks at most. The other alternative is to use a capacitive sensor instead.
how is it possible to control that sensor run time? can raspberry turn it on and off by a set interval like a cron job let's say or a python sleep timer? that's the correct way actually - because doesn't make any sense to run sensors 24/7, everyone should put an interval the way his greenhouse needs it based on the plants you grow. i can't find tutorials like this, could you please share the way you implemented the turn on and off for the sensors? =)
by the way what are the best moisture sensors you tried? capacitive sensors can be some good quality model or they are all the same? I see the same models on all websites and it looks flimsy board with flimsy little copper on it, imho the soil can eat it fairly quickly. we need some with 'rods' , why nobody make good quality sensors with 2 aluminum rods or something? like the ones used to measure PH of the soil. it seems best option for a moisture sensors as well.
@@babyfox205 I'll try and find my code.
@@babyfox205 Capacitive are more accurate than the double-rods, i also waterproofed mine .
Can you use digital signal to measure the water on a scale (f.x. 1 to 100) or is it always binary (true/false) ?
@@ThalesBroussard Did you figure it out? I want this aswell haha
I need an mcp3008 converter
U
@Johnny smirks DID you figure this ?
@@ThalesBroussard DID you figure this ?
I have a RPi 3 B+. How many sensors-water WRs can my single pi manage?
great tutorial! is there a way to only turn on the sensor once every few hours instead of constant electricity stream? the electricity 24/7 on the sensor anodes and cathodes (lol i feel smart remember some terms from high school classes) is what will make them deteriorate, not the moisture of the water (well that too, but not as fast as if electrons also are running 24/7 across the poles). can raspberry turn on and off these sensors?
I'm thinking about getting a bunch of these to put under the carpet in my basement and measure for leaks in the foundation when in rains. Do you think these sensors would be adequate for that?
Should work as it is basically sensing moisture. It's all about how you do the placing the unit.
Love the reference to Fiddler on the Roof. If my soil were rich, man. Doo be doo be doo.
Could you please advise me as to the following: How would I alter the code to add a relay to activate a 3v pump to water a plant when the sensor is dry?
yes
This exactly what I’ve been looking everywhere to figure out how to do. Any luck?? I have a raspberry pi I can salvage from an old project in middle school, want a smart irrigation system.
Chris Terrington any luck ?
Could you show an example where the sensor triggers a relay switch to turn on a pump?
Sir, is there MCP3008 inbuilt in Analog to digital converter in which you have used?
Yes I too have the same doubt
Sir ,can this sensor output as the value or range in pi better than digital value.
sir, good day what model of pi did you use in this video?
Great video! Thank you. Do you happen to know if anyone makes a leaf wetness sensor that can be hooked up to a raspberry pi?
trying this same thing with the explorerhat pro...no luck...any ideas
Is this water content (wc), volumetric or gravimetric......? Please clarify.
What does that mean? (WDTM)
@@unexplainedmysteries9540
This is a good question (TIAGQ).
What the hell are you guys on? Wthaygo?
@@jakealexandermurray9977
Question unclear, please specify! (QUPS)
could you do the same but using gpio zero library?
do you understand with kivy?
I'm using Mu to run python on my raspberry pi and I noticed the codes aren't the same.is there is diffrance between one and another?(excuse my English)
I get allways "no water" until I disconnect the wire from GPIO21 then its hopping between "no water" and water... Whats wron?
Mine just stays on Water, then when I disconnect pin 21 says no water...No idea what can the issue be...
¡I Love it! I have a question, how can I do the same but getting the measures in number? Can you do a video or give me some references for that please :)
Can someone tell me what application you need on the pi to do this with a link would be great
Any text editor will do. You can create a file on your Pi and edit it there, or you can create it on your home computer and transfer it to the Pi. He's coding in Python and is running the code on the Pi.
hi sir can you do this for real number or real moisture level into number or percent. for testing purposes sir:) thanks in advance.
No
Hi how many of YL-69 sensors should one place in a small garden?
You will need to test that for yourself depending on soil and plant type.
Some plants like drainage
What if I want to use multiple sensors? Do I need another Pi?
Kazimir no you don’t need another pi for that. Just connect another sensor to different PIN number and copy that code, then change GPIO number (PIN number) in program
excellent man...
Sir, can you please share the corresponding code which you have uploaded in the raspberry pi?
Check the link provided in the description
sir,may i know how to convert soil moisture sensor data into a graph?
This matter is off topic.
You will not be able to do this with this setup. Due to the nature of the sensor and the information only being shown as 0 and 1 depending on if the sensor detects more or less moisture than what is set up with the potentiometer on the board. A good graphing library for python is PlotLy which can be used to easily create graphs with data that you collect. However, be warned that using this setup you will only get boolean outputs which will make your graph look like a PWM signal and not like a curve which is probably what you want.
does this work with raspberry pi 2 b+?
Are the 3 pins VCC, GND and SIG?
Yes. VCC, GND, and SIG. Sometimes SIG is also shown as DO.
gr8...can you tell me how can i send the detection through email notification
Did you ever figure this out?
perfect, thank you :)
**it says import error there no module named RPI.GPIO** I'm a noob pls help😫
Believe it or not, problems like this are how you get better as a programmer / developer. In general, when you have an error, you end up learning a lot that you didn’t know about while trying to fix the error
Try googling it. Look on stack exchange in particular, but any other site is probably fine. *dont get stuck on one solution though* read through a few of the solution, and get an idea of what you think is going wrong
My guess is, you don’t the correct version of RPI installed.
RPI is what’s called a library. It’s a bunch of code that’s pre written that allows python to do stuff on a raspberry pi. GPIO is a module, I.e. specifically the code for communicating with the GPIO pin out.
When you import a module, python goes and looks for it. That means that either
A) the module isn’t installed
B) the module is installed, but is somehow incompatible with your version of python
C) python can’t find your module
A and B can be solved by reinstalling the version of the module. Just google “how to install ____ for python version ___ on a raspberry pi”
C can be solved by finding where your module is being installed, and playing around with environment variables and installation locations (though idk much about Linux yet. I’m not sure how that works on a pi)
Your issue is probably A or B, and figuring this out through google is a great exercise and learning experience. Good luck
RPi.GPIO
The i must be a short letter
This sensor corodes away in a few weeks if left in water.
It's a pity... Does any anti-corrosion spray help in this case or it will influence the measurements?
Just a note, this approach/sensor is deprecated. Check out: th-cam.com/video/UWbeHqyzP-c/w-d-xo.html for a more up-to-date tutorial
This is not a moisture sensor, this is a water detector. For a moisture sensor you need an ADC converter.
The blue curcit is a basic a-d curcit.
How to do the same for i want it in display of high med and low
That intro 😏
:)
There is an easier way for novice programmers, your method is not entirely clear in terms of programming.
Can you explain the code nicely without that laziness in your voice
On which ide you are working with rapberry pie and how can i connect rapberry pie with it??