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. OpenHardware.io
  3. Office plant monitor

Office plant monitor

Scheduled Pinned Locked Moved OpenHardware.io
mysensorsplanthumidity
41 Posts 11 Posters 9.9k Views 10 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.
  • jkarrasJ Offline
    jkarrasJ Offline
    jkarras
    wrote on last edited by
    #15

    How did you source the probe portion of the sensor?

    1 Reply Last reply
    0
    • tomtasticT Offline
      tomtasticT Offline
      tomtastic
      wrote on last edited by
      #16

      Could this be used with a capacitative soil sensor to avoid corrosion of the sensor over time ?

      NeverDieN 1 Reply Last reply
      0
      • tomtasticT tomtastic

        Could this be used with a capacitative soil sensor to avoid corrosion of the sensor over time ?

        NeverDieN Offline
        NeverDieN Offline
        NeverDie
        Hero Member
        wrote on last edited by
        #17

        @tomtastic said in Office plant monitor:

        Could this be used with a capacitative soil sensor to avoid corrosion of the sensor over time ?

        Yes. Do you have one in mind?

        tomtasticT 1 Reply Last reply
        0
        • NeverDieN NeverDie

          @tomtastic said in Office plant monitor:

          Could this be used with a capacitative soil sensor to avoid corrosion of the sensor over time ?

          Yes. Do you have one in mind?

          tomtasticT Offline
          tomtasticT Offline
          tomtastic
          wrote on last edited by
          #18

          @NeverDie Something like https://8f26945f-a-62cb3a1a-s-sites.googlegroups.com/site/drxzcl/capsensor.brd ?

          NeverDieN 2 Replies Last reply
          0
          • tomtasticT tomtastic

            @NeverDie Something like https://8f26945f-a-62cb3a1a-s-sites.googlegroups.com/site/drxzcl/capsensor.brd ?

            NeverDieN Offline
            NeverDieN Offline
            NeverDie
            Hero Member
            wrote on last edited by NeverDie
            #19

            @tomtastic said in Office plant monitor:

            @NeverDie Something like https://8f26945f-a-62cb3a1a-s-sites.googlegroups.com/site/drxzcl/capsensor.brd ?

            I don't know whether it's better or worse, but the Chirp! is a capacitive soil moisture probe that has been around for awhile and is, IIRC, atmel based. It used to sell for around $15, but I just noticed that you can buy it for less than $5 from a number of ebay sellers, such as:
            http://www.ebay.com/itm/182446660427

            Historically, one problem with PCB probes has been that over time water intrudes into the PCB and throws off the calibration. Not sure if there's a solution for that problem, though it seems like one should exist.

            [Edit: I see that the original author of the Chirp does have some suggestions now regarding ways to waterproof it: https://www.tindie.com/products/miceuz/i2c-soil-moisture-sensor/ ]

            BTW, the Chirp is open source: https://wemakethings.net/chirp/

            There's also this, which I'm not familiar with: https://www.aliexpress.com/item/DFRobot-Capacitive-Analog-Soil-Moisture-Sensor-3-3-5-5V-Corrosion-Resistant-with-Gravity-3-Pin/32574020064.html?spm=2114.01010208.3.2.P99ddH&ws_ab_test=searchweb201556_0&aff_platform=aaf&cpt=1496178932140&sk=e2Vzr3v&aff_trace_key=17f48f5bf06b4b5daa3c5b3d8442dc7c-1496178932140-02358-e2Vzr3v

            You might be inbterested in this thread: https://forum.mysensors.org/topic/990/soil-tensiometer-sensor-network

            1 Reply Last reply
            0
            • tomtasticT tomtastic

              @NeverDie Something like https://8f26945f-a-62cb3a1a-s-sites.googlegroups.com/site/drxzcl/capsensor.brd ?

              NeverDieN Offline
              NeverDieN Offline
              NeverDie
              Hero Member
              wrote on last edited by NeverDie
              #20

              @tomtastic

              Anyhow, the probe you referenced looks a lot like this one: http://zerocharactersleft.blogspot.com/2011/11/pcb-as-capacitive-soil-moisture-sensor.html

              As an aside, people seem happy with the Vegetronix probe, up until its PCB suffers water intrusion. The asking price is rather high though. If I knew how to, I'd make one of those and simply waterproof it better.

              tomtasticT 1 Reply Last reply
              0
              • NeverDieN NeverDie

                @tomtastic

                Anyhow, the probe you referenced looks a lot like this one: http://zerocharactersleft.blogspot.com/2011/11/pcb-as-capacitive-soil-moisture-sensor.html

                As an aside, people seem happy with the Vegetronix probe, up until its PCB suffers water intrusion. The asking price is rather high though. If I knew how to, I'd make one of those and simply waterproof it better.

                tomtasticT Offline
                tomtasticT Offline
                tomtastic
                wrote on last edited by
                #21

                @NeverDie The person behind 'Chirp' actually left a comment in your last link (zerocharactersleft). He posts an interesting link back to his own studies too : https://wemakethings.net/2012/09/26/capacitance_measurement/

                NeverDieN 2 Replies Last reply
                1
                • tomtasticT tomtastic

                  @NeverDie The person behind 'Chirp' actually left a comment in your last link (zerocharactersleft). He posts an interesting link back to his own studies too : https://wemakethings.net/2012/09/26/capacitance_measurement/

                  NeverDieN Offline
                  NeverDieN Offline
                  NeverDie
                  Hero Member
                  wrote on last edited by NeverDie
                  #22

                  @tomtastic said in Office plant monitor:

                  @NeverDie The person behind 'Chirp' actually left a comment in your last link (zerocharactersleft). He posts an interesting link back to his own studies too : https://wemakethings.net/2012/09/26/capacitance_measurement/

                  Thanks for the link.

                  For the best results, running the square wave at 80Mhz or faster seems to be important. That's what vegetronix does. Now, the good news is that the clock on an ESP8266 can supply that frequency.. However, all this analog circuitry is beyond my purview, so I inevitably hit a wall with that. Is that something you (or someone reading this) knows how to do? For instance, I don't know whether the chirp guy's circuit that you linked to works as-is at 80Mhz, or whether it requires modification. If the latter, that's where I get stuck not knowing what to do.

                  1 Reply Last reply
                  0
                  • tomtasticT tomtastic

                    @NeverDie The person behind 'Chirp' actually left a comment in your last link (zerocharactersleft). He posts an interesting link back to his own studies too : https://wemakethings.net/2012/09/26/capacitance_measurement/

                    NeverDieN Offline
                    NeverDieN Offline
                    NeverDie
                    Hero Member
                    wrote on last edited by NeverDie
                    #23

                    @tomtastic

                    It turns out that the circuit the Chirp guy described in the link that you provided is, in fact, what is built into Chirp: https://wemakethings.net/2013/06/07/chirp-plant-watering-alarm/

                    None of his calculations make reference to frequency, so maybe (?) you could hook up the circuit to 80Mhz and it would "just work." I suppose the switching speed of those transistors might be a factor. I have no insight into that, but it would probably be easy for someone to test. IIRC, the higher frequency makes a capacitive soil moisture sensor much less influenced by soil characteristics other than moisture, so it's really necessary to have that in order to make a good probe.

                    [Edit: What you don't want is a soil moisture probe that requires frequent manual re-calibration. Ordinary conductive probes all have that as an inherent problem. Hence the hunt for a worthwhile capacitive soil moisture sensor.] ]

                    1 Reply Last reply
                    0
                    • NeverDieN Offline
                      NeverDieN Offline
                      NeverDie
                      Hero Member
                      wrote on last edited by
                      #24

                      Completely unrelated, but I just noticed this:
                      https://www.aliexpress.com/item/SHT10-SHT11-SHT15-waterproof-sensor-case-temperature-and-humidity-protective-cover-soil-sensor-cover-40mm-15mm/32575966509.html?spm=2114.8153822.cb0001.16.lITM8E&scm=1007.13409.76764.0&pvid=0acc75b7-138d-456f-a5bf-5147c2ea763f&tpp=1
                      So with that, you could just use a regular humidity sensor inside it to judge soil moisture. Pretty cool, yes? Not sure how big it is, but maybe you could even fit your entire sensor node inside it.

                      Nca78N 1 Reply Last reply
                      0
                      • NeverDieN NeverDie

                        Completely unrelated, but I just noticed this:
                        https://www.aliexpress.com/item/SHT10-SHT11-SHT15-waterproof-sensor-case-temperature-and-humidity-protective-cover-soil-sensor-cover-40mm-15mm/32575966509.html?spm=2114.8153822.cb0001.16.lITM8E&scm=1007.13409.76764.0&pvid=0acc75b7-138d-456f-a5bf-5147c2ea763f&tpp=1
                        So with that, you could just use a regular humidity sensor inside it to judge soil moisture. Pretty cool, yes? Not sure how big it is, but maybe you could even fit your entire sensor node inside it.

                        Nca78N Offline
                        Nca78N Offline
                        Nca78
                        Hardware Contributor
                        wrote on last edited by
                        #25

                        @NeverDie said in Office plant monitor:

                        Completely unrelated, but I just noticed this:
                        https://www.aliexpress.com/item/SHT10-SHT11-SHT15-waterproof-sensor-case-temperature-and-humidity-protective-cover-soil-sensor-cover-40mm-15mm/32575966509.html?spm=2114.8153822.cb0001.16.lITM8E&scm=1007.13409.76764.0&pvid=0acc75b7-138d-456f-a5bf-5147c2ea763f&tpp=1
                        So with that, you could just use a regular humidity sensor inside it to judge soil moisture. Pretty cool, yes? Not sure how big it is, but maybe you could even fit your entire sensor node inside it.

                        One of the local shops I buy electronic parts from has those. Unfortunately it's too small to house an entire sensor.

                        NeverDieN 1 Reply Last reply
                        1
                        • NeverDieN Offline
                          NeverDieN Offline
                          NeverDie
                          Hero Member
                          wrote on last edited by
                          #26

                          This thread also has a lot of good background information and links about capacitive soil moisture sensors: https://lowpowerlab.com/forum/general-topics/using-capsense-to-measure-soil-moisture/

                          1 Reply Last reply
                          1
                          • NeverDieN Offline
                            NeverDieN Offline
                            NeverDie
                            Hero Member
                            wrote on last edited by NeverDie
                            #27

                            It might be that one could more or less whack an 80Mhz frequency oscillation chip into the Chirp circuit: https://www.digikey.com/product-detail/en/linear-technology/LTC6905CS5-80-TRMPBF/LTC6905CS5-80-TRMPBFCT-ND/810907

                            1 Reply Last reply
                            0
                            • scalzS Offline
                              scalzS Offline
                              scalz
                              Hardware Contributor
                              wrote on last edited by scalz
                              #28

                              i agree with @NeverDie ;)
                              It's better to use high freq for a reliable soil moisture, regarding soils, calibration etc. and some studies argues even more than 200Mhz. but with 80-100 it's nice.
                              I have one design at this freq, non corrosive design, and not same as chirp though, but can't really help you (mine is not open yet, and busy on others projects).
                              Regarding the chirp design, I think it may need an opamp for better results regarding the 1M resistor etc, and some more tuning if going high freq.

                              1 Reply Last reply
                              1
                              • S Offline
                                S Offline
                                simbic
                                wrote on last edited by
                                #29

                                Trying to get this working but getting alot of errors. New to this so bear with me.

                                In file included from C:\...\Arduino\libraries\Moisture_sensor\Moisture_sensor.ino:55:0:
                                
                                C:\...\Arduino\libraries\MySensors/MyTransportRFM69.h:31:1: error: expected class-name before '{' token
                                
                                 { 
                                
                                 ^
                                
                                C:\...\Arduino\libraries\MySensors/MyTransportRFM69.h:33:36: error: 'RFM69_FREQUENCY' was not declared in this scope
                                
                                  MyTransportRFM69(uint8_t freqBand=RFM69_FREQUENCY, uint8_t networkId=RFM69_NETWORKID, uint8_t slaveSelectPin=RF69_SPI_CS, uint8_t interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false, uint8_t interruptNum=RF69_IRQ_NUM);
                                
                                                                    ^
                                
                                C:\...\Arduino\libraries\MySensors/MyTransportRFM69.h:33:71: error: 'RFM69_NETWORKID' was not declared in this scope
                                
                                  MyTransportRFM69(uint8_t freqBand=RFM69_FREQUENCY, uint8_t networkId=RFM69_NETWORKID, uint8_t slaveSelectPin=RF69_SPI_CS, uint8_t interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false, uint8_t interruptNum=RF69_IRQ_NUM);
                                
                                                                                                       ^
                                
                                In file included from C:\...\Arduino\libraries\Moisture_sensor\Moisture_sensor.ino:56:0:
                                
                                C:\...\Arduino\libraries\MySensors/MySigningAtsha204Soft.h:55:1: error: expected class-name before '{' token
                                
                                 { 
                                
                                 ^
                                
                                C:\...\Arduino\libraries\MySensors/MySigningAtsha204Soft.h:62:25: error: 'MY_RANDOMSEED_PIN' was not declared in this scope
                                
                                   uint8_t randomseedPin=MY_RANDOMSEED_PIN);
                                
                                                         ^
                                
                                Moisture_sensor:83: error: call to 'MySigningAtsha204Soft::MySigningAtsha204Soft(bool, uint8_t)' uses the default argument for parameter 2, which is not yet defined
                                
                                 MySigningAtsha204Soft signer;
                                
                                                       ^
                                
                                Moisture_sensor:84: error: 'MyHwATMega328' does not name a type
                                
                                 MyHwATMega328 hw;
                                
                                 ^
                                
                                Moisture_sensor:85: error: call to 'MyTransportRFM69::MyTransportRFM69(uint8_t, uint8_t, uint8_t, uint8_t, bool, uint8_t)' uses the default argument for parameter 1, which is not yet defined
                                
                                 MyTransportRFM69 transport;
                                
                                                  ^
                                
                                Moisture_sensor:85: error: call to 'MyTransportRFM69::MyTransportRFM69(uint8_t, uint8_t, uint8_t, uint8_t, bool, uint8_t)' uses the default argument for parameter 2, which is not yet defined
                                
                                Moisture_sensor:86: error: 'MySensor' does not name a type
                                
                                 MySensor node(transport, hw, signer);
                                
                                 ^
                                
                                C:\...\Arduino\libraries\Moisture_sensor\Moisture_sensor.ino: In function 'void setup()':
                                
                                Moisture_sensor:112: error: 'node' was not declared in this scope
                                
                                   node.begin();
                                
                                   ^
                                
                                C:\...\Arduino\libraries\Moisture_sensor\Moisture_sensor.ino: In function 'void loop()':
                                
                                Moisture_sensor:163: error: 'node' was not declared in this scope
                                
                                   node.send(msgMoisture.set((moistureLevel + oldMoistureLevel) / 2.0 / 10.23, 1));
                                
                                   ^
                                
                                C:\...\Arduino\libraries\Moisture_sensor\Moisture_sensor.ino: In function 'int readMoisture()':
                                
                                Moisture_sensor:200: error: 'node' was not declared in this scope
                                
                                   node.sleep(STABILIZATION_TIME);
                                
                                   ^
                                
                                exit status 1
                                call to 'MySigningAtsha204Soft::MySigningAtsha204Soft(bool, uint8_t)' uses the default argument for parameter 2, which is not yet defined
                                
                                

                                I have looked through the code but can't seem to see what is wrong with it.

                                Please help :)

                                mfalkviddM 1 Reply Last reply
                                0
                                • S simbic

                                  Trying to get this working but getting alot of errors. New to this so bear with me.

                                  In file included from C:\...\Arduino\libraries\Moisture_sensor\Moisture_sensor.ino:55:0:
                                  
                                  C:\...\Arduino\libraries\MySensors/MyTransportRFM69.h:31:1: error: expected class-name before '{' token
                                  
                                   { 
                                  
                                   ^
                                  
                                  C:\...\Arduino\libraries\MySensors/MyTransportRFM69.h:33:36: error: 'RFM69_FREQUENCY' was not declared in this scope
                                  
                                    MyTransportRFM69(uint8_t freqBand=RFM69_FREQUENCY, uint8_t networkId=RFM69_NETWORKID, uint8_t slaveSelectPin=RF69_SPI_CS, uint8_t interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false, uint8_t interruptNum=RF69_IRQ_NUM);
                                  
                                                                      ^
                                  
                                  C:\...\Arduino\libraries\MySensors/MyTransportRFM69.h:33:71: error: 'RFM69_NETWORKID' was not declared in this scope
                                  
                                    MyTransportRFM69(uint8_t freqBand=RFM69_FREQUENCY, uint8_t networkId=RFM69_NETWORKID, uint8_t slaveSelectPin=RF69_SPI_CS, uint8_t interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false, uint8_t interruptNum=RF69_IRQ_NUM);
                                  
                                                                                                         ^
                                  
                                  In file included from C:\...\Arduino\libraries\Moisture_sensor\Moisture_sensor.ino:56:0:
                                  
                                  C:\...\Arduino\libraries\MySensors/MySigningAtsha204Soft.h:55:1: error: expected class-name before '{' token
                                  
                                   { 
                                  
                                   ^
                                  
                                  C:\...\Arduino\libraries\MySensors/MySigningAtsha204Soft.h:62:25: error: 'MY_RANDOMSEED_PIN' was not declared in this scope
                                  
                                     uint8_t randomseedPin=MY_RANDOMSEED_PIN);
                                  
                                                           ^
                                  
                                  Moisture_sensor:83: error: call to 'MySigningAtsha204Soft::MySigningAtsha204Soft(bool, uint8_t)' uses the default argument for parameter 2, which is not yet defined
                                  
                                   MySigningAtsha204Soft signer;
                                  
                                                         ^
                                  
                                  Moisture_sensor:84: error: 'MyHwATMega328' does not name a type
                                  
                                   MyHwATMega328 hw;
                                  
                                   ^
                                  
                                  Moisture_sensor:85: error: call to 'MyTransportRFM69::MyTransportRFM69(uint8_t, uint8_t, uint8_t, uint8_t, bool, uint8_t)' uses the default argument for parameter 1, which is not yet defined
                                  
                                   MyTransportRFM69 transport;
                                  
                                                    ^
                                  
                                  Moisture_sensor:85: error: call to 'MyTransportRFM69::MyTransportRFM69(uint8_t, uint8_t, uint8_t, uint8_t, bool, uint8_t)' uses the default argument for parameter 2, which is not yet defined
                                  
                                  Moisture_sensor:86: error: 'MySensor' does not name a type
                                  
                                   MySensor node(transport, hw, signer);
                                  
                                   ^
                                  
                                  C:\...\Arduino\libraries\Moisture_sensor\Moisture_sensor.ino: In function 'void setup()':
                                  
                                  Moisture_sensor:112: error: 'node' was not declared in this scope
                                  
                                     node.begin();
                                  
                                     ^
                                  
                                  C:\...\Arduino\libraries\Moisture_sensor\Moisture_sensor.ino: In function 'void loop()':
                                  
                                  Moisture_sensor:163: error: 'node' was not declared in this scope
                                  
                                     node.send(msgMoisture.set((moistureLevel + oldMoistureLevel) / 2.0 / 10.23, 1));
                                  
                                     ^
                                  
                                  C:\...\Arduino\libraries\Moisture_sensor\Moisture_sensor.ino: In function 'int readMoisture()':
                                  
                                  Moisture_sensor:200: error: 'node' was not declared in this scope
                                  
                                     node.sleep(STABILIZATION_TIME);
                                  
                                     ^
                                  
                                  exit status 1
                                  call to 'MySigningAtsha204Soft::MySigningAtsha204Soft(bool, uint8_t)' uses the default argument for parameter 2, which is not yet defined
                                  
                                  

                                  I have looked through the code but can't seem to see what is wrong with it.

                                  Please help :)

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

                                  @simbic did you modify the sketch in any way? If so, could you please post it?

                                  My guess would be an incomplete #define or using incompatible versions. Which version of MySensors are you using?

                                  S 1 Reply Last reply
                                  0
                                  • mfalkviddM mfalkvidd

                                    @simbic did you modify the sketch in any way? If so, could you please post it?

                                    My guess would be an incomplete #define or using incompatible versions. Which version of MySensors are you using?

                                    S Offline
                                    S Offline
                                    simbic
                                    wrote on last edited by
                                    #31

                                    @mfalkvidd

                                    I have assembled a copy of @carlierd 's office plant monitor since it looked kinda neat.
                                    When I first tried to upload @carlierd 's Moisture_sensor.ino it complained that several libraries were missing.
                                    So I started google-fu around to find them.
                                    What was missing was:
                                    MyTransportRFM69.h
                                    MyTransport.h
                                    MySigningAtsha204Soft.h
                                    MySigning.h
                                    MyMessage.h

                                    aswell as drivers, that I placed in folder /utility/
                                    ATSHA204.h
                                    RFM69.h
                                    sha256.h

                                    The code is as follows. I have only pressed include mysensors' library since it complained that it was missing.

                                    /**
                                     * The MySensors Arduino library handles the wireless radio link and protocol
                                     * between your home built sensors/actuators and HA controller of choice.
                                     * The sensors forms a self healing radio network with optional repeaters. Each
                                     * repeater and gateway builds a routing tables in EEPROM which keeps track of the
                                     * network topology allowing messages to be routed to nodes.
                                     *
                                     * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
                                     * Copyright (C) 2013-2015 Sensnology AB
                                     * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
                                     *
                                     * Documentation: http://www.mysensors.org
                                     * Support Forum: http://forum.mysensors.org
                                     *
                                     * This program is free software; you can redistribute it and/or
                                     * modify it under the terms of the GNU General Public License
                                     * version 2 as published by the Free Software Foundation.
                                     *
                                     * Code and idea from mfalkvidd (http://forum.mysensors.org/user/mfalkvidd).
                                     *
                                     */
                                    
                                    /**************************************************************************************/
                                    /* Moisture sensor.                                                                   */
                                    /*                                                                                    */
                                    /* Version     : 1.2.5                                                                */
                                    /* Date        : 11/04/2016                                                           */
                                    /* Modified by : David Carlier                                                        */
                                    /**************************************************************************************/
                                    /*                                ---------------                                     */
                                    /*                            RST |             |  A5                                 */
                                    /*                            RX  |             |  A4                                 */
                                    /*                            TX  |   ARDUINO   |  A3                                 */
                                    /*     RFM69 (DIO0) --------- D2  |     UNO     |  A2                                 */
                                    /*                            D3  |             |  A1 --------- Moisture probe        */
                                    /*            Power --------- D4  | ATMEGA 328p |  A0 --------- Moisture probe        */
                                    /*              +3v --------- VCC |             | GND --------- GND                   */
                                    /*              GND --------- GND |  8MHz int.  | REF                                 */
                                    /*                            OSC |             | VCC --------- +3v                   */
                                    /*                            OSC |             | D13 --------- RFM69 (SCK)           */
                                    /*                            D5  |             | D12 --------- RFM69 (MISO)          */
                                    /*                            D6  |             | D11 --------- RFM69 (MOSI)          */
                                    /*                            D7  |             | D10 --------- RFM69 (NSS)           */
                                    /*              LED --------- D8  |             |  D9                                 */
                                    /*                                ---------------                                     */
                                    /*                                                                                    */
                                    /* +3v = 2*AA                                                                         */
                                    /*                                                                                    */
                                    /**************************************************************************************/
                                    
                                    
                                    #include <SPI.h>
                                    #include <MySensors.h>
                                    #include <MyTransportRFM69.h>
                                    #include <MySigningAtsha204Soft.h>
                                    
                                    
                                    //Define functions
                                    #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
                                    #define N_ELEMENTS(array) (sizeof(array)/sizeof((array)[0]))
                                    
                                    //Constants for MySensors
                                    #define SKETCH_NAME           "Moisture Sensor"
                                    #define SKETCH_VERSION        "1.2.6"
                                    #define CHILD_ID_MOISTURE     0
                                    #define CHILD_ID_VOLTAGE      1
                                    #define LED_PIN               8
                                    #define THRESHOLD             1.1     // Only make a new reading with reverse polarity if the change is larger than 10%
                                    #define STABILIZATION_TIME    1000    // Let the sensor stabilize before reading
                                    //#define BATTERY_FULL          3143    // 2xAA usually gives 3.143V when full
                                    #define BATTERY_FULL          3100    // CR2032 usually gives 3.1V when full
                                    #define BATTERY_ZERO          2340    // 2.34V limit for 328p at 8MHz
                                    #define SLEEP_TIME            7200000 // Sleep time between reads (in milliseconds) (close to 2 hours)
                                    const int SENSOR_ANALOG_PINS[] = {A0, A1};
                                    
                                    
                                    //Variables
                                    byte direction = 0;
                                    int oldMoistureLevel = -1;
                                    
                                    //Construct MySensors library
                                    MySigningAtsha204Soft signer;
                                    MyHwATMega328 hw;
                                    MyTransportRFM69 transport;
                                    MySensor node(transport, hw, signer);
                                    MyMessage msgMoisture(CHILD_ID_MOISTURE, V_HUM);
                                    MyMessage msgVolt(CHILD_ID_VOLTAGE, V_VOLTAGE);
                                    
                                    /**************************************************************************************/
                                    /* Initialization                                                                     */
                                    /**************************************************************************************/
                                    void setup()  
                                      {
                                      //Get time (for setup duration)
                                      #ifdef DEBUG
                                        unsigned long startTime = millis();
                                      #endif
                                    
                                      //Setup LED pin
                                      pinMode(LED_PIN, OUTPUT);
                                      blinkLedFastly(3);
                                    
                                      //Set moisutre sensor pins
                                      for (int i = 0; i < N_ELEMENTS(SENSOR_ANALOG_PINS); i++)
                                        {
                                        pinMode(SENSOR_ANALOG_PINS[i], OUTPUT);
                                        digitalWrite(SENSOR_ANALOG_PINS[i], LOW);
                                        }
                                    
                                      //Start MySensors and send the sketch version information to the gateway
                                      node.begin();
                                      node.sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
                                    
                                      //Register all sensors
                                      node.present(CHILD_ID_MOISTURE, S_HUM);
                                      node.present(CHILD_ID_VOLTAGE, S_MULTIMETER);
                                    
                                      //Setup done !
                                      blinkLedFastly(3);
                                    
                                      //Print setup debug
                                      #ifdef DEBUG
                                        int duration = millis() - startTime;
                                        Serial.print("[Setup duration: "); Serial.print(duration, DEC); Serial.println(" ms]");
                                      #endif
                                      }
                                    
                                    /**************************************************************************************/
                                    /* Main loop                                                                          */
                                    /**************************************************************************************/
                                    void loop()
                                      {
                                      //Get time (for a complete loop)
                                      #ifdef DEBUG
                                        unsigned long startTime = millis();
                                      #endif
                                    
                                      //Get moisture level
                                      int moistureLevel = readMoisture();
                                    
                                      //Send rolling average of 2 samples to get rid of the "ripple" produced by different resistance in the internal pull-up resistors
                                      //See http://forum.mysensors.org/topic/2147/office-plant-monitoring/55 for more information
                                      //Check if it was first reading, save current value as old
                                      if (oldMoistureLevel == -1)
                                        { 
                                        oldMoistureLevel = moistureLevel;
                                        }
                                    
                                      //Verify if current measurement is not too far from the previous one
                                      if (moistureLevel > (oldMoistureLevel * THRESHOLD) || moistureLevel < (oldMoistureLevel / THRESHOLD))
                                        {
                                        //The change was large, so it was probably not caused by the difference in internal pull-ups.
                                        //Measure again, this time with reversed polarity.
                                        moistureLevel = readMoisture();
                                        }
                                    
                                      //Store current moisture level
                                      oldMoistureLevel = moistureLevel;
                                    
                                      //Report data to the gateway
                                      long voltage = getVoltage();
                                      node.send(msgMoisture.set((moistureLevel + oldMoistureLevel) / 2.0 / 10.23, 1));
                                      node.send(msgVolt.set(voltage / 1000.0, 2));
                                      int batteryPcnt = round((voltage - BATTERY_ZERO) * 100.0 / (BATTERY_FULL - BATTERY_ZERO));
                                      if (batteryPcnt > 100) {batteryPcnt = 100;}
                                      node.sendBatteryLevel(batteryPcnt);
                                    
                                      //Print debug
                                      #ifdef DEBUG
                                        Serial.print((moistureLevel + oldMoistureLevel) / 2.0 / 10.23);
                                        Serial.print("%");
                                        Serial.print("   ");
                                        Serial.print(voltage / 1000.0);
                                        Serial.print("v");
                                        Serial.print("   ");
                                        Serial.print(batteryPcnt);
                                        Serial.print("%");
                                        int duration = millis() - startTime;
                                        Serial.print("   ");
                                        Serial.print("["); Serial.print(duration, DEC); Serial.println(" ms]");
                                        Serial.flush();
                                      #endif
                                    
                                      //Sleep until next measurement
                                      blinkLedFastly(1);
                                      node.sleep(SLEEP_TIME);
                                      }
                                    
                                    /**************************************************************************************/
                                    /* Allows to get moisture.                                                            */
                                    /**************************************************************************************/
                                    int readMoisture()
                                      {
                                      //Power on the sensor and read once to let the ADC capacitor start charging
                                      pinMode(SENSOR_ANALOG_PINS[direction], INPUT_PULLUP);
                                      analogRead(SENSOR_ANALOG_PINS[direction]);
                                      
                                      //Stabilize and read the value
                                      node.sleep(STABILIZATION_TIME);
                                      int moistureLevel = (1023 - analogRead(SENSOR_ANALOG_PINS[direction]));
                                    
                                      //Turn off the sensor to conserve battery and minimize corrosion
                                      pinMode(SENSOR_ANALOG_PINS[direction], OUTPUT);
                                      digitalWrite(SENSOR_ANALOG_PINS[direction], LOW);
                                    
                                      //Make direction alternate between 0 and 1 to reverse polarity which reduces corrosion
                                      direction = (direction + 1) % 2;
                                      return moistureLevel;
                                      }
                                    
                                    /**************************************************************************************/
                                    /* Allows to fastly blink the LED.                                                    */
                                    /**************************************************************************************/
                                    void blinkLedFastly(byte loop)
                                      {
                                      byte delayOn = 150;
                                      byte delayOff = 150;
                                      for (int i = 0; i < loop; i++)
                                        {
                                        blinkLed(LED_PIN, delayOn);
                                        delay(delayOff);
                                        }
                                      }
                                    
                                    /**************************************************************************************/
                                    /* Allows to blink a LED.                                                             */
                                    /**************************************************************************************/
                                    void blinkLed(byte pinToBlink, int delayInMs)
                                      {
                                      digitalWrite(pinToBlink,HIGH);
                                      delay(delayInMs);
                                      digitalWrite(pinToBlink,LOW);
                                      }
                                    
                                    /**************************************************************************************/
                                    /* Allows to get the real Vcc (return value in mV).                                   */
                                    /* http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/   */
                                    /**************************************************************************************/
                                    long getVoltage()
                                      {
                                      ADMUX = (0<<REFS1) | (1<<REFS0) | (0<<ADLAR) | (1<<MUX3) | (1<<MUX2) | (1<<MUX1) | (0<<MUX0);
                                      delay(50);  // Let mux settle a little to get a more stable A/D conversion
                                      //Start a conversion  
                                      ADCSRA |= _BV( ADSC );
                                      //Wait for it to complete
                                      while (bit_is_set(ADCSRA, ADSC));
                                    
                                      //Compute and return the value
                                      uint8_t low  = ADCL;                  // must read ADCL first - it then locks ADCH
                                      uint8_t high = ADCH;                  // unlocks both
                                      long result = (high << 8) | low;
                                      result = 1125300L / result;           // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000
                                      return result;                        // Vcc in millivolts
                                      }
                                    

                                    I have just installed Arduino IDE, and are using the latest mysensors library 2.1.1.

                                    Another thing it complains about is:

                                    Invalid library found in C:\...\Arduino\libraries\Moisture_sensor: C:\...\Arduino\libraries\Moisture_sensor```
                                    

                                    which is wierd since I have just copy+pasted it from here:
                                    https://www.openhardware.io/view/123/Office-plant-monitor

                                    aswell as built the sensor from there.

                                    If you can help, I would be very glad, as I just hoped it would be smooth sailing using mysensors. Build, upload and let it work its magic.

                                    Tack på förhand!
                                    Simon

                                    mfalkviddM 1 Reply Last reply
                                    0
                                    • S simbic

                                      @mfalkvidd

                                      I have assembled a copy of @carlierd 's office plant monitor since it looked kinda neat.
                                      When I first tried to upload @carlierd 's Moisture_sensor.ino it complained that several libraries were missing.
                                      So I started google-fu around to find them.
                                      What was missing was:
                                      MyTransportRFM69.h
                                      MyTransport.h
                                      MySigningAtsha204Soft.h
                                      MySigning.h
                                      MyMessage.h

                                      aswell as drivers, that I placed in folder /utility/
                                      ATSHA204.h
                                      RFM69.h
                                      sha256.h

                                      The code is as follows. I have only pressed include mysensors' library since it complained that it was missing.

                                      /**
                                       * The MySensors Arduino library handles the wireless radio link and protocol
                                       * between your home built sensors/actuators and HA controller of choice.
                                       * The sensors forms a self healing radio network with optional repeaters. Each
                                       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
                                       * network topology allowing messages to be routed to nodes.
                                       *
                                       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
                                       * Copyright (C) 2013-2015 Sensnology AB
                                       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
                                       *
                                       * Documentation: http://www.mysensors.org
                                       * Support Forum: http://forum.mysensors.org
                                       *
                                       * This program is free software; you can redistribute it and/or
                                       * modify it under the terms of the GNU General Public License
                                       * version 2 as published by the Free Software Foundation.
                                       *
                                       * Code and idea from mfalkvidd (http://forum.mysensors.org/user/mfalkvidd).
                                       *
                                       */
                                      
                                      /**************************************************************************************/
                                      /* Moisture sensor.                                                                   */
                                      /*                                                                                    */
                                      /* Version     : 1.2.5                                                                */
                                      /* Date        : 11/04/2016                                                           */
                                      /* Modified by : David Carlier                                                        */
                                      /**************************************************************************************/
                                      /*                                ---------------                                     */
                                      /*                            RST |             |  A5                                 */
                                      /*                            RX  |             |  A4                                 */
                                      /*                            TX  |   ARDUINO   |  A3                                 */
                                      /*     RFM69 (DIO0) --------- D2  |     UNO     |  A2                                 */
                                      /*                            D3  |             |  A1 --------- Moisture probe        */
                                      /*            Power --------- D4  | ATMEGA 328p |  A0 --------- Moisture probe        */
                                      /*              +3v --------- VCC |             | GND --------- GND                   */
                                      /*              GND --------- GND |  8MHz int.  | REF                                 */
                                      /*                            OSC |             | VCC --------- +3v                   */
                                      /*                            OSC |             | D13 --------- RFM69 (SCK)           */
                                      /*                            D5  |             | D12 --------- RFM69 (MISO)          */
                                      /*                            D6  |             | D11 --------- RFM69 (MOSI)          */
                                      /*                            D7  |             | D10 --------- RFM69 (NSS)           */
                                      /*              LED --------- D8  |             |  D9                                 */
                                      /*                                ---------------                                     */
                                      /*                                                                                    */
                                      /* +3v = 2*AA                                                                         */
                                      /*                                                                                    */
                                      /**************************************************************************************/
                                      
                                      
                                      #include <SPI.h>
                                      #include <MySensors.h>
                                      #include <MyTransportRFM69.h>
                                      #include <MySigningAtsha204Soft.h>
                                      
                                      
                                      //Define functions
                                      #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
                                      #define N_ELEMENTS(array) (sizeof(array)/sizeof((array)[0]))
                                      
                                      //Constants for MySensors
                                      #define SKETCH_NAME           "Moisture Sensor"
                                      #define SKETCH_VERSION        "1.2.6"
                                      #define CHILD_ID_MOISTURE     0
                                      #define CHILD_ID_VOLTAGE      1
                                      #define LED_PIN               8
                                      #define THRESHOLD             1.1     // Only make a new reading with reverse polarity if the change is larger than 10%
                                      #define STABILIZATION_TIME    1000    // Let the sensor stabilize before reading
                                      //#define BATTERY_FULL          3143    // 2xAA usually gives 3.143V when full
                                      #define BATTERY_FULL          3100    // CR2032 usually gives 3.1V when full
                                      #define BATTERY_ZERO          2340    // 2.34V limit for 328p at 8MHz
                                      #define SLEEP_TIME            7200000 // Sleep time between reads (in milliseconds) (close to 2 hours)
                                      const int SENSOR_ANALOG_PINS[] = {A0, A1};
                                      
                                      
                                      //Variables
                                      byte direction = 0;
                                      int oldMoistureLevel = -1;
                                      
                                      //Construct MySensors library
                                      MySigningAtsha204Soft signer;
                                      MyHwATMega328 hw;
                                      MyTransportRFM69 transport;
                                      MySensor node(transport, hw, signer);
                                      MyMessage msgMoisture(CHILD_ID_MOISTURE, V_HUM);
                                      MyMessage msgVolt(CHILD_ID_VOLTAGE, V_VOLTAGE);
                                      
                                      /**************************************************************************************/
                                      /* Initialization                                                                     */
                                      /**************************************************************************************/
                                      void setup()  
                                        {
                                        //Get time (for setup duration)
                                        #ifdef DEBUG
                                          unsigned long startTime = millis();
                                        #endif
                                      
                                        //Setup LED pin
                                        pinMode(LED_PIN, OUTPUT);
                                        blinkLedFastly(3);
                                      
                                        //Set moisutre sensor pins
                                        for (int i = 0; i < N_ELEMENTS(SENSOR_ANALOG_PINS); i++)
                                          {
                                          pinMode(SENSOR_ANALOG_PINS[i], OUTPUT);
                                          digitalWrite(SENSOR_ANALOG_PINS[i], LOW);
                                          }
                                      
                                        //Start MySensors and send the sketch version information to the gateway
                                        node.begin();
                                        node.sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
                                      
                                        //Register all sensors
                                        node.present(CHILD_ID_MOISTURE, S_HUM);
                                        node.present(CHILD_ID_VOLTAGE, S_MULTIMETER);
                                      
                                        //Setup done !
                                        blinkLedFastly(3);
                                      
                                        //Print setup debug
                                        #ifdef DEBUG
                                          int duration = millis() - startTime;
                                          Serial.print("[Setup duration: "); Serial.print(duration, DEC); Serial.println(" ms]");
                                        #endif
                                        }
                                      
                                      /**************************************************************************************/
                                      /* Main loop                                                                          */
                                      /**************************************************************************************/
                                      void loop()
                                        {
                                        //Get time (for a complete loop)
                                        #ifdef DEBUG
                                          unsigned long startTime = millis();
                                        #endif
                                      
                                        //Get moisture level
                                        int moistureLevel = readMoisture();
                                      
                                        //Send rolling average of 2 samples to get rid of the "ripple" produced by different resistance in the internal pull-up resistors
                                        //See http://forum.mysensors.org/topic/2147/office-plant-monitoring/55 for more information
                                        //Check if it was first reading, save current value as old
                                        if (oldMoistureLevel == -1)
                                          { 
                                          oldMoistureLevel = moistureLevel;
                                          }
                                      
                                        //Verify if current measurement is not too far from the previous one
                                        if (moistureLevel > (oldMoistureLevel * THRESHOLD) || moistureLevel < (oldMoistureLevel / THRESHOLD))
                                          {
                                          //The change was large, so it was probably not caused by the difference in internal pull-ups.
                                          //Measure again, this time with reversed polarity.
                                          moistureLevel = readMoisture();
                                          }
                                      
                                        //Store current moisture level
                                        oldMoistureLevel = moistureLevel;
                                      
                                        //Report data to the gateway
                                        long voltage = getVoltage();
                                        node.send(msgMoisture.set((moistureLevel + oldMoistureLevel) / 2.0 / 10.23, 1));
                                        node.send(msgVolt.set(voltage / 1000.0, 2));
                                        int batteryPcnt = round((voltage - BATTERY_ZERO) * 100.0 / (BATTERY_FULL - BATTERY_ZERO));
                                        if (batteryPcnt > 100) {batteryPcnt = 100;}
                                        node.sendBatteryLevel(batteryPcnt);
                                      
                                        //Print debug
                                        #ifdef DEBUG
                                          Serial.print((moistureLevel + oldMoistureLevel) / 2.0 / 10.23);
                                          Serial.print("%");
                                          Serial.print("   ");
                                          Serial.print(voltage / 1000.0);
                                          Serial.print("v");
                                          Serial.print("   ");
                                          Serial.print(batteryPcnt);
                                          Serial.print("%");
                                          int duration = millis() - startTime;
                                          Serial.print("   ");
                                          Serial.print("["); Serial.print(duration, DEC); Serial.println(" ms]");
                                          Serial.flush();
                                        #endif
                                      
                                        //Sleep until next measurement
                                        blinkLedFastly(1);
                                        node.sleep(SLEEP_TIME);
                                        }
                                      
                                      /**************************************************************************************/
                                      /* Allows to get moisture.                                                            */
                                      /**************************************************************************************/
                                      int readMoisture()
                                        {
                                        //Power on the sensor and read once to let the ADC capacitor start charging
                                        pinMode(SENSOR_ANALOG_PINS[direction], INPUT_PULLUP);
                                        analogRead(SENSOR_ANALOG_PINS[direction]);
                                        
                                        //Stabilize and read the value
                                        node.sleep(STABILIZATION_TIME);
                                        int moistureLevel = (1023 - analogRead(SENSOR_ANALOG_PINS[direction]));
                                      
                                        //Turn off the sensor to conserve battery and minimize corrosion
                                        pinMode(SENSOR_ANALOG_PINS[direction], OUTPUT);
                                        digitalWrite(SENSOR_ANALOG_PINS[direction], LOW);
                                      
                                        //Make direction alternate between 0 and 1 to reverse polarity which reduces corrosion
                                        direction = (direction + 1) % 2;
                                        return moistureLevel;
                                        }
                                      
                                      /**************************************************************************************/
                                      /* Allows to fastly blink the LED.                                                    */
                                      /**************************************************************************************/
                                      void blinkLedFastly(byte loop)
                                        {
                                        byte delayOn = 150;
                                        byte delayOff = 150;
                                        for (int i = 0; i < loop; i++)
                                          {
                                          blinkLed(LED_PIN, delayOn);
                                          delay(delayOff);
                                          }
                                        }
                                      
                                      /**************************************************************************************/
                                      /* Allows to blink a LED.                                                             */
                                      /**************************************************************************************/
                                      void blinkLed(byte pinToBlink, int delayInMs)
                                        {
                                        digitalWrite(pinToBlink,HIGH);
                                        delay(delayInMs);
                                        digitalWrite(pinToBlink,LOW);
                                        }
                                      
                                      /**************************************************************************************/
                                      /* Allows to get the real Vcc (return value in mV).                                   */
                                      /* http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/   */
                                      /**************************************************************************************/
                                      long getVoltage()
                                        {
                                        ADMUX = (0<<REFS1) | (1<<REFS0) | (0<<ADLAR) | (1<<MUX3) | (1<<MUX2) | (1<<MUX1) | (0<<MUX0);
                                        delay(50);  // Let mux settle a little to get a more stable A/D conversion
                                        //Start a conversion  
                                        ADCSRA |= _BV( ADSC );
                                        //Wait for it to complete
                                        while (bit_is_set(ADCSRA, ADSC));
                                      
                                        //Compute and return the value
                                        uint8_t low  = ADCL;                  // must read ADCL first - it then locks ADCH
                                        uint8_t high = ADCH;                  // unlocks both
                                        long result = (high << 8) | low;
                                        result = 1125300L / result;           // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000
                                        return result;                        // Vcc in millivolts
                                        }
                                      

                                      I have just installed Arduino IDE, and are using the latest mysensors library 2.1.1.

                                      Another thing it complains about is:

                                      Invalid library found in C:\...\Arduino\libraries\Moisture_sensor: C:\...\Arduino\libraries\Moisture_sensor```
                                      

                                      which is wierd since I have just copy+pasted it from here:
                                      https://www.openhardware.io/view/123/Office-plant-monitor

                                      aswell as built the sensor from there.

                                      If you can help, I would be very glad, as I just hoped it would be smooth sailing using mysensors. Build, upload and let it work its magic.

                                      Tack på förhand!
                                      Simon

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

                                      @simbic that sketch is made for MySensors 1.x so it won't work with MySensors 2.x.

                                      You either need to convert it (guide: https://forum.mysensors.org/topic/4276/converting-a-sketch-from-1-5-x-to-2-0-x) or use/create one for 2.x, for example https://www.mysensors.org/build/moisture

                                      1 Reply Last reply
                                      0
                                      • Nca78N Nca78

                                        @NeverDie said in Office plant monitor:

                                        Completely unrelated, but I just noticed this:
                                        https://www.aliexpress.com/item/SHT10-SHT11-SHT15-waterproof-sensor-case-temperature-and-humidity-protective-cover-soil-sensor-cover-40mm-15mm/32575966509.html?spm=2114.8153822.cb0001.16.lITM8E&scm=1007.13409.76764.0&amp;pvid=0acc75b7-138d-456f-a5bf-5147c2ea763f&amp;tpp=1
                                        So with that, you could just use a regular humidity sensor inside it to judge soil moisture. Pretty cool, yes? Not sure how big it is, but maybe you could even fit your entire sensor node inside it.

                                        One of the local shops I buy electronic parts from has those. Unfortunately it's too small to house an entire sensor.

                                        NeverDieN Offline
                                        NeverDieN Offline
                                        NeverDie
                                        Hero Member
                                        wrote on last edited by NeverDie
                                        #33

                                        @Nca78

                                        I see now that they have expanded their selection of waterproof sensor shells:

                                        https://www.aliexpress.com/item/2pcs-Waterproof-Temperature-and-humidity-sensor-shell-SHT10-SHT21-SHT15-shT11-sht20-SHT75-sensor-protective-sleeve/32725766858.html?spm=2114.10010108.1000013.6.PVGRb3&traffic_analysisId=recommend_2088_3_81019_new2&scm=1007.13339.81019.0&pvid=b9edd7ff-9069-4c39-be95-b2d3ca8bdf17&tpp=1

                                        https://www.aliexpress.com/item/2pcs-YS1560J-Temperature-and-humidity-sensor-shell-Waterproof-temperature-sensor-protective-cover-SHT10-SHT15-SHT20/32725840346.html?spm=2114.10010108.1000013.25.PVGRb3&traffic_analysisId=recommend_2088_13_81019_new2&scm=1007.13339.81019.0&pvid=b9edd7ff-9069-4c39-be95-b2d3ca8bdf17&tpp=1

                                        https://www.aliexpress.com/item/TM16-115-temperature-and-humidity-sensor-protective-cover-waterproof-SHT10-SHT11-SHT20-SHT21-SHT15-SHT75-sensor/32578099865.html?spm=2114.10010108.1000013.10.gZI6yC&traffic_analysisId=recommend_2088_5_82199_new&scm=1007.13339.82199.0&pvid=3cc09c58-99e7-4a67-834a-3313c87ab573&tpp=1

                                        Perhaps one of those might be big enough? Or, if not, perhaps it could be joined onto a larger waterproof cavity, and just the sensor itself goes into it? Unfortunately for me, the parts appear to be metric. However, maybe a search would yield some kind of metric-to-imperial union, at which point I could then leverage cheap local parts from Home Depot or the like, to fabricate a larger cavity for the rest of a wireless mote.

                                        On the face of it, it seems plausible. It's main virtue is simplicity. Not sure what the failure modes are, or how they might be avoided if there are any. Plainly, you don't want to use components which might rust or otherwise corrode from humidity. Probably my biggest worry would be the possibility of condensate forming on the humidity sensor and skewing results until it evaporated. However, a sensor heater, such as some sensors (e.g. si7021: https://www.aliexpress.com/item/Industrial-High-Precision-Si7021-Humidity-Sensor-with-I2C-Interface-for-Arduino/32524005324.html?spm=a2g0s.13010208.99999999.350.t9NHvJ ) already have, might remedy that if it were to occur.

                                        Has anyone tried either one of the above or anything similar? For instance, perhaps wrapping a mote in Tyvek and sealing the seam with Dupont housewrap tape would work just as well.

                                        Nca78N 1 Reply Last reply
                                        0
                                        • NeverDieN NeverDie

                                          @Nca78

                                          I see now that they have expanded their selection of waterproof sensor shells:

                                          https://www.aliexpress.com/item/2pcs-Waterproof-Temperature-and-humidity-sensor-shell-SHT10-SHT21-SHT15-shT11-sht20-SHT75-sensor-protective-sleeve/32725766858.html?spm=2114.10010108.1000013.6.PVGRb3&traffic_analysisId=recommend_2088_3_81019_new2&scm=1007.13339.81019.0&pvid=b9edd7ff-9069-4c39-be95-b2d3ca8bdf17&tpp=1

                                          https://www.aliexpress.com/item/2pcs-YS1560J-Temperature-and-humidity-sensor-shell-Waterproof-temperature-sensor-protective-cover-SHT10-SHT15-SHT20/32725840346.html?spm=2114.10010108.1000013.25.PVGRb3&traffic_analysisId=recommend_2088_13_81019_new2&scm=1007.13339.81019.0&pvid=b9edd7ff-9069-4c39-be95-b2d3ca8bdf17&tpp=1

                                          https://www.aliexpress.com/item/TM16-115-temperature-and-humidity-sensor-protective-cover-waterproof-SHT10-SHT11-SHT20-SHT21-SHT15-SHT75-sensor/32578099865.html?spm=2114.10010108.1000013.10.gZI6yC&traffic_analysisId=recommend_2088_5_82199_new&scm=1007.13339.82199.0&pvid=3cc09c58-99e7-4a67-834a-3313c87ab573&tpp=1

                                          Perhaps one of those might be big enough? Or, if not, perhaps it could be joined onto a larger waterproof cavity, and just the sensor itself goes into it? Unfortunately for me, the parts appear to be metric. However, maybe a search would yield some kind of metric-to-imperial union, at which point I could then leverage cheap local parts from Home Depot or the like, to fabricate a larger cavity for the rest of a wireless mote.

                                          On the face of it, it seems plausible. It's main virtue is simplicity. Not sure what the failure modes are, or how they might be avoided if there are any. Plainly, you don't want to use components which might rust or otherwise corrode from humidity. Probably my biggest worry would be the possibility of condensate forming on the humidity sensor and skewing results until it evaporated. However, a sensor heater, such as some sensors (e.g. si7021: https://www.aliexpress.com/item/Industrial-High-Precision-Si7021-Humidity-Sensor-with-I2C-Interface-for-Arduino/32524005324.html?spm=a2g0s.13010208.99999999.350.t9NHvJ ) already have, might remedy that if it were to occur.

                                          Has anyone tried either one of the above or anything similar? For instance, perhaps wrapping a mote in Tyvek and sealing the seam with Dupont housewrap tape would work just as well.

                                          Nca78N Offline
                                          Nca78N Offline
                                          Nca78
                                          Hardware Contributor
                                          wrote on last edited by
                                          #34

                                          @NeverDie they are all very small inside (5-6mm) so are only suitable for very thin PCB with SMD version of the sensor, even the breakout of si7021 that you linked is too big.

                                          NeverDieN 2 Replies Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          21

                                          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