Working with a capacitive soil moisture sensor

Sdílet
Vložit
  • čas přidán 22. 07. 2024
  • I'm starting work on a soil moisture sensor for my garden but since I never worked with this type of sensor before, in this video, I'm taking a look at how the moisture sensor works, and how it can be connected to an Arduino.
    At first, I simply connected the sensor to an analog input to see what the output ranges are, and later in the video, I upgrade the Arduino sketch so the moisture can be outputted as a percentage out of the sensor.
    Check out the written article at:
    www.instructables.com/Capacit...
    Materials used in the video:
    Capacitive soil moisture sensor - s.click.aliexpress.com/e/_AMydgI
    Arduino Nano - s.click.aliexpress.com/e/_ABFNO6
    Mini breadboard - s.click.aliexpress.com/e/_97Su5c
    Breadboard jumper wires - s.click.aliexpress.com/e/_AMgGVc
    Alternative links on Banggood:
    Capacitive soil moisture sensor - www.banggood.com/custlink/vDv...
    Arduino Nano - www.banggood.com/custlink/3GG...
    Mini breadboard - s.click.aliexpress.com/e/_ol4...
    Breadboard jumper wires - www.banggood.com/custlink/G33...
    Support my work on Patreon so I can continue producing free content and tutorials!
    / taste_the_code
    My recording gear:
    GT10 Pro 5G Android Phone - s.click.aliexpress.com/e/_oDn...
    Dragon Touch 4K Action Camera - s.click.aliexpress.com/e/_mrc...
    USB Condenser Microphone - s.click.aliexpress.com/e/_mq5...
    Tripod - s.click.aliexpress.com/e/_ooa...
    Phone tripod mount - s.click.aliexpress.com/e/_s9WaiJ
    Working with a capacitive soil moisture sensor
    #arduino #soilmoisture #sensor #electronics #tastethecode
    Main Site and blog: www.tastethecode.com
    Facebook: / tastethecode
    Instagram: / taste_the_code
    Twitter: / taste_the_code
    Get exclusive Taste The Code t-shirts and merch at
    teespring.com/taste-the-code
    Click on the link below to get two months of free premium access to Skillshare and start learning today!
    skl.sh/37LnRua
    Get $50 off your order on hosting for all of your website needs and learning projects on Dreamhost!
    www.dreamhost.com/r.cgi?24057...
  • Věda a technologie

