Soil Moisture Sensor on batteries with ESP07 running ESPHome - Start to Finish

Поделиться
HTML-код
  • Опубликовано: 30 июн 2024
  • PCBWay Shared Projects - www.pcbway.com/project/member...
    Get $5 for your first order - www.pcbway.com/setinvite.aspx...
    In this video, I'm creating a battery operated ESPHome sensor to measure the moisture content in my backyard garden. The sensor is built using the ESP07 (ESP8266) board where I removed the power indication LED to save on battery power.
    The device uses a capacitive soil moisture sensor and two 18650 batteries to be able to operate outside during the growing season and provide updates on the soil humidity so that we can use that data to control the irrigation that I have set up already.
    You can check the video about the irrigation system here:
    • How to Build Your Own ...
    The video covers the entire process from start to finish so you can easily replicate it and build your own sensor.
    Tools and materials used in the video:
    ESP8266 ESP07 Module - s.click.aliexpress.com/e/_onP...
    Capacitive Soil Moisture Sensor - s.click.aliexpress.com/e/_m0W...
    Sensor with ESP32 Module combo - s.click.aliexpress.com/e/_DmH...
    USB to Serial adapter - s.click.aliexpress.com/e/_oCH...
    Jumper Wires - s.click.aliexpress.com/e/_mtH...
    Mini Breadboards - s.click.aliexpress.com/e/_on0...
    Mini PC for Home Assistant - s.click.aliexpress.com/e/_okQ...
    Soldering Rework Station - s.click.aliexpress.com/e/_m00...
    Multimeter - s.click.aliexpress.com/e/_m0C...
    Wire Snips - s.click.aliexpress.com/e/_omw...
    ESD Safe Tweezers - s.click.aliexpress.com/e/_ol7...
    Device code and written instructions are available on my website article:
    www.tastethecode.com/soil-moi...
    Support my work on Patreon so I can continue producing free content and tutorials!
    / taste_the_code
    My recording gear:
    Canon M50 Mark ii - s.click.aliexpress.com/e/_olp...
    Samsung A71 - s.click.aliexpress.com/e/_Ezb...
    SJ400 Action camera - s.click.aliexpress.com/e/_omr...
    USB Condenser Microphone - s.click.aliexpress.com/e/_mq9...
    Tripod - s.click.aliexpress.com/e/_Eyn...
    Phone tripod mount - s.click.aliexpress.com/e/_oDT...
    Soil Moisture Sensor on batteries with ESP07 running ESPHome - Start to Finish
    #esphome #homeassistant #smarthome #esp #soilmoisture #tastethecode
    Main Site and blog: www.tastethecode.com
    Facebook: / tastethecode
    Instagram: / taste_the_code
    Twitter: / taste_the_code
    0:00 Introduction
    01:03 ESP8266 ESP-07 Module Overview
    02:08 Sponsored Segment
    02:53 How to flash the ESP-07 module
    03:43 Wire the ESP-07 for flashing
    04:29 Flashing demo with Arduino IDE
    07:09 Removing the power LED from the ESP-07 module
    08:41 Flash ESPHome on the ESP-07 module
    11:50 Connect the soil moisture sensor
    13:51 Powering the sensor from the battery
    16:37 Enable deep sleep in ESPHome
    19:11 Preparing the enclosure
    20:44 Soldering all the components
    22:50 Final assembly
    23:34 Final Test
    26:10 Outro
    Get exclusive Taste The Code t-shirts and merch at
    teespring.com/taste-the-code
    Hosting discounts over at Dreamhost
    click.dreamhost.com/SHiw

