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. Announcements
  3. 💬 Soil Moisture Sensor

💬 Soil Moisture Sensor

Scheduled Pinned Locked Moved Announcements
99 Posts 33 Posters 31.7k Views 32 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.
  • I Offline
    I Offline
    Ihor
    wrote on last edited by
    #80

    I mean, in sketch: A0, A1: alternative resistance measuring. In MySensors usually, A0 input battery level.

    mfalkviddM 1 Reply Last reply
    0
    • I Ihor

      I mean, in sketch: A0, A1: alternative resistance measuring. In MySensors usually, A0 input battery level.

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #81

      @ihor I see. Thanks for explaining. Easiest way is probably to use some other analog pin for the battery measurement. Any of A2 to A6 should work.

      1 Reply Last reply
      1
      • I Offline
        I Offline
        Ihor
        wrote on last edited by
        #82

        I understood. Thank you

        1 Reply Last reply
        0
        • I Offline
          I Offline
          Ihor
          wrote on last edited by
          #83

          How to use:
          Required to interface the sensor: 2 * 4.7kOhm + 2 * 1N4148 (DESCRIPTION in skech)
          And: D6, D7: alternative powering to avoid sensor degradation

          • A0, A1: alternative resistance measuring
          mfalkviddM 1 Reply Last reply
          0
          • I Ihor

            How to use:
            Required to interface the sensor: 2 * 4.7kOhm + 2 * 1N4148 (DESCRIPTION in skech)
            And: D6, D7: alternative powering to avoid sensor degradation

            • A0, A1: alternative resistance measuring
            mfalkviddM Offline
            mfalkviddM Offline
            mfalkvidd
            Mod
            wrote on last edited by mfalkvidd
            #84

            @ihor A6 and A7 can not be used for alternating power. They can do analog read only.

            hekH 1 Reply Last reply
            0
            • I Offline
              I Offline
              Ihor
              wrote on last edited by
              #85

              understandably. but I asked about D6 (D7). what is the sensor connection?

              mfalkviddM 1 Reply Last reply
              0
              • mfalkviddM mfalkvidd

                @ihor A6 and A7 can not be used for alternating power. They can do analog read only.

                hekH Offline
                hekH Offline
                hek
                Admin
                wrote on last edited by
                #86

                @mfalkvidd
                I think they can actually.

                mfalkviddM 1 Reply Last reply
                0
                • hekH hek

                  @mfalkvidd
                  I think they can actually.

                  mfalkviddM Offline
                  mfalkviddM Offline
                  mfalkvidd
                  Mod
                  wrote on last edited by
                  #87

                  @hek not according to this https://github.com/arduino/Arduino/issues/6297

                  hekH 1 Reply Last reply
                  0
                  • I Ihor

                    understandably. but I asked about D6 (D7). what is the sensor connection?

                    mfalkviddM Offline
                    mfalkviddM Offline
                    mfalkvidd
                    Mod
                    wrote on last edited by
                    #88

                    @ihor oh. Sorry. Yes, D6 and D7 are fine.

                    1 Reply Last reply
                    0
                    • mfalkviddM mfalkvidd

                      @hek not according to this https://github.com/arduino/Arduino/issues/6297

                      hekH Offline
                      hekH Offline
                      hek
                      Admin
                      wrote on last edited by
                      #89

                      @mfalkvidd
                      Ok, didn't know that these two had a special thing going. Thanks.

                      1 Reply Last reply
                      1
                      • I Offline
                        I Offline
                        Ihor
                        wrote on last edited by
                        #90

                        I use A0, A1
                        2018-08-12 01:31:11.969 [vent.ItemStateChangedEvent] - MoistHum changed from 11 to 964

                        2018-08-12 01:31:42.386 [vent.ItemStateChangedEvent] - MoistHum changed from 964 to 121

                        2018-08-12 01:31:42.440 [vent.ItemStateChangedEvent] - MoistBat changed from 42 to 43

                        2018-08-12 01:32:13.860 [vent.ItemStateChangedEvent] - MoistHum changed from 121 to 299

                        2018-08-12 01:32:45.300 [vent.ItemStateChangedEvent] - MoistHum changed from 299 to 129

                        2018-08-12 01:33:16.717 [vent.ItemStateChangedEvent] - MoistHum changed from 129 to -11

                        2018-08-12 01:33:48.132 [vent.ItemStateChangedEvent] - MoistHum changed from -11 to -101

                        2018-08-12 01:34:19.528 [vent.ItemStateChangedEvent] - MoistHum changed from -101 to 514

                        2018-08-12 01:34:50.943 [vent.ItemStateChangedEvent] - MoistHum changed from 514 to 1478

                        2018-08-12 01:35:22.355 [vent.ItemStateChangedEvent] - MoistHum changed from 1478 to -265

                        What do I connect wrongly? the results are not true

                        1 Reply Last reply
                        0
                        • I Offline
                          I Offline
                          Ihor
                          wrote on last edited by
                          #91

                          any ideas?

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            atzohy
                            wrote on last edited by
                            #92

                            Hi, I'm trying to get my first sensor to work and I followed this guide https://www.mysensors.org/build/moisture

                            I got my gateway to work and the sensor got discovered in openhab. But I think the values I'm getting are quite odd and I don't think it's working as intended for me.

                            0_1546800718960_soil.jpg

                            That's my setup, just like on the guide. When I put the sensor it into water, 2 LED start to light up on the small blue board.

                            I decreased the SLEEP_TIME for testing purpose and here's what I'm getting:

                            https://pastebin.com/e93P86aY (too many characters to post it directly here)

                            while this measuring, I put it several times into a cup with water and I dried it. Should negative values even happen? I'm not sure how to work with those values.

                            It feels like, it's just giving me random numbers without actually measuring something.

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              manutremo
                              wrote on last edited by
                              #93

                              Hi @atzohy

                              The info in the page is confusing. The small board between the sensor and the arduino is an on-off level switcher. It provides a digital binary singnal so can't be connected to an analog pin on the arduino.

                              If you wish to measure the moisture level with an analogic scale, you need to eliminate that board and then use a voltage divider and an analog pin. The sketch will be also different. Everything in explained above in the thread.

                              You may want to read the full thread and then don't hesitate to come back with your questions.

                              1 Reply Last reply
                              1
                              • D Offline
                                D Offline
                                Diazovitch69
                                wrote on last edited by
                                #94

                                Hi,

                                I have this message :

                                16 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=16,REL=255,VER=2.3.2
                                26 TSM:INIT
                                28 TSF:WUR:MS=0
                                34 !TSM:INIT:TSP FAIL
                                36 TSM:FAIL:CNT=1
                                37 TSM:FAIL:DIS
                                39 TSF:TDI:TSL
                                10041 TSM:FAIL:RE-INIT
                                10043 TSM:INIT
                                10049 !TSM:INIT:TSP FAIL
                                10051 TSM:FAIL:CNT=2
                                10053 TSM:FAIL:DIS
                                10055 TSF:TDI:TSL

                                What is the problem please ?
                                I'm noob.

                                alt text

                                Thank you

                                E TheoLT 2 Replies Last reply
                                0
                                • D Diazovitch69

                                  Hi,

                                  I have this message :

                                  16 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=16,REL=255,VER=2.3.2
                                  26 TSM:INIT
                                  28 TSF:WUR:MS=0
                                  34 !TSM:INIT:TSP FAIL
                                  36 TSM:FAIL:CNT=1
                                  37 TSM:FAIL:DIS
                                  39 TSF:TDI:TSL
                                  10041 TSM:FAIL:RE-INIT
                                  10043 TSM:INIT
                                  10049 !TSM:INIT:TSP FAIL
                                  10051 TSM:FAIL:CNT=2
                                  10053 TSM:FAIL:DIS
                                  10055 TSF:TDI:TSL

                                  What is the problem please ?
                                  I'm noob.

                                  alt text

                                  Thank you

                                  E Offline
                                  E Offline
                                  evb
                                  wrote on last edited by
                                  #95

                                  @Diazovitch69 You can use the log parser : https://www.mysensors.org/build/parser

                                  16 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=16,REL=255,VER=2.3.2	Core initialization of NODE, with capabilities RNNNA---, CPU frequency 16 MHz, library version 2.3.2, release 255
                                  26 TSM:INIT	Transition to Init state
                                  28 TSF:WUR:MS=0	Wait until transport ready, timeout 0
                                  34 !TSM:INIT:TSP FAIL	Transport device initialization failed
                                  36 TSM:FAIL:CNT=1	Transition to Failure state, consecutive failure counter is 1
                                  37 TSM:FAIL:DIS	Disable transport
                                  39 TSF:TDI:TSL	Set transport to sleep
                                  10041 TSM:FAIL:RE-INIT	Attempt to re-initialize transport
                                  10043 TSM:INIT	Transition to Init state
                                  10049 !TSM:INIT:TSP FAIL	Transport device initialization failed
                                  10051 TSM:FAIL:CNT=2	Transition to Failure state, consecutive failure counter is 2
                                  10053 TSM:FAIL:DIS	Disable transport
                                  10055 TSF:TDI:TSL	Set transport to sleep
                                  

                                  The initialization of the transport is failing. So there is a problem between your arduino? and your radio module.
                                  You should check your wirings!

                                  1 Reply Last reply
                                  1
                                  • D Diazovitch69

                                    Hi,

                                    I have this message :

                                    16 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=16,REL=255,VER=2.3.2
                                    26 TSM:INIT
                                    28 TSF:WUR:MS=0
                                    34 !TSM:INIT:TSP FAIL
                                    36 TSM:FAIL:CNT=1
                                    37 TSM:FAIL:DIS
                                    39 TSF:TDI:TSL
                                    10041 TSM:FAIL:RE-INIT
                                    10043 TSM:INIT
                                    10049 !TSM:INIT:TSP FAIL
                                    10051 TSM:FAIL:CNT=2
                                    10053 TSM:FAIL:DIS
                                    10055 TSF:TDI:TSL

                                    What is the problem please ?
                                    I'm noob.

                                    alt text

                                    Thank you

                                    TheoLT Offline
                                    TheoLT Offline
                                    TheoL
                                    Contest Winner
                                    wrote on last edited by TheoL
                                    #96

                                    @Diazovitch69 I have a hard time zooming in the provided wiring, so I can't check it. But as evb says, it looks like the radio isn't connected right. So either it's not wired correctly or you could have a broken radio.

                                    The things I normally do when I encounter this, is first check and double check the wiring. I also measure the individual cables in the dupont cable. It happened to me once I had bought a broken cable. Or another problem I once had, was that the power and ground rail of the bread board weren't connected from the left to the right section. Some broad boards have them connected others don't have that so you need to connect them in the middle.

                                    I even got a free arduino once. Because I was convinced everything was correct so I contacted the supplier and he send me a new Arduino. I replaced it and still the same problem lol. Then I measured and found the cause.

                                    If you're sure the wiring is correct. I'd try out another radio. Be sure that power radio with 3.3v and not 5V.

                                    1 Reply Last reply
                                    1
                                    • N Offline
                                      N Offline
                                      Newzwaver
                                      wrote on last edited by
                                      #97

                                      Hi,

                                      I see in the pictures of the connection that the soil sensor is attached to 3.3V, GND and D3 but I can't see where D3 is named. How do you obtain a read from D3 if it isn't named in the code?

                                      TheoLT 1 Reply Last reply
                                      0
                                      • N Newzwaver

                                        Hi,

                                        I see in the pictures of the connection that the soil sensor is attached to 3.3V, GND and D3 but I can't see where D3 is named. How do you obtain a read from D3 if it isn't named in the code?

                                        TheoLT Offline
                                        TheoLT Offline
                                        TheoL
                                        Contest Winner
                                        wrote on last edited by
                                        #98

                                        @Newzwaver d3 is called just 3 in the arduino IDE for atmel boards. Only the analog pins have an A suffix. But pin 14 is also A0.

                                        Not sure if it answers your question. I'm on a lunch break :)

                                        1 Reply Last reply
                                        0
                                        • N Offline
                                          N Offline
                                          Newzwaver
                                          wrote on last edited by
                                          #99

                                          Hi

                                          Thank you for your reply and I understand that, if you look at the code you will see that pin 3 isn't named/defined in the coed. Unless I am missing something

                                          Thanks

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


                                          24

                                          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