SOIL MOISTURE SENSOR FOR PLANTS (V1.2 / V2.0) - Arduino tutorial #31

  Переглядів 140,528

Bas on Tech

Bas on Tech

День тому

The capacitive soil moisture sensor allows you to measure the moistness of soil. The biggest advantage over a traditional moisture sensor is that the capacitive sensor doesn't corrode. In this tutorial I'll explain how you can read the soil moisture sensor and what the advantages are. Further you learn how to work with the map() function and how to calculate the soil moisture in percentage.
Many ask what the difference is between v1.2 and v2.0, this is what I found:
- The spelling of the out pin: AOUT on v1.2 and AUOT on the v2.0
- The top of the PCB shows a tiny circle on v2.0
🤓 Fun fact: One pin on my sensor is labeled AUOT which should be AOUT for Analog OUT.
The Arduino for beginners tutorials series guides you through the world of Arduino. A video is around 10 minutes and shows you step-by-step how to build the circuit and write the code. The website contains the course material, circuit diagram, Arduino code and shopping list of all the components used in the tutorial.
⬇️ Course material, circuit diagram, code and part list arduino-tutorials.net/tutoria...
👉 More tutorials and projects on arduino-tutorials.net
🇳🇱 Deze tutorial is ook in het Nederlands beschikbaar • 🇳🇱 CAPACITIEVE VOCHTSE...
CHAPTERS:
00:00 Introduction
00:15 Components
00:30 Capacitive soil moisture sensor
02:57 Building the circuit
03:34 Arduino code - part 1
04:42 Arduino code - part 2
COMPONENTS
🇨🇳 Arduino Uno (clone) with cable - AliExpress
arduino-tutorials.net/r/Jd28hF
🇳🇱 Arduino Uno (clone) - Opencircuit
arduino-tutorials.net/r/8237Hd
🇳🇱 Arduino Uno SMD (original) - Opencircuit
arduino-tutorials.net/r/Ud29dh
🇳🇱 Arduino Uno Chip (original) - Opencircuit
arduino-tutorials.net/r/Jd82ha
🇨🇳 1x breadboard small - AliExpress
arduino-tutorials.net/r/7364GD
🇳🇱 1x breadboard small - Opencircuit
arduino-tutorials.net/r/238Jds
🇨🇳 1x breadboard large - AliExpress
arduino-tutorials.net/r/FDH28dh
🇳🇱 1x breadboard large - Opencircuit
arduino-tutorials.net/r/8237Dh
🇨🇳 Jumper wire assortment (MM/MF/FF) - AliExpress
arduino-tutorials.net/r/Fh378fg
🇨🇳 Jumper wire male-male - AliExpress
arduino-tutorials.net/r/7346GD
🇳🇱 Jumper wire male-male - Opencircuit
arduino-tutorials.net/r/8237Jd
🇨🇳 128x64 I2C OLED (blue) - AliExpress
arduino-tutorials.net/r/Fh83gf
🇳🇱 128x64 I2C OLED (blue) - Opencircuit
arduino-tutorials.net/r/923Hfg
🇨🇳 128x64 I2C OLED (white) - AliExpress
arduino-tutorials.net/r/34hFGd
🇳🇱 128x64 I2C OLED (white) - Opencircuit
arduino-tutorials.net/r/38HFks
🇨🇳 128x64 I2C OLED (yellow-blue) - AliExpress
arduino-tutorials.net/r/dhf83D
🇳🇱 128x64 I2C OLED (yellow-blue) - Opencircuit
arduino-tutorials.net/r/283Jfh
🇨🇳 20x colored tactile switches - AliExpress
arduino-tutorials.net/r/73fHd
🇳🇱 5x colored tactile switches - Opencircuit
arduino-tutorials.net/r/834jFH
VIDEO SUMMARY:
In this tutorial, Bas will show you how to use a capacitive soil moisture sensor. You'll need an Arduino board, the sensor, a sensor cable, jumper wires and a glass of water. He explains that the sensor works by measuring the resistance between two pins which changes based on the water level in the soil. However, he warns that fertilizers and corrosion can affect the sensor's accuracy. Instead of measuring resistance, this sensor works like a capacitor, measuring charge and discharge timing. The sensor also has a chip called a 555 timer chip which helps with timing. Bas will guide you on how to connect the sensor to the Arduino board and run the code. Finally, he'll show you how to calculate the percentage of moisture in the soil by adjusting the code and measuring the total range of the sensor.
#arduino #BasOnTech