Комментарии • 17

  • @JesusRocksAlways
    @JesusRocksAlways Месяц назад +2

    Hello again, ignore my last comment, I figured it out. For others who may need help, connect your VCC of the sensor, in my case, the Capacitive Soil Sensor V2.0, to one of the digital output pins of your ESP32 and then set it HIGH upon waking out of deep sleep mode and to LOW just before the ESP32 goes back to sleep.
    - Sleep for an hour
    - ESP32 wakes up
    - Activate the soil sensor
    - Read the level
    - Email or text if level is above ~580
    - Deactivate soil sensor
    - Set ESP32 into deep sleep mode
    - Rinse and repeat every hour, day, month, whatever you set it to
    So far, my 3.7v 18650 li-ion, 400mAh has not even dropped and it's been running for a day, waking up every hour for now. Once I'm convinced it works, time to set it to a daily wakeup and put it all into a portable container.
    This video was awesome, btw !

    • @TasteTheCode
      @TasteTheCode  Месяц назад

      Awesome, I'm glad you managed to figure it out, and yes, I haven't done this to mine yet but I will as it uses some power unnecessary. I was thinking about using a transistor to turn it on but your solution made me realize that I do not need to as it only uses a few milliamps. Do you maybe have the ESPHome configuration code to share?

  • @havemannolaf
    @havemannolaf Месяц назад

    Thank you !

  • @SlavkosHobbyChannel
    @SlavkosHobbyChannel 2 месяца назад +2

    The video is the reason why I love doing things from scratch, it is fun, and you can learn a lot, but also is there a similar cheap version already made that can be connected with an assistant? probably not, so you enjoyed doing it, and also you made a great gadget, nice job!

    • @TasteTheCode
      @TasteTheCode  2 месяца назад

      Even if there is a commercial product thst is cheaper and better made, it won't provide the learning experience. Thanks for the great words! 👍👍👍

  • @JesusRocksAlways
    @JesusRocksAlways Месяц назад

    Hello all ! I have this running, however, the Capacitive sensor drains the battery even with the ESP32 is in deep sleep mode. Is there a way to "wake-up" the sensor when the ESP32 wakes up? (e.g. put both to sleep)

  • @XprecisionBR
    @XprecisionBR Месяц назад

    What do you think of using the ESP-01S with those expansion boards like RGB LED, DHT11, etc? I'm testing it with CR123A batteries.

    • @TasteTheCode
      @TasteTheCode  Месяц назад

      I wanted to use it at first because I have plenty of them but the problem is that they do not have analog input. For things like I2C, they should be perfect.

  • @ristopirhonen3169
    @ristopirhonen3169 2 месяца назад +1

    How long does it run with one charge?

    • @TasteTheCode
      @TasteTheCode  2 месяца назад +2

      The run time greatly depends on the duty cycle of the deep sleep. I'm still testing this but if it runs for 30 seconds every 3 hours, it should last for about 45 days.

  • @thebatu89
    @thebatu89 2 месяца назад

    Hi, have you tested it with espnow? Could it last longer since it doesn’t connect to wifi

    • @TasteTheCode
      @TasteTheCode  2 месяца назад

      No I haven't. It might be an interesting thing to explore but I guess it will also need a receiver.

  • @krusej23
    @krusej23 2 месяца назад

    What does the moisture level correlate to? Is it volumetric water content?

    • @TasteTheCode
      @TasteTheCode  2 месяца назад

      A capacitive soil moisture sensor measures the dielectric permittivity of the soil, which is indirectly related to the volumetric water content. They use an oscillating electrical field to measure the dielectric permittivity of the soil. The presence of water affects the capacitance of the sensor, because water molecules align with the electric field, this changes the capacitance value. This change in capacitance is then correlated with the soil's moisture content, outputted as a change in voltage.

  • @jtauscher
    @jtauscher 2 месяца назад

    Do yourself a favour and cover the pcb with hot glue or similar. Otherwise it will be destroyed by the humidity of the soil within 1-2 weeks. I "painted" them with hot glue and worked with a hot air gun to keep the layer thin :)
    Other than that - interesting project!
    p.s.: saw on second sight you covered the edge of the pcb. I coverd it completely including the smd components and drove it completely into the earth to have more accurate results.

    • @TasteTheCode
      @TasteTheCode  2 месяца назад +1

      Thanks, that is a nice suggestion. I've seen people using nail polish to cover PCBs. I guess I can add some hot glue to the board and spread it using my hot air gun. I'll see how it goes.
      As for the edge, yes, I covered it with epoxy so to prevent any ingress in the board itself. I was considering to cover the whole thing but I was worried that I might mess up the capacitance and the readings.