Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Soil Moisture Sensor Powered by solar charged battery

Soil Moisture Sensor Powered by solar charged battery

Scheduled Pinned Locked Moved My Project
batterysolarhome assistantcalibrationeepromlow power
5 Posts 3 Posters 53 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • OldSurferDudeO Offline
    OldSurferDudeO Offline
    OldSurferDude
    wrote on last edited by
    #1

    A seemingly simple project that employs some challenging programming techniques: calibration, power failure recovery, low power usage, two way communication with Home Assistant, 3D enclosure and more ...

    See Remote, Solar Powered (with battery backup) on github for more details

    This device is a soil moisture sensor that determines a relative number between 0 and 100 indicating completely dry to entirely wet. The number is sent to a controller for further analysis and/or action. It is battery powered and the battery is recharged using a small solar panel. The device is required to be calibrated and the calibration routine is part of the software.

    The components are: a soil moisture sensor, an Arduino Nano with an nRF24 radio, an 18650 Li-Ion battery, a charge controller board and a solar panel. The housing is made up of 3D printed parts.

    This device is part of a system that also includes a gateway and a controller.

    1 Reply Last reply
    1
    • CrankyCoderC Offline
      CrankyCoderC Offline
      CrankyCoder
      wrote on last edited by
      #2

      What components are you using for the charge controller and the battery?

      For the 3dprinted enclosure, what are you planning to do to keep it water tight?

      I had a similar project last year but instead of the soil moisture sensor, I was using it to turn the water on/off to water the garden. That one needed a little more juice to trigger the locking solenoid valve so I had to do a 2s 18650 setup.

      I see in your notes in the code that smartsleep didn't work for you?

      I actually thought smartsleep with home assistant worked pretty well. What did you run in to?

      Home Automation Tinkerer
      www.CrankyCoder.net

      Controller: HomeAssistant in Kubernetes
      Gateway: MQTTClientGateway
      MySensors: 2.3

      OldSurferDudeO 1 Reply Last reply
      1
      • CrankyCoderC CrankyCoder

        What components are you using for the charge controller and the battery?

        For the 3dprinted enclosure, what are you planning to do to keep it water tight?

        I had a similar project last year but instead of the soil moisture sensor, I was using it to turn the water on/off to water the garden. That one needed a little more juice to trigger the locking solenoid valve so I had to do a 2s 18650 setup.

        I see in your notes in the code that smartsleep didn't work for you?

        I actually thought smartsleep with home assistant worked pretty well. What did you run in to?

        OldSurferDudeO Offline
        OldSurferDudeO Offline
        OldSurferDude
        wrote on last edited by
        #3

        @CrankyCoder

        TP4056 Charge controller Not exactly designed for it, but it works.

        The sealant was liquid tape If I have to open it up, I just score it with and exacto knife and after reclosing, more liquid tape. Note also I use a clear lacquer spayed onto the electronic parts (after soldering) to minimize corrosion. I also put in one of those desiccants you find in vitamin bottles. Have a look at the spreadsheet Bill-of-Materials

        My sample period is 1 hour. If I'm sending a message from HA to the Arduino it takes two hours to get there, if it gets there at all. Fortunately, the only message I would ever send is to change the sample period.

        What is the locking solenoid valve you use?

        I've thought about putting smarts on my valves instead of the RPi and relay board. I have wires going to all of my 20 valves (non-trivial 5 x 5 "cross-bar", gravity fed, 9 terraces, 3 micro-climates) My environment is very sunny and corrosive (coastal) so I have 0 pressure brass valves.

        What I was thinking was a tasmotized ESP01 relay with a 24VAC to 5VDC power supply. Then only two wires for the power are needed. The device could also be used when that last spare irrigation wire breaks.

        I run HA in a VirtualBox in Ubuntu on a refurbished tower. Mosquitto is also running on that computer as well as my valve controller frontend SIP (Sustainable Irrigation Platform)

        erintseE CrankyCoderC 2 Replies Last reply
        0
        • OldSurferDudeO OldSurferDude

          @CrankyCoder

          TP4056 Charge controller Not exactly designed for it, but it works.

          The sealant was liquid tape If I have to open it up, I just score it with and exacto knife and after reclosing, more liquid tape. Note also I use a clear lacquer spayed onto the electronic parts (after soldering) to minimize corrosion. I also put in one of those desiccants you find in vitamin bottles. Have a look at the spreadsheet Bill-of-Materials

          My sample period is 1 hour. If I'm sending a message from HA to the Arduino it takes two hours to get there, if it gets there at all. Fortunately, the only message I would ever send is to change the sample period.

          What is the locking solenoid valve you use?

          I've thought about putting smarts on my valves instead of the RPi and relay board. I have wires going to all of my 20 valves (non-trivial 5 x 5 "cross-bar", gravity fed, 9 terraces, 3 micro-climates) My environment is very sunny and corrosive (coastal) so I have 0 pressure brass valves.

          What I was thinking was a tasmotized ESP01 relay with a 24VAC to 5VDC power supply. Then only two wires for the power are needed. The device could also be used when that last spare irrigation wire breaks.

          I run HA in a VirtualBox in Ubuntu on a refurbished tower. Mosquitto is also running on that computer as well as my valve controller frontend SIP (Sustainable Irrigation Platform)

          erintseE Offline
          erintseE Offline
          erintse
          wrote on last edited by
          #4

          @OldSurferDude Yes, the TP4056 part works.

          1 Reply Last reply
          0
          • OldSurferDudeO OldSurferDude

            @CrankyCoder

            TP4056 Charge controller Not exactly designed for it, but it works.

            The sealant was liquid tape If I have to open it up, I just score it with and exacto knife and after reclosing, more liquid tape. Note also I use a clear lacquer spayed onto the electronic parts (after soldering) to minimize corrosion. I also put in one of those desiccants you find in vitamin bottles. Have a look at the spreadsheet Bill-of-Materials

            My sample period is 1 hour. If I'm sending a message from HA to the Arduino it takes two hours to get there, if it gets there at all. Fortunately, the only message I would ever send is to change the sample period.

            What is the locking solenoid valve you use?

            I've thought about putting smarts on my valves instead of the RPi and relay board. I have wires going to all of my 20 valves (non-trivial 5 x 5 "cross-bar", gravity fed, 9 terraces, 3 micro-climates) My environment is very sunny and corrosive (coastal) so I have 0 pressure brass valves.

            What I was thinking was a tasmotized ESP01 relay with a 24VAC to 5VDC power supply. Then only two wires for the power are needed. The device could also be used when that last spare irrigation wire breaks.

            I run HA in a VirtualBox in Ubuntu on a refurbished tower. Mosquitto is also running on that computer as well as my valve controller frontend SIP (Sustainable Irrigation Platform)

            CrankyCoderC Offline
            CrankyCoderC Offline
            CrankyCoder
            wrote on last edited by
            #5

            @OldSurferDude I use this. https://www.homedepot.com/p/Orbit-Solenoid-for-Battery-Operated-Timer-57861/203151515

            Instead of having to hold the valve open, i can just pulse it. I use a simple motor controller to pulse it and when i need to close it, pulse it in "reverse". That way I could use a battery and if it only opens once or twice a day it's only a half a second or so of draw off the battery.

            Home Automation Tinkerer
            www.CrankyCoder.net

            Controller: HomeAssistant in Kubernetes
            Gateway: MQTTClientGateway
            MySensors: 2.3

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            20

            Online

            11.7k

            Users

            11.2k

            Topics

            113.1k

            Posts


            Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • MySensors
            • OpenHardware.io
            • Categories
            • Recent
            • Tags
            • Popular