КОМЕНТАРІ: 321
@drumak77
@drumak77 3 роки тому
Such a great tutorial. I loved how thorough your explanation was. Subscribed!
@BasonTech
@BasonTech 3 роки тому
Awesome, thank you! 😃
@FerneyManrique
@FerneyManrique Рік тому
Man!!! You explained that map() function so clearly. Thanks a lot!
@BasonTech
@BasonTech Рік тому
Thanks! 😃
@jakoblecker6592
@jakoblecker6592 4 роки тому
Your videos are pretty awesome! Thank you.
@BasonTech
@BasonTech 4 роки тому
Hi Jakob, great to hear, thanks! 😃
@MrBobWareham
@MrBobWareham 3 роки тому
Thank you for your explanation of a capacitive sensor very good
@BasonTech
@BasonTech 3 роки тому
You are welcome 😃
@n00veloper
@n00veloper Рік тому
Well a smarter way to do it, is self adjusting the moisture, like saving the variable in a permanent memory (store even when turn off) and re-ajust by when a higher or lower score hits than the stored range. (Button of reset is needed if change the circuit)
@jumalkull
@jumalkull 2 роки тому
Дякую за детальну інформацію!
@BasonTech
@BasonTech 2 роки тому
Sorry I can only read English and Dutch 😄
@BorisSiber
@BorisSiber Рік тому
Thanks for teaching and sharing. May the force be with you :)
@BasonTech
@BasonTech Рік тому
Thanks Boris! 😃
@malcolmmcgrath9344
@malcolmmcgrath9344 2 роки тому
Well I got my sensor in the mail, copied the code, plugged it in, calibrated it, stuck it in some almost dry potting mix and got a reading of 35% and then added some water to the pot and got a reading of 57%. So for me if the reading is less than 20%, water is needed, if more than 20% it doesn't need water. Your code works a treat, your explanations were terrific. Thank you very very much ! Now all I have to do is solve my wretched SD card and RTC issue and I have myself a hand dandy watering controller.
@BasonTech
@BasonTech 2 роки тому
Great to hear! 😃
@nounouak4711
@nounouak4711 3 роки тому
Best explanation so far ; you just gained a like on the video and a sub in your channel
@BasonTech
@BasonTech 3 роки тому
Thanks! 😃
@nurfarhanafarishamudin4856
@nurfarhanafarishamudin4856 3 роки тому
love your explanations.
@BasonTech
@BasonTech 3 роки тому
Thank you! 😃
@__best_n_pics__5207
@__best_n_pics__5207 4 роки тому
Well done love it 👌🏻
@BasonTech
@BasonTech 4 роки тому
Thank you 😁
@kreynolds1123
@kreynolds1123 3 роки тому
Overlooking the nonlinearity in capacitance and hydration, map is a nice function. Not knowing better but wanting the same result, I would have done hydration=100×(measured - dry)/(wet-dry)
@BasonTech
@BasonTech 3 роки тому
Thanks for sharing! 😃
@pidespidergaming1573
@pidespidergaming1573 10 місяців тому
Hey there, I;m trying to make a project where accuracy is much needed. Can I use this formula for calculation of moisrture content(considering it's non linear as you said)
@kreynolds1123
@kreynolds1123 10 місяців тому
You may use what ever formula you like. I have not confirmed it but I believe the map function is doing the same exact thing as this formula. It is good to understand what the readings is putting out and why. If you are not already familiar with the electronics I'd sugest to first Google "rc time constant" then goto images and find an rc time constant graph to examin and understand how charging or discharging an rc network (resistor and capacitor) workes. Additionally, Google Schmitt trigger, and read up on that. The rc time constant is how long it takes to charge to 63.2% of of the voltage applied to a resistor and capacitor. That's pretty close to the % of supply voltage a Schmitt trigger needs to switch from a 0 to a 1 or discharge a capacitor to 32.8 % of supply voltage to switch the schmitt trigger output back back to a zero. It's so close it serves well as an aproxination to the rc time constant. The Schmitt trigger output is the digial input to the arduino. It's either fully on 1 or fully off 0. If you time how long it takes to switch on or off then you learn the rc time constant. Its a period of time increased by either an increase in capacitance or an increase in the resistance and changing the duelectric of the spik changes the capacitalnce. If you know the resistor value you can determin the capacitance between the two plates, or determin a max capacitance with water saturated soil, and minimum capacitance for soil that is bone dry. More capacitance simply takes longer to charge and to discharge through the restance of the resistor. As pointed out in the video, fertilizer may change the conductivity, but it may also change the capavitive dielectric properties of the soil. And soil itself has different dielectric properties than air. So calibrating the fully wet and fully dry values of the soil helps get the most accurate readings. I'd sugest to prepare relativly large soil samples. One dried in a stove to 100c or slightly higher, And the other with soil that is saturated but allowed the water to drain. Then measure the time constant for the soils. Capacitance us effected by things at a distance si use reasonable sized sample. I belive well water saturated but drained soil is better to call 100% because in the ground, the soil can not retain any more water than that. And dry soil has a different capacitance than air, so using actual soil to calibrate the dry and wet rc time constant values gives better values to represent actual fully dry and fully wet. It's possible where a soil has poor drainage for it to get super saturated. An analogy is holding a sponge under water, versus simply dunking the spong and letting the excess drain out. Super saturated soils may result readings greater than 100% (super) saturation when their is more water than the soil can hold. Seeing as the roots of most plants need oxygen, supersarurated soil is not desirable and one should ensure the soil can adequately drain.
@pidespidergaming1573
@pidespidergaming1573 10 місяців тому
@@kreynolds1123 thankyou for clarifying. I'll try some of your suggestions and write out the results :)
@parthgoel1084
@parthgoel1084 3 роки тому
Thank you so much! This is very helpful!
@BasonTech
@BasonTech 3 роки тому
Glad it was helpful! 😃
@jianliu8806
@jianliu8806 2 роки тому
The code is exactly the same as the one used for the resistivity sensor! that can be very handy to compare both
@dipyamanmukherjee5729
@dipyamanmukherjee5729 3 роки тому
Great experience . Plz add more videos
@BasonTech
@BasonTech 3 роки тому
Thanks! 😃
@mosquitsch9281
@mosquitsch9281 3 роки тому
Mapping the values directly to percentages assumes that the change is linear, which is not the case. I wish more tutorials would point out this fact. Better way would be a calibration test, where a dry soil sample is watered by tiny amounts of water until its fully saturated. This will give you a nonlinear function. Then you could fit a curve (e.g. a logarithmic function) to your observed values and apply a proper calibration.
@BasonTech
@BasonTech 3 роки тому
Good point! Thanks for sharing! 👍🏻
@JaredLucas
@JaredLucas 3 роки тому
I think he's provided all the instruction necessary in text. He saved you the time you'd have to spend watching a video. For practical applications, if you know when to water a plant, you can just take a reading at that point and make it the "water now" level. Take another reading after watering until water comes out the bottom of your pot and you call that "100%". It's not actually 100%, but it's as watered as the soil will get. Then get some pumps and maybe some relays and get to auto watering. At least that's my plan.
@kreynolds1123
@kreynolds1123 3 роки тому
@@JaredLucas great point. I would even go so far to say that % concept isn't needed. One only needs a value for when to add water and a value for when to stop.
@Ferreira019760
@Ferreira019760 2 роки тому
@@kreynolds1123 you are right, it would work as you said, however if you follow gardening instructions for watering plants, will that not refer to moisture in percentage? It could save some time and plenty of trial and error to convert the range to percentage as it was shown and just base the watering on whatever moisture percentage is advised for a certain species. If I’m missing something can you kindly let me know?
@kreynolds1123
@kreynolds1123 2 роки тому
@@Ferreira019760 How about stick ones finger in the dirt every so often. When you sence it is ready to be watered take your reading and call that value the time to water value. On further thought, one only needs a predetermined amount to water. So water 5 seconds,10 or what ever is needed. Adapt the concept to the specific needs of the plant. Many times the biggest problem is waiting for the perfect, as it gets in the way of getting started. I'm speaking from personal experence worrying about every little detail has held me back on numerous projects, and try to keep it simple.
@joejonathansitinjak3560
@joejonathansitinjak3560 2 роки тому
Thx for the tutorial
@BasonTech
@BasonTech 2 роки тому
My pleasure! 😃
@user-cj4hv7lm3m
@user-cj4hv7lm3m 3 роки тому
very helpful for me! thanks
@BasonTech
@BasonTech 3 роки тому
You're welcome! 😃
@BasonTech
@BasonTech 3 роки тому
Many ask what the difference is between v1.2 and v2.0. There isn't much information available. This is what I found out so far myself: - The spelling of the out pin: AOUT on v1.2 and AUOT on the v2.0 - The tip on the top-side of the PCB shows a tiny circle on v2.0
@sourface1000
@sourface1000 10 місяців тому
there is absolutely no difference some circuits are different and some are also faulty it depends on supplier from which tou bought the sensor
@zatsion2299
@zatsion2299 6 місяців тому
The tip on the top-side of the PCB it doesn't have any function at all? I'm asking to know whether or not to put a little lacquer to avoid corrosion due to water seepage.
@BasonTech
@BasonTech 6 місяців тому
​@@zatsion2299 I guess using lacquer on the sensor will immediately stop any capacitive function of the sensor
@marcus9x9
@marcus9x9 11 місяців тому
Thank you so much 🤩🤩
@BasonTech
@BasonTech 11 місяців тому
You're welcome! 😃
@dulasura762
@dulasura762 Рік тому
Bravo !! Nice explanation
@BasonTech
@BasonTech Рік тому
Thanks! 😃
@nighttime9539
@nighttime9539 3 роки тому
Good tutorial, thanks.
@BasonTech
@BasonTech 3 роки тому
My pleasure! 😃
@mzm6235
@mzm6235 3 роки тому
It's help me so much. Thank you.
@BasonTech
@BasonTech 3 роки тому
Super! 😃
@techheck3358
@techheck3358 10 місяців тому
The reason for the slow response time at the end is because your sensor is faulty, there is no pulldown resistor on the analogue output. At 0:01, on the bottom right of the sensor, just below C4 and R4, the via hole is breaking the trace. You need to run a wire from the right side of R4 (nearest to the end), to the analogue output pin. Check out the video by “flora” on capacitance soil sensors
@BasonTech
@BasonTech 10 місяців тому
Thanks for sharing! 👍
@daryldyehouse6404
@daryldyehouse6404 3 роки тому
Very cool Bas. I just stumbled upon your Channel today!,
@BasonTech
@BasonTech 3 роки тому
Hi Daryl, glad to hear you liked it! 😃
@sergeygrakovsky2749
@sergeygrakovsky2749 3 роки тому
Great video! Thanks 👍👍👍
@BasonTech
@BasonTech 3 роки тому
Great to hear! 😃
@natasouza3409
@natasouza3409 3 роки тому
Nice video! It helped a lot
@BasonTech
@BasonTech 3 роки тому
Glad it helped! 😃
@bailymartin4305
@bailymartin4305 3 роки тому
Really great video!
@BasonTech
@BasonTech 3 роки тому
Thank you! 😃
@danandersson9926
@danandersson9926 4 роки тому
Ty you helped me alot
@BasonTech
@BasonTech 4 роки тому
Great to hear! 😃
@niclaskopp2780
@niclaskopp2780 3 роки тому
awesome and helpful video!!
@BasonTech
@BasonTech 3 роки тому
Great to hear! Thanks! 😃
@koriotstep
@koriotstep Рік тому
thank you for video ~
@BasonTech
@BasonTech Рік тому
You're welcome! Hope you liked it 😃
@tomkregenbild
@tomkregenbild 3 роки тому
Thanks for the great explanation A few questions: 1. Is this solution scalable for a large garden with about 50 pots. What is the proper way to measure multiple pots at once? 2. How do you protect the sensore from water in case you want to keep it constantly in soil even when raining?
@BasonTech
@BasonTech 3 роки тому
Hi Tom, to be honest I think this sensor is more suitable for fun projects than for a large garden. This sensor turned out not to be very accurate and the durability is questionable as well.
@kreynolds1123
@kreynolds1123 2 роки тому
@@BasonTech How was it less durable than you expected? Was there corrosion of the plates? And if so where they actually coated to prevent current flow across the plates? As to accuracy, one will find that a saturated soil will have a different capacitance than pure water. Water has a high dielectric constant. But salts in the soil and the soil itself even when fully saturated with water will have a lower capacitance than pure water. So a reading with 100% saturated made from pure water will only ever read 100% again in pure water. And in another comment it was pointed out that the resistor needed to be grounded. If you had taken saturated and dry soil reading as references instead of air and pure water readings, and had grounded the resistor, would these have resolved accuracy issues? As for practicality, there's water logged soil saturation with no to poor drainage and then there's freshly watered soil saturated with as much water as it will hold before it drains excess. Which is best called 100% saturated? I don't know which convention is typically used. But, it seems more usefull to me factoring in drainage, because there's no point in watering more than a soil will hold, so take a reading in the soil when the soil is well watered and begines draining should be considered saturated and and then another reading when soil is completely dry calling that dry. But, ultimatly what we really want to know is when to add water and how much is sufficient. taking readings for both when we decide it needs water and when it has been sufficiently watered. We can call those values StartWatering and StopWatering. Or maybe some people simply want to know the actual % hydration at a given point in time.
@neranjanranaweera7411
@neranjanranaweera7411 2 роки тому
This is great video. I'm experimenting same sensor for Rock moisture variations. Could you do a video how to connect those sensor to a data logger. Thank you for the good work
@BasonTech
@BasonTech 2 роки тому
In ukposts.info/have/v-deo/iImcroCIn3x_zXU.html I explain how to connect an audio sensor to the data logger. With the help of this video you should be able to connect the moisture sensor as well. 😃
@doogie1350
@doogie1350 10 місяців тому
I actually prefer the resistive sensors. You turn them on one by one for two seconds, store their values in variables and then read those variables and activate the pumps. You run the code every thirty minutes, this way the sensors last a very long time, because they're only powered for a couple of seconds per hour.
@shooterdotnet
@shooterdotnet Рік тому
Thanks!
@BasonTech
@BasonTech Рік тому
Many thanks! Appreciated! 🚀
@aforodoma
@aforodoma 3 роки тому
Thank you so much for this video. I will use it as my guide. Please do you have a tutorial on using several soil moisture sensor to one arduino?
@BasonTech
@BasonTech 3 роки тому
Thanks! With this tutorial it shouldn't be ver hard to readout multiple sensors. Just connect the AOUT to a new analog pin and read the sensor 😃
@aforodoma
@aforodoma 3 роки тому
@@BasonTech Thank you so much
@boobler2626
@boobler2626 2 роки тому
The Vegtronix seems very nice. Just ordered one
@BasonTech
@BasonTech 2 роки тому
Kind of curious if this one will corrode 😃
@boobler2626
@boobler2626 2 роки тому
@@BasonTech in 2 weeks in will have it in coco to test. It will be in the pot permanently.
@ayushagrawal8840
@ayushagrawal8840 2 роки тому
Hello! It was a great video. I wanted to plug this to SparkFun ESP32 Thing (which only has options of Vcc as 3.3V) Should I proceed similarly or do I need to make some changes?
@BasonTech
@BasonTech 2 роки тому
As far as I know this sensor is made for 5V perhaps your can find a 3V moist sensor somewhere?
@andrewyazhgur9254
@andrewyazhgur9254 2 роки тому
It should work with a 3V3 input
@cannatherapeutics2390
@cannatherapeutics2390 3 роки тому
Great video! I actually got it to work. Do you know how I could find a way to attach an OLED to show a reading? I.m looking all over and can't get it to work..appreciate your videos though!
@BasonTech
@BasonTech 3 роки тому
You can just follow my tutorial at arduino-tutorials.net/tutorial/128x64-i2c-oled-display-ssd1306-on-arduino
@BasonTech
@BasonTech 4 роки тому
👉 Don't forget to check arduino-tutorials.net for the code and 35 other Arduino tutorials and projects. If you have questions, don't hesitate to ask them in de comments. Remember: There are no stupid questions 😃 🔔 Want to stay up-to-date with the latest videos? Subscribe to the Bas on Tech channel!
@mrnobody2492
@mrnobody2492 3 роки тому
Hope will read this when u need help. I tried it by my self to read the moisture and it didn't changed the value even thought the sensor was in wet soil. The problem was that I plugged the sensor nearly close to the edge of the flowerpot and the sensor got no good connection to the soil. You have to be sure that the sensor is really pressed at the front side of the sensor (front side = Label side with Capacitive ....)
@BasonTech
@BasonTech 3 роки тому
Thanks for sharing! 👍🏻
@jonwelburn5406
@jonwelburn5406 2 роки тому
thank you for the tutorial. i've been going mad with someone else's sketch not working. obviously im creating an automated watering system so do you have a further tutorial that will help connect a relay to this so the moisture sensor activates the pump and if so could i please have the link. really nice video though so thanks again
@BasonTech
@BasonTech 2 роки тому
Unfortunately I don't have a tutorial about a relay. However there is not so much difference in connecting a relay board and a LED. Just make sure that the relay has the correct specs for your project and Arduino. Some operate at a different voltage than the Arduino.
@Druidddd
@Druidddd 2 роки тому
Can someone help me with the code i have 2 capacitive soil moisture sensor with different dry/wet sensor, how will i declare it?
@sahilrai8592
@sahilrai8592 2 роки тому
can you provide me the litrature review of this
@casbremer7793
@casbremer7793 2 роки тому
i want to use 3 of these sensors on a plant but i was wondering if there can be problems when u put the side of the sensor with the electric components in the soil ass well. maybe that pasrt cant get weet and i have to make it watter tight
@BasonTech
@BasonTech 2 роки тому
I wouldn't recommend to do that. Maybe hotglue can help to seal the parts, but still. When the parts get wet it will damage your sensor.
@casbremer7793
@casbremer7793 2 роки тому
@@BasonTech ohw okay that makes sense thank you!
@matejholec5017
@matejholec5017 3 роки тому
Hi, i love the video, but i have a question, if i wanted to connect 4 moisture sensors, can i plug them all into one arduino? how would i manage the power input into all the sensors? im trying to make indoors irrigation system and im looking for a way that every plant(i've got 4) wil have its own moisture sensor. Thanks in advance :)
@BasonTech
@BasonTech 3 роки тому
Sure! They can share the 5V and GND. The Arduino Uni has 6 analog in so you can use 6 of then together 😃
@aforodoma
@aforodoma 3 роки тому
@@BasonTech Thank you so much for this video. I will use it as my guide. Please do you have a tutorial on using several soil moisture sensor to one arduino?
@kreynolds1123
@kreynolds1123 2 роки тому
Noting the length of time for the reading to go from 0 to 100% hydration. Maybe the delay could be a problem with automatic watering. Anyway to reduce the delay?
@BasonTech
@BasonTech 2 роки тому
I remember that some modified the sensor. But unfortunately I can't pinpoint anymore what it was :/
@smartassist9700
@smartassist9700 3 роки тому
Can you add to this a water pump that will be triggered when soil dry. It will pump water until sensor detects water added then auto shut off pump. The pump can be small as it will water a single plant. Disabled, I need to make 100 of these set ups to grow food.. Most Humble Appreciation! Alton
@BasonTech
@BasonTech 3 роки тому
Hi, I thing there are better solutions available than using this sensor times 100. For such an implementation this sensor is simply not suitable.
@emmanuellarion9943
@emmanuellarion9943 Рік тому
Is it possible to use this other than soil but will use the calibration?
@BasonTech
@BasonTech Рік тому
Not really, this sensor is especially made for soil moisture
@arupmallik3070
@arupmallik3070 2 роки тому
What does AP and STC mode stands for version 2.0 capacitive sensors?
@BasonTech
@BasonTech 2 роки тому
Where did you read about these modes? I've never heard about them 🤔
@astropacc1951
@astropacc1951 2 роки тому
How would you do this for multiple sensors sometime like 30+ individual pots with sensors
@BasonTech
@BasonTech 2 роки тому
I would not recommend using that many of these sensors. They quality of these is quite questionable. However, you might want to look into "multiplexing".
@wes2242
@wes2242 3 роки тому
if you have multiple sensors do each need their own set of wet/dry const int?
@BasonTech
@BasonTech 3 роки тому
Hi, I don't think that is needed. However these numbers will differ between sensors. The question is how much they differ and if this is an acceptable bias for you. Otherwise you need to create a new wet/dry const for every sensor. In this way you calibrate them individually. 😃
@wes2242
@wes2242 3 роки тому
@@BasonTech Thanks a lot, nice videos!
@BasonTech
@BasonTech 3 роки тому
@@wes2242 You're welcome and thanks! 😃
@Druidddd
@Druidddd 2 роки тому
Hello, can someone teach me the code when you hzve multple sensors
@MrAtlantis95
@MrAtlantis95 Рік тому
Nice video, I just tried something with a Raspberry Pi Pico W using also an oled screen. I have two questions. 1. What is the difference between version 1.2. and 2.0? 2.I used a version 1.2 in combination with a raspberry Pi. I found out that in case of using a solar panel the values measures are different. What are your experiences with this behaviour??
@BasonTech
@BasonTech Рік тому
Hi! 1. See my comment on this video. 2. Didn't have any experience with this setup, sorry.
@Jtstien
@Jtstien 10 місяців тому
Are you missing the voltage regulator V2 on the board?
@sigmadews5403
@sigmadews5403 3 роки тому
Great tutorial! I wonder if this sensor would be useful for measuring moisture in round hay bales?
@BasonTech
@BasonTech 3 роки тому
Hi, would a humidity sensor not be sufficient instead of a moisture sensor?
@sigmadews5403
@sigmadews5403 3 роки тому
@@BasonTech Most of the currently used sensors for this application are called moisture sensors. They are using the resistance method. Which sensor would you personally suggest for this application?
@BasonTech
@BasonTech 3 роки тому
I was more thinking about a DHT11, but I am no expert on this one 😄
@sigmadews5403
@sigmadews5403 3 роки тому
@@BasonTech Thanks! I'm no expert either ...
@thomasedlinger905
@thomasedlinger905 3 роки тому
@@sigmadews5403 Hi, a BME280 Sensor is great and can measure temperature, humidity and as bonus also the pressure. Nice greetings Edi
@Riley_Christian
@Riley_Christian 2 роки тому
So the map range is clamped by default? Or will it go over 100% like 101% or below zero -1% for example?
@BasonTech
@BasonTech 2 роки тому
As far as I know it is camped indeed. It will not map outside the range.
@Riley_Christian
@Riley_Christian 2 роки тому
​@@BasonTech So I finally experimented with it a bit. At first it seemed like this was the case, but I eventually found out that it can indeed go to -1% and further as well as 101% and beyond. So its unclamped and I don't think there is a clamped version of the map range function (That I know of) For anyone wondering, I clamped the range with a simple if statement: if(moisturePercent > 100) {moisturePercent = 100;} if(moisturePercent < 0) {moisturePercent = 0;} This way we can make it hit 100% without going over. And for me, send a warning message that its too wet or dry and something could be broken or leaking. Cheers 👍
@peterm.4026
@peterm.4026 3 роки тому
Best video on this sensor! Question for you. On other videos they seal up the sides of the sensor...I don't think you do that...do we need to seal up the sides with epoxy or something like that?
@BasonTech
@BasonTech 3 роки тому
Hi Peter, I am not aware of the need to seal the sensor. Neither do I know if it will affect the inner working.
@Ed19601
@Ed19601 3 роки тому
Yes the sensor leaks from the sides. They are sealed before scoring thus the sides were never covered
@peterm.4026
@peterm.4026 3 роки тому
@@Ed19601 thanks, I keep running into an issue where when I first stick it in water i get great readings, but then eventually I just get zeros. I "sealed" the sides with nail polish that I had laying around as someone on another video has done. Is this because I didn't really seal it? You think the nail polish is a bad way to seal? Should I order some sort of epoxy?
@Ed19601
@Ed19601 3 роки тому
@@peterm.4026 most nail polish will start to leak after a short time
@peterm.4026
@peterm.4026 3 роки тому
@@Ed19601 what's the best sealant for this? I'm on amazon right now lol
@lemuelteodoroviolante4875
@lemuelteodoroviolante4875 3 роки тому
your video is awesome. 1 question, do you think the soil moisture sensor is going to sense the oil or just the water?
@BasonTech
@BasonTech 3 роки тому
Hi, I think it isn't recommended to use this sensor in oil. It might damage the PCB and oil doesn't conduct the same way as water does 😃
@lemuelteodoroviolante4875
@lemuelteodoroviolante4875 3 роки тому
@@BasonTech how about we try to attached a probe into the board so that the probe will be the one submerged in water with oil? I am planning to do a project about water in an oil and this capacitive sensor is one of my option because I tried resistive sensor but it is not functioning well with water detection in the oil
@BasonTech
@BasonTech 3 роки тому
Of course you can always give it a shot, they're not that expensive 😃
@kreynolds1123
@kreynolds1123 2 роки тому
The dielectric constant (effecting capacitance) for air is 1 and many oils is about 3 and pure water will be close to 80 but changes with temperature. Considering a smaller change in dielectric constant between air and oil, and slightly different constant for different oils, then it might be hard to get accurate readings. For many different kinds of oils. On the other hand, because of the big difference in dielectric constants between oil and water seeing a big change in the capacitance measured could easily sugest the presence of water. And keep the sensor away from metal walls that will mess with the readings.
@jacobwigent1931
@jacobwigent1931 2 роки тому
Really great and high quality tutorial, I do have one question though, I just got four 2.0 sensors and after setting things up on my arduino board the analog value shown in the serial monitor doesn’t change even when I put the sensor directly in water, do you have any idea why that is? I plan on testing the other sensors later today
@BasonTech
@BasonTech 2 роки тому
Please be aware that there is a line on the sensor which indicates the max level of water. The electronic components should not become wet. Maybe your sensor has a different pin layout which needs the sensor to connect differently?
@jacobwigent1931
@jacobwigent1931 2 роки тому
@@BasonTech Thanks for the fast reply! I am aware of the max depth line in fact I’ve already waterproofed the top part of the sensor with all the electronics. Interestingly I connected the sensor to my uno instead of my mega and it seemed to work fine after I fixed a couple of issues. I still have no idea why it didn’t work on the mega but I was planning on using my uno for the project anyways. Thanks again!
@sebbayram1342
@sebbayram1342 2 роки тому
Can you use several sensors on the same Arduino? And how could that be? Thanks for great explanation btw!
@BasonTech
@BasonTech 2 роки тому
Sure! You can share the Vcc and GND between sensors. Then you use different pins on the Arduino to connect the AOUT sensor pin to 😃
@user-jt4yk5gm6i
@user-jt4yk5gm6i 2 місяці тому
hello, can I use the capacitive soil moisture sensor to detect/measure moisture in oil
@BasonTech
@BasonTech 2 місяці тому
I am quite sure you can't. The oil will probably damage the PCB. This sensor is as far as I know for soil.
@user-jt4yk5gm6i
@user-jt4yk5gm6i 2 місяці тому
@@BasonTech Thanks for your reply, I am doing final year project and part of it is about monitoring transformer oil quality, more specifically its dielectic strenght. Moisture/water reduces dielectric strenght of transformer oil that in most cases lead to explosion of the transformer , what sensor can you recommend that I can use to detect/measure moisture in oil
@BasonTech
@BasonTech Місяць тому
Unfortunately I have no experience with such a sensor. You might want to ask this question on Facebook / Reddit Arduino groups.
@frandiezrock
@frandiezrock 3 роки тому
Does this sensor rust after a while? I've seen a ton of other sensors that rust after a short period of use
@BasonTech
@BasonTech 3 роки тому
At least not as bad as the "two probe" sensor. I have no experience with using this sensor for a long time. Andreas Spiess had made a nice video explaining this ukposts.info/have/v-deo/rZSefq-lmnqn2GQ.html
@frandiezrock
@frandiezrock 3 роки тому
@@BasonTech Yes! I've seen Andreas video. Thanks for answering!
@giovannimurru
@giovannimurru 3 роки тому
I have 3 Capacitive Soil Moisture Sensor v1.2 and they are working only with 5 volts! If I use 3.3 volt I always read 0! Furthermore each of the 3 sensors has a different dry-wet range. For example one is 600-800 the other is 700-900. Is it normal for this kind of sensors to have different range for wet and dry?
@BasonTech
@BasonTech 3 роки тому
Hi, I know there are some issues with these sensors. I can imagine that the range depends on the components. For the best result you need to calibrate each sensor individually
@magouero
@magouero 3 роки тому
Most probably you have the same problem than mine: NE55 mounted instead of TLC555C(or...i) Check this video from Stewart that will help you to solve. ukposts.info/have/v-deo/iXd0pqqPnW6KtKc.html
@koprolith
@koprolith 3 роки тому
I Use the 1.2V variant as well and can confirm that the ranges are indeed different when the sensors are in the soil. This comes from different local soil composition and especially the local pressure/tightness of the sensor within the soil. Even slightly touching the sensor while in the soil results in persisting value jumps, as the soil loosens around the sensor.
@yogitajadhav636
@yogitajadhav636 3 роки тому
Which software applications is used for programming
@BasonTech
@BasonTech 3 роки тому
I am using the Arduino IDE which you can download for free at www.arduino.cc/en/Main/Software 😃
@yogitajadhav636
@yogitajadhav636 3 роки тому
Thnxx😊
@dennelvillarias
@dennelvillarias Рік тому
Hi sir, may I ask why my serial monitor prints a reading over 100% when i put my sensor in the soil? when in air it is 0%
@BasonTech
@BasonTech Рік тому
Is it wet or dry soil?
@dennelvillarias
@dennelvillarias Рік тому
@@BasonTech it's after i remove it in the wet soil
@francisnabasca9245
@francisnabasca9245 8 днів тому
Your video tutorial helps me a lot on setting up my soil sensor. However i cant use it yet since i dont have the code, where can i see the code? if it's okay, for my research
@BasonTech
@BasonTech 8 днів тому
In the video description of every video is a link to the code 😃
@monalishapramanik7990
@monalishapramanik7990 3 роки тому
what is the unit of these wet and dry values?
@BasonTech
@BasonTech 3 роки тому
It is not really a unit, it a conversion of the sensor value to the Arduino range. So the sensor gives 0-5V and the Arduino maps this to 0-1023
@noobality3890
@noobality3890 2 роки тому
ook here is the thing, your values are changing very slowly which are supposed to change just after the change in moisture. The reason is the resistor which is not connected to the ground, Due to this the capacitor discharges very slowly. To get the accurate value you'll have to connect the resistor(R4) with the ground.
@BasonTech
@BasonTech 2 роки тому
Thanks for sharing! 👍🏻😃
@kreynolds1123
@kreynolds1123 2 роки тому
Thank you for this tip, as automated watering might have problems over saturating the soil if the sensor takes a long time
@noobality3890
@noobality3890 2 роки тому
@@kreynolds1123 yeah you will see the major changes in readings after grounding the R4 because the capacitor wasn't discharging previously. actually 82% of the capcitive sensors which are available in the market are faulty.. and the common fault is discharge resistor not connected to the ground.
@gewurzbonon9039
@gewurzbonon9039 Рік тому
Amazing difference, didn't know that, thanks a lot! This definitely removes my the workaround (with wait cycles) to not make a mess
@3maisons
@3maisons 3 роки тому
This video ukposts.info/have/v-deo/qJR4hqlufo5zxnk.html is a useful explanation for how the soil sensor works internally. Note that it mentions that U2 is a 3.3v voltage regulator, so that the output is limited to 3.3 volts. On a 5 volt arduino, analogRead() will report a maximum of 3.3/5 or 66% of full scale. If the analog to digital converter gives 10 bit results, full scale is 1023 (i.e. 2^10-1) and the maximum possible returned value is 675. Bas on Tech is getting a max real world value of 600, not too surprising, especially since the 3.3v will drop across a diode (labelled D1 on my moisture sensor) on its way by an RC smoothing circuit to AOUT.
@BasonTech
@BasonTech 3 роки тому
Thanks for sharing, great background information on the sensor! 😃
@roninfyc
@roninfyc 3 роки тому
how about the water pump side ? how is the connection and the Arduino code ?
@BasonTech
@BasonTech 3 роки тому
There are multiple options: you can use a valve which you switch with a relais, or a pump which you turn on/off at a desired level.
@KnightBear123
@KnightBear123 Рік тому
how long does the sensor last if used continuously?
@BasonTech
@BasonTech Рік тому
Unfortunately, I have no idea. I haven't conducted any extensive testing. I've heard here and there that this sensor shouldn't be used for long-term measurements that can be relied upon.
@iiinicky6224
@iiinicky6224 Рік тому
I've used mine for 3 summers (about 4months each summer so a year total of use) and have only replaced 1 out of my 5. They were planted out in dry greenhouse so conditions we're good and weren't exposed to rain or wind. There are a lot of unreliable sensors available to buy and a lot of ppl have had a lot of trouble finding reliable ones. Try look for a reliable one. Hope this info answers your question
@techheck3358
@techheck3358 10 місяців тому
@@iiinicky6224this is mainly because the sides of the PCB are exposed to the elements, meaning water gets sucked into the PCB. You need to seal the exposed edges with something, like cheap nail polish or hot glue
@singhraisandeep
@singhraisandeep 3 роки тому
such a useful video, can you explain how we can plot the data?
@BasonTech
@BasonTech 3 роки тому
Thanks! With this tutorial you should be able to plot the temperature: arduino-tutorials.net/tutorial/drawing-sound-sensor-data-on-serial-plotter
@nikhilramkrishnan2018
@nikhilramkrishnan2018 3 роки тому
Hi there! My serial monitor is showing values ranging from 5-61. I did the wiring like you did and did the code exactly. Do you have a reasoning for this? Thank you!
@BasonTech
@BasonTech 3 роки тому
Could be several reasons for example a faulty sensor or more water than the marked line. Unfortunately for me it is hard to tell without actually being able to see and touch the sensor 😃
@nikhilramkrishnan2018
@nikhilramkrishnan2018 3 роки тому
@@BasonTech Oh its working now! Thank you! I checked the video again and saw some of my errors!
@BasonTech
@BasonTech 3 роки тому
Great! Could you share what error you'd made so others can learn from it when they read the comments? Thanks!
@nikhilramkrishnan2018
@nikhilramkrishnan2018 3 роки тому
@@BasonTech I had to switch the placement of the wires I looked at it wrong haha.
@BasonTech
@BasonTech 3 роки тому
Happens to all of us 😄
@stephennyahoe61
@stephennyahoe61 3 роки тому
I have an Arduino Nano 33 IoT board that does not have a 5V port only 3.3. Is that a problem?
@BasonTech
@BasonTech 3 роки тому
Hi Stephen, according to media.digikey.com/pdf/Data%20Sheets/DFRobot%20PDFs/SEN0193_Web.pdf it should be able to work with 3.3V
@stephennyahoe61
@stephennyahoe61 3 роки тому
@@BasonTech Thanks!
@sunnydayhobbies
@sunnydayhobbies 2 роки тому
I tried it, it worked for the first exercise, but after that it got all weird and only shows "54" over and over, even when I remove the sensor from water or even disconnect it from the Arduino Mega. Shouldn't it stop reading and show 0, when there is NO SENSOR connected? Something went screwy, but I cannot figure it out and the Mega works for other projects...
@BasonTech
@BasonTech 2 роки тому
These sensors tend to be quite hard to work with. I experienced the same: one time they work and another time they give faulty measurements.
@007order007
@007order007 2 роки тому
How would you prevent this thing from shorting out if left outside?
@BasonTech
@BasonTech 2 роки тому
You could use an enclosure or perhaps even hotglue to seal the sensor.
@monalishapramanik7990
@monalishapramanik7990 10 місяців тому
How to send this soil moisture data to cloud server using GSM module?? Please share the link
@BasonTech
@BasonTech 10 місяців тому
On what part do you get stuck?
@nitinkamble3753
@nitinkamble3753 2 роки тому
How accurate the sensor data is when compared to data from a soil laboratory?
@BasonTech
@BasonTech 2 роки тому
Hi, it is definitely not accurate compared to such data.
@nitinkamble3753
@nitinkamble3753 2 роки тому
@@BasonTech ok. I have a project going on with a Japanese company. So I am suppose to build a device that can detect essential soil components which are responsible to make a good soil. And it should also be cost effective.
@BasonTech
@BasonTech 2 роки тому
Then this is not the sensor you are looking for. It is a very simple capacitor based moisture sensor, and does not in any way tell you the soil components.
@nitinkamble3753
@nitinkamble3753 2 роки тому
​ @Bas on Tech Yeah, I did not find sensors that can individually detect soil nutrients. But, there is one sensor probe that is not cost effective.
@RoMecha_lb
@RoMecha_lb 4 роки тому
👍👍
@massivetubez
@massivetubez 3 роки тому
you are reading out the values out with a computer but it be cool to get it posted directly to a screen ;)
@BasonTech
@BasonTech 3 роки тому
Hi Nikky, therefore I've made several tutorials about screens like: ukposts.info/have/v-deo/mXF0g3lwj3hzzKc.html or ukposts.info/have/v-deo/i36lZ4uqhHuixGw.html Make it a challenge to get it working, with these tutorials it shouldn't be that hard 😃
@smartassist9700
@smartassist9700 3 роки тому
Kind Sir, Do you have video to connect moisture sensor also add water pump ? When dry, sensor sends message, pumps water plant until water sensor cuts off water pump? Check every 3 days? I am Disabled with brain damage but want plant outside and auto watering. I have 12 vegetable plants. Neighbor helps now, but I want automated. Can you do video on 12 sensor/12 pump system? Or do one of each but tell me what to buy for larger quantity. Most Humble Appreciation! Alton
@BasonTech
@BasonTech 3 роки тому
Hi Alton, I don't have a tutorial available for that. The easiest I can think of is to make the pump system work with a relais. You can switch this relais based on the sensor value 😃
@ThierryC2373
@ThierryC2373 3 роки тому
The capacitive soil moisture sensor V2.0 is extremely difficult to find in the US!! I got some V1.2 and they have lots of flaws: bouncing values, sluggish...
@BasonTech
@BasonTech 3 роки тому
That's too bad, I order them from arduino-tutorials.net/r/a7D28h the picture said 1.2 but I received a 2.0 kinda weird I guess...
@binfordintegratedtechnolog5213
@binfordintegratedtechnolog5213 3 роки тому
About how long should it take for the sensor to be at "100%" when putting it in water to get its wet value?
@BasonTech
@BasonTech 3 роки тому
Hi, a few mins max
@binfordintegratedtechnolog5213
@binfordintegratedtechnolog5213 3 роки тому
@@BasonTech Ok that is what I thought. I am having a weird issue where the wet value and dry value are not working properly with the map function. The fully wet value is 391 and dry value is 721 but it over maps to 102% and undermaps to -2% with those values but if I adjust them to wet 385 and dry 710 it seems to work properly. Not sure if it is the arduino somehow doing math wrong or what. I have also tried doing map(readVal, dry, wet, 0, 100) as well as map(readVal, wet, dry, 100, 0) and they both do the same thing. Any suggestions or would you say the modified numbers regardless of what its top and bottom are reading would work? I am using the V1,2.
@BasonTech
@BasonTech 3 роки тому
The thing is that the sensor is not a digital sensor. So the current 0 could be -2 in another measurement. The same goes voor the wet value. Therefore you should keep some margin and for example assume > 90% wet and < 20% dry. This sensor is not suitable for exact 1 percentage accurate measurements.
@binfordintegratedtechnolog5213
@binfordintegratedtechnolog5213 3 роки тому
@@BasonTech I figured it would not be an exact precise measurement being an analog sensor. Thank you for the help. You are also the first UKpostsr I have ever gotten response to help from. I appreciate that greatly. For sure subscribing to your channel. Keep up the amazing work. :)
@BasonTech
@BasonTech 3 роки тому
Thanks and great to hear! I try to response to everyone who took the time to leave a comment 😃
@vishnujayakumar1229
@vishnujayakumar1229 3 роки тому
Sir how take realtime reading?? Can you suggest a program for that?
@BasonTech
@BasonTech 3 роки тому
Hi, what do you mean by realtime?
@vishnujayakumar1229
@vishnujayakumar1229 3 роки тому
@@BasonTech sir i need a graph with respect to time. I mean time- humidity graph pls help🥺
@BasonTech
@BasonTech 3 роки тому
Have a look at this tutorial of mine: arduino-tutorials.net/tutorial/drawing-sound-sensor-data-on-serial-plotter Instead of sound you can also plot the humidity. Changing the code should nog be that hard to do.
@vishnujayakumar1229
@vishnujayakumar1229 3 роки тому
@@BasonTech thakyou sir😍😍😍
@gcinwayinkosigumbi4193
@gcinwayinkosigumbi4193 Рік тому
good project, how can i order complete project?
@BasonTech
@BasonTech Рік тому
You can't. In the description of the video is a link to the parts used in this tutorial 😃
@janrheyc.ambonan1960
@janrheyc.ambonan1960 Рік тому
How to convert the value of wet and dry sensor to Celcius?
@BasonTech
@BasonTech Рік тому
You can't. The values given do have nothing to do with temperature. Therefore you'll need a temperature sensor.
@nis6841
@nis6841 2 роки тому
I want control 4 relay unit using this sensor value please send ma code for it
@BasonTech
@BasonTech 2 роки тому
What have you tried so far? On what part did you get stuck?
@nis6841
@nis6841 2 роки тому
@@BasonTech i want on solenoid's relay using two input one of capacitive type sensor input other one is digital input(tank water level) help me to code for this application
@taeyun1255
@taeyun1255 3 роки тому
Wow! Great tutorial! I would love to make to this, but where is the code? Could the code be put in the description?
@BasonTech
@BasonTech 3 роки тому
The link to the code is already in the description of this video 😃
@taeyun1255
@taeyun1255 3 роки тому
@@BasonTech Ok Thank You!
@AngadSingh-bo8ip
@AngadSingh-bo8ip 2 роки тому
Hi Bas, Hope you read this. I was copying the code on the Arduino Code Part-2 and then the value started going into negative even I mapped it to 100 and 0 pls help me
@BasonTech
@BasonTech 2 роки тому
Hard to say what goes wrong. I would advise to reproduce the code step-by-step. With copy/paste you can have introduced many errors all at once.
@AngadSingh-bo8ip
@AngadSingh-bo8ip 2 роки тому
@@BasonTech Thanks @Bas on Tech i will try your suggestion
@timelapse-oi
@timelapse-oi 2 роки тому
do you have any idea why my values are between 1246, 3540 ??
@BasonTech
@BasonTech 2 роки тому
That is really weird since the possible values should be between 0 and 1023. Have you checked your code?
@timelapse-oi
@timelapse-oi 2 роки тому
@@BasonTech I used your code. I connect my sensor to pin 33 of my esp32
@BasonTech
@BasonTech 2 роки тому
Maybe it has something todo with the esp32. I've only used it on the Arduino Uno. Maybe using another pin does the trick?
@agnirolf7113
@agnirolf7113 2 роки тому
you get this result because the ADC of your microcontroller works with a bit width of 12
@38flatBauble
@38flatBauble 4 місяці тому
Can you please make a tutorial on using a capacitive soil moisture sensor , Arduino Uno to make a automatic watering system? I have tried but I can't trigger the motor! tried a mos module and a relay same result :(
@BasonTech
@BasonTech 4 місяці тому
Thanks for the suggestion! Unfortunately not on short notice.
@38flatBauble
@38flatBauble 4 місяці тому
@@BasonTech Hey it's always worth asking :) Can you suggest any videos on how to trigger events/devices using if statements?
@BasonTech
@BasonTech 4 місяці тому
What you mean with "trigger events/devices using if statements"?
@SeverinBruhat
@SeverinBruhat Рік тому
I am using a v2.0 sensor and am trying to calibrate it following this video. However I keep getting inconsistent random values, wether it's wet or dry. I have tried with 3 different sensors. For instance I would get wet->63, dry->65 (nothing compare to this 500+ values in the video), and after a while, I am getting wet->68. dry->61. It's impossible for me to calibrate, does anyone know what's going on? Thanks
@BasonTech
@BasonTech Рік тому
I've made this tutorial quite some time ago and I see more and more people struggle with this sensor. Unfortunately it looks like many of them are faulty and do not work as expected
@Ed19601
@Ed19601 3 роки тому
Though yr explanation of the general principle of a capacitive sensor (measuring charge and discharge time)is correct, it is not how this sensor is working: you are not measuring a time but a voltage. Should you measure a charging time, you would need a starting point. The principle in this sensor is different. The output of the 555 oscillator is fed to a voltage divider that is fomed by a 10k resistor and the reactance of the capacitor in the probe. When that reactance changes as a result of the capacity changing so does the voltage on the Aout
@BasonTech
@BasonTech 3 роки тому
Thanks for clarifying! 😃
@Ed19601
@Ed19601 3 роки тому
@@BasonTech V1.2 had some issues (a not connected 1Mohm resistor) that could easily be fixed. I see you are having V2.0 that one is OK i presume. Another issue is that some clones have an NE555 chip rather than a TLC555. The latter accepts 3v3 the former does not but needs 5V
@danielbob7769
@danielbob7769 3 роки тому
Can someone help me with datasheet about this sensor ? V2.0
@BasonTech
@BasonTech 3 роки тому
Are you looking for something like this? wiki.dfrobot.com/Capacitive_Soil_Moisture_Sensor_SKU_SEN0193
@btkramer
@btkramer 4 роки тому
what is the difference between v1.2 and v2.0?
@BasonTech
@BasonTech 4 роки тому
Besides the typo of the analog out pin on v2.0 I could find any information about a difference between both. The component layout looks the same. Maybe the probe part is different, but I couldn't find any information which supports this.
@btkramer
@btkramer 4 роки тому
@@BasonTech I have a v1.2 and it has the same AUOT typo, which I actually didn't notice until you mentioned it. I also have not been able to find any info on the differences between the 2. They seem identical. Thanks for the reply.
@koprolith
@koprolith 3 роки тому
I am currently using the same v1.2 capacitive Sensor, however it has proven to be a pain in the a**. Returned analog values depend heavily on soil pressure and local soil properties. Values from multiple sensors therefore can't be compared directly even tho all were the same value in air and water during calibration. Soil pressure against the sensor has (in my case) shown to be the most influential external variable on the sensor outputs. This hoever can be normalized between sensors. Worst par however, is that values AND sensitivity of the sensor jumps once it slightly shakes/wiggles in the ground as the initial press-fit loosens. Has anyone else experienced this?
@BasonTech
@BasonTech 3 роки тому
I experienced the same, this is sensor is not a very robust solution. I had it laying around and decided to make a tutorial about it. For fun projects it is sufficient, but to manage een greenhouse probably not.
@koprolith
@koprolith 3 роки тому
It does what it sais it does to be fair. For sure suitable in an indifferent environment. Just bad, that my inddor chili farm is not like that, with rotating pots eg. Changing values and instable sensitivities even during one watering cycle are just too much to handle
@BasonTech
@BasonTech 3 роки тому
Guess, a more specialised greenhouse sensor would be a better solution (and probably more expensive).
@kreynolds1123
@kreynolds1123 2 роки тому
I think youd be better to adjust what we think of as is saturated. Consider the following points. Dielectic constants of materials effect the capacitance. Air has a dielectric constant of 1 while many hydrocarbons, maybe including soil, have a constant slightly above or below 3 while water can be 80 or so and change a bit by temperature changes, and soil salts may lower the capacitance of water. Compressing a soil is certainly going to remove air filling the space between the electrode with materials and water resulting in a net effective dielectric constant higher than air. What seems to make more usefull sense is to take completely dried soil, measure it and call that dry which would be 0. Then water the same soil very well and let it drain off the excess and then call that 100% saturated. If we think about this, and set up an automatic watering, it makes no sence to water any soil past the point where it can hold no more water draining off the excess. We would call excess watering oversaturating the soil. I hope this information and perspective change helps make readings more useful. I'm not certain "commercial" versions are immune to pressure changes. Differences in soil salts. This unit would be more practical if we adjust some definitions to more practical definitions.
@koprolith
@koprolith 2 роки тому
@@kreynolds1123 what you suggest is a calibration step i had performed already. Sadly this isn't the solution for the problem mentioned. Even with stable water content in the soil the values drift as the soil relaxes around the sensor and jump on slight vibration. You are right from a physical standpoint, but in operation this makes the sensor readings unreliable, as the scaling of values changes and cant be nornalized.
@sagnikchatterjee8122
@sagnikchatterjee8122 3 роки тому
Plz help, As u said when the sensor is dry it shows the value of 572 or something and when its put inside moist soil or water it drops , Bt when I did that same thing the value showed 937 or something and when I put that inside water the value increased to 1200 and more , I thought the sensor was faulty so I replaced that ASAP bt still its showing same result. Why? What should I do?
@BasonTech
@BasonTech 3 роки тому
That is weird. Please try other wires and/or Arduino. Also check your connections and make sure the wiring is correct.
@sagnikchatterjee8122
@sagnikchatterjee8122 3 роки тому
@@BasonTech I tried I changed the wires even the connector that comes with that, tried in 4 Arduinos still same , I dont know whats going wrong.
@BasonTech
@BasonTech 3 роки тому
I would say if it is not the hardware then it has to be the software
@sagnikchatterjee8122
@sagnikchatterjee8122 3 роки тому
@@BasonTech The IDE or code or anything?
@BasonTech
@BasonTech 3 роки тому
The Arduino code
@GamingDenZ
@GamingDenZ Рік тому
code didnt work error came up for line 5?
@BasonTech
@BasonTech Рік тому
Line 5 is in the comment section, maybe missed a character when copy/pasting?
@zulfamaulana877
@zulfamaulana877 3 роки тому
i need the arduino code link, can you help me?
@BasonTech
@BasonTech 3 роки тому
Hi, in the description of every video you'll find links to the code and course material 😃
@pataocemapataocema8966
@pataocemapataocema8966 3 роки тому
Thank you so much your video is amazing but my brain omg 😭
@BasonTech
@BasonTech 3 роки тому
No worries! Just watch it step by step, no need to rush 😃
@3maisons
@3maisons 3 роки тому
9600 baud is not 9600 characters per second; it is closer to 1000 characters per second, assuming 8 bit characters (plus 1 start bit and 1 stop bit for each character). See wikipedia article "asynchronous serial communication".
@BasonTech
@BasonTech 3 роки тому
Thanks for clarifying! I've got it from en.wikipedia.org/wiki/Baud where it states "symbols per second or pulses per second" which I interpret as characters per second.
Wi-fi Soil Moisture Sensor with ESPHome
7:58
Tech Dregs
Переглядів 11 тис.
You’ve Never Seen A Race Like This 🚀
00:21
Red Bull
Переглядів 44 млн
когда одна дома // EVA mash
00:51
EVA mash
Переглядів 5 млн
Гражданская оборона 2024 - 16 полный выпуск
1:04:15
Телеканал ICTV
Переглядів 1,1 млн
How to Control a 12V Motor with Arduino: Easy Wiring & Code Examples
44:13
Rachel De Barros
Переглядів 356 тис.
Automatic Garden Watering System
15:28
Nikodem Bartnik
Переглядів 191 тис.
Calibrating Soil Moisture Sensors for Irrigation
13:56
Modest Maker
Переглядів 2,2 тис.
Arduino Garden Controller - Automatic Watering and Data Logging
9:13
Practical Engineering
Переглядів 3,1 млн
Уроки Ардуино. ПИД регулятор
28:57
Заметки Ардуинщика
Переглядів 446 тис.
You’ve Never Seen A Race Like This 🚀
00:21
Red Bull
Переглядів 44 млн