Komentáře • 30

  • @AgentX02008
    @AgentX02008 Před 3 lety +2

    I have created a similar device for a Senior Design project for wireless soil moisture sensing based on this device. This is a pretty good summary of how it works from what I have found/experimented and I wish it'd had been up prior to my research haha.

    • @TasteTheCode
      @TasteTheCode  Před 3 lety

      Thanks for the good words. It didn't help you soon enough but I sure hope it will help someone else.

  • @dshshajskj6143
    @dshshajskj6143 Před 2 lety

    will the salts present in soil effect the sensor value?
    or fertilizers

  • @funone8716
    @funone8716 Před 2 lety

    Could this sensor be modified to sense moisture percentages of air in a compressed air (up to 150 PSI) application?

    • @TasteTheCode
      @TasteTheCode  Před 2 lety

      It shouldn't be affected by the pressure but since it will be air, I don't think that you will get precise readings as I had to dip it into water so I can move through it's range. I think you are better off with something like the DHT11 or DHT22 but I don't know if they will be affected by the pressure.

  • @manukalias
    @manukalias Před 3 lety +1

    Thanks for very clear informative Video about this Capacitive Sensor. 👍👍👍👍
    Were you able to make any use of it in real garden situation 🙄🙄
    I am going to order these sensors later today and try experimenting.

    • @TasteTheCode
      @TasteTheCode  Před 3 lety +1

      Unfortunately not yet. As you might already know, life gets into way when planning 😅😅😅 Hopefully, I shoud get to it soon. However, the sensors are great, so go ahead and start experimenting.

  • @cromossomos4861
    @cromossomos4861 Před 3 lety +1

    Nice video, but i have a little concern about this device : According NE555 datasheet the min. VCC is around 4.5V and the 662K regulator will provide just 3.3V. I dont know if was a manufacturer error, but this kind of issue can cause unprecise reading or malfunction. Bypassing the 662K and working with 5V can be more safe.

    • @TasteTheCode
      @TasteTheCode  Před 3 lety +2

      The input can be 3.3 or 5V but the output is always capped at 3.3 so it is compatible with multiple microcontrollers.

    • @asengurdjekliev
      @asengurdjekliev Před 2 lety +3

      They are using NE555 marked with 20M, which is proved to work outside of manufacture spec of 4.5V down to 3.3V. So, it is well working with a power supply 3.3 - 5V. Personally tested, and there is no difference with the models using TLC555C or TLC555I able to work from 2-3V.

  • @dshshajskj6143
    @dshshajskj6143 Před 2 lety

    will the salts and fertilizers in soil effect its readings

    • @TasteTheCode
      @TasteTheCode  Před 2 lety

      Possibly yes. I know that salts do corrode the other types of sensors. You may need to experiment a bit in order to find the right values but it will definitely make a clear distinction between wet and dry.

    • @dshshajskj6143
      @dshshajskj6143 Před 2 lety

      @@TasteTheCode is there anyother way to measure moisture of soil nullifying the effect of salts and fertiliers based on current conduction possibly?\

    • @TasteTheCode
      @TasteTheCode  Před 2 lety

      Not that I'm aware of. If you have a soil sample without any fertilizer, you can maybe measure that and somehow offset the reading later bit it won't be simple.

  • @bobalainen3
    @bobalainen3 Před 3 lety

    Nice video, but hardy speaking, ADC and moisture relation is not linear in range 0-100%. I am trying to do similar soil moisture tester with UnoR3 and mega2560.

    • @TasteTheCode
      @TasteTheCode  Před 3 lety +1

      Thanks for sharing. I know that the relationship is not 100% accurate but in general the relationship between wet and dry is and the output is usable triggering and alarming in a monitoring system.

    • @bobalainen3
      @bobalainen3 Před 3 lety

      @@TasteTheCode now i use 9 sensors on the mega2560. i use 9 buckets with soil. for stable adc results i use analogread command and 500 ms delay after . for measuring i use only the third analogread result. delay less 200 mn is not good because ADC needs time to discharge the capacitors. average of 10 readings shows nice stable value . at least variation is within 5 percentage. now i try to find calibration curve volumetric moisture vs ADC values on sandy loam soil.
      looking for you new video and progress.

    • @TasteTheCode
      @TasteTheCode  Před 3 lety

      @@bobalainen3 sounds awesome. I would love to see your setup if you have it somewhere on the net.

    • @bobalainen3
      @bobalainen3 Před 3 lety

      @@TasteTheCode i send the link by FB messenger

  • @ajinkyatamhane985
    @ajinkyatamhane985 Před 2 lety

    How to to attach different probes to this sensor

    • @TasteTheCode
      @TasteTheCode  Před 2 lety

      I don't understand your question. What do you mean by different probes?

    • @ajinkyatamhane985
      @ajinkyatamhane985 Před 2 lety

      @@TasteTheCode for example if I want to measure moisture at more deeper level.....then...can I extend the probe...by soldering wire to the existing structure

    • @TasteTheCode
      @TasteTheCode  Před 2 lety

      @@ajinkyatamhane985 I'm not sure that you can do that with this sensor because the value is dependent on the capacitive coupling on the PCB. Adding external probes will change that capacitance and the value will be wrong. You can bury the entire probe inside a watertight enclosure and extend the communication wires from the top.

    • @ajinkyatamhane985
      @ajinkyatamhane985 Před 2 lety

      @@TasteTheCode really thanks for detailed reply

    • @TasteTheCode
      @TasteTheCode  Před 2 lety

      You are welcome!

  • @markocenicola
    @markocenicola Před 3 měsíci

    why do all my sensors write 755 instead of 530?

    • @TasteTheCode
      @TasteTheCode  Před 3 měsíci

      The calibration is different on all. Do they respond to changes in humidity? If they do, then you can map your output based on that.

    • @markocenicola
      @markocenicola Před 3 měsíci

      @@TasteTheCode yes they respond, thanks so much, I have another question, why the value changes in order of the deep of the sensor in water?

    • @TasteTheCode
      @TasteTheCode  Před 3 měsíci

      Put it simply,it changes the capacitance of the surrounding. This is how they work and are able to detect the change in soil moisture, the more water there is, the higher the output.

    • @markocenicola
      @markocenicola Před 3 měsíci

      @@TasteTheCode Thanks for the help!