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

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Office plant monitoring

Office plant monitoring

Scheduled Pinned Locked Moved My Project
223 Posts 39 Posters 131.7k Views 42 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.
  • Pierre PP Offline
    Pierre PP Offline
    Pierre P
    wrote on last edited by
    #51

    My node doesn't work anymore. Even with new set of accus. I will check again when I'll solder it.

    No quote, no forum notification (else, the mail box ring every minutes !). Thanks, and have a very good MySensors day !

    1 Reply Last reply
    0
    • mfalkviddM mfalkvidd

      I work as development team lead at a software company. We do server and network monitoring. Yesterday we hosted a customer event, and I presented my houseplant monitoring project based on MySensors and Domoticz. The presentation was a hit, and it has been decided that we'll use MySensors to monitor all plants at the office.

      There is not that much to tell from a technical perspective. I hooked up everything according to the MySensor build page and created a simple sketch.

      Thanks to everyone from the MySensors community for a great library, clear instructions and great suggestions for projects. And thanks for making me look like a hero :-D Let's continue conquering the world.

      iotcrazyI Offline
      iotcrazyI Offline
      iotcrazy
      wrote on last edited by
      #52

      @mfalkvidd Great project. Had few questions...Is it OK to provide 6V to Arduio Mini ? Can you show /explain how you have provided power supply to Mini and Moisture Controller ? In the set up you have , how long does the battery last ?

      Thanks

      mfalkviddM 1 Reply Last reply
      0
      • iotcrazyI iotcrazy

        @mfalkvidd Great project. Had few questions...Is it OK to provide 6V to Arduio Mini ? Can you show /explain how you have provided power supply to Mini and Moisture Controller ? In the set up you have , how long does the battery last ?

        Thanks

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

        @iotcrazy

        6V is OK if you connect power on the "raw" pin. 6V is NOT OK if you connect power to the Vcc pin.

        I use 2xAA batteries. - on the battery holder is connected to GND on the Arduino and + on the battery holder to Vcc. Power led and voltage regulator have been removed.

        My sensors report every two hours and I expect to get 1-2 years battery life.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Jan Gatzke
          wrote on last edited by
          #54

          Just built this sensor and it is working great. However I am seeing different results with every run. It seems as if the value is always higher with one polarity than with the other one. Is this normal?

          0_1456353874082_soil.PNG

          mfalkviddM 2 Replies Last reply
          0
          • J Jan Gatzke

            Just built this sensor and it is working great. However I am seeing different results with every run. It seems as if the value is always higher with one polarity than with the other one. Is this normal?

            0_1456353874082_soil.PNG

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

            @Jan-Gatzke yes I'm seeing that as well. The built-in pullup resistors are not 100% accurate, which yields slightly different result when polarity is reversed.

            The easiest way is probably to let the Arduino report a rolling average of the last 2 readings instead of reporting the latest reading.

            0_1456394895794_humidity.png
            0_1456405610141_chart.png

            1 Reply Last reply
            0
            • iotcrazyI Offline
              iotcrazyI Offline
              iotcrazy
              wrote on last edited by
              #56

              @mfalkvidd I was looking to your sketch and could not quite understand this piece of line

              result = 1125300L / result; // Calculate Vcc (in mV); 1125300 = 1.110231000

              How will this above line change if I use 4 AA battery ?.

              Thanks in advance

              1 Reply Last reply
              1
              • mfalkviddM Offline
                mfalkviddM Offline
                mfalkvidd
                Mod
                wrote on last edited by mfalkvidd
                #57

                If you use 4xAA and wire power to Vcc you will break the nrf and the mcu. They are not rated for that high voltage.

                If you wire power to Raw you can not use readVcc, you'll have to use a voltage divider to one of the pins.

                Is there a reason you want to use 4xAA?

                iotcrazyI 1 Reply Last reply
                1
                • mfalkviddM mfalkvidd

                  If you use 4xAA and wire power to Vcc you will break the nrf and the mcu. They are not rated for that high voltage.

                  If you wire power to Raw you can not use readVcc, you'll have to use a voltage divider to one of the pins.

                  Is there a reason you want to use 4xAA?

                  iotcrazyI Offline
                  iotcrazyI Offline
                  iotcrazy
                  wrote on last edited by
                  #58

                  @mfalkvidd Yes I am connecting to RAW input. My 4 battery holder for some reason does not work with 2 or 3 batteries so connecting 6V to RAW.

                  "...you'll have to use a voltage divider to one of the pins..." Can you elaborate this part ? Can you share a link which wherein Arduino Pro Mini is powered through RAW input and battery percentage is calculated. I very new to hardware but loving the mysensors projects. Kindly bear with my stupid questions.

                  Appreciate your patience..

                  iotcrazyI 1 Reply Last reply
                  0
                  • iotcrazyI iotcrazy

                    @mfalkvidd Yes I am connecting to RAW input. My 4 battery holder for some reason does not work with 2 or 3 batteries so connecting 6V to RAW.

                    "...you'll have to use a voltage divider to one of the pins..." Can you elaborate this part ? Can you share a link which wherein Arduino Pro Mini is powered through RAW input and battery percentage is calculated. I very new to hardware but loving the mysensors projects. Kindly bear with my stupid questions.

                    Appreciate your patience..

                    iotcrazyI Offline
                    iotcrazyI Offline
                    iotcrazy
                    wrote on last edited by
                    #59

                    @iotcrazy I understood the voltage divider part by googling. So this is the only option to find the battery percentage right ? We cannot determine by connecting directly to Raw when input if more than 3.3 v.

                    1 Reply Last reply
                    1
                    • mfalkviddM Offline
                      mfalkviddM Offline
                      mfalkvidd
                      Mod
                      wrote on last edited by
                      #60

                      That's correct. The Arduino cannot measure voltages above it's Vcc level.

                      Great that you found information on voltage dividers.

                      Powering on Raw will keep the voltage regulator active all the time, so you might get worse batttery life than when using 2xAA on Vcc. Therefore I suggest you order a 2xAA battery holder for later use. In the meanwhile, you can make your 4xAA holder work by putting two wires instead of batteries in the unused slots.

                      If you still want to use 4 batteries, http://www.mysensors.org/build/battery#measuring-and-reporting-battery-level has more details and code to use for battery measurement.

                      1 Reply Last reply
                      1
                      • J Jan Gatzke

                        Just built this sensor and it is working great. However I am seeing different results with every run. It seems as if the value is always higher with one polarity than with the other one. Is this normal?

                        0_1456353874082_soil.PNG

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

                        @Jan-Gatzke I have updated my skech on codebender to report rolling average. I have not tested it yet though.
                        The change is available at https://github.com/mfalkvidd/arduino-plantmoisture/commit/5e98c5e625075d62ae27956ab8dc3ea9dec4a29e

                        J 1 Reply Last reply
                        1
                        • mfalkviddM Offline
                          mfalkviddM Offline
                          mfalkvidd
                          Mod
                          wrote on last edited by
                          #62

                          One more change https://github.com/mfalkvidd/arduino-plantmoisture/commit/299a4b273aee49b27a4cb3363574afec83ac2cd5

                          1 Reply Last reply
                          0
                          • mfalkviddM mfalkvidd

                            @Jan-Gatzke I have updated my skech on codebender to report rolling average. I have not tested it yet though.
                            The change is available at https://github.com/mfalkvidd/arduino-plantmoisture/commit/5e98c5e625075d62ae27956ab8dc3ea9dec4a29e

                            J Offline
                            J Offline
                            Jan Gatzke
                            wrote on last edited by
                            #63

                            @mfalkvidd At the moment I am testing a modified version of the sketch which always does two readings. I don't think this will have a big impact on the battery life because most power is consumend by the nrf and not by the sensor. Or am I wrong? The pullups are rated at 10k Ohm. The sensors resistance will be about the same in average. So we talk about 20k at 3V which is 0.15 mA. The nrf uses abot 15 mA when sending.

                            1 Reply Last reply
                            0
                            • mfalkviddM Offline
                              mfalkviddM Offline
                              mfalkvidd
                              Mod
                              wrote on last edited by
                              #64

                              Yes, but the nrf needs to be active approximately 1ms while the moisture reading needs about a second to be stable. So the consumption while reading is much larger than the consumption while sending.

                              1 Reply Last reply
                              0
                              • mrc-coreM Offline
                                mrc-coreM Offline
                                mrc-core
                                wrote on last edited by
                                #65

                                Hi.

                                I have been trying to connect two sensors to the same arduino nano using this code and i have add sensor 1 pin to A0 and GND, and sensor 2 pin A1 and GND.
                                But i only get the reads from sensor 1 sensor 2 doesn't appear...
                                Can anyone help me with this on how to get more than one moisture sensor working.

                                Thanks.

                                mfalkviddM 1 Reply Last reply
                                0
                                • mrc-coreM mrc-core

                                  Hi.

                                  I have been trying to connect two sensors to the same arduino nano using this code and i have add sensor 1 pin to A0 and GND, and sensor 2 pin A1 and GND.
                                  But i only get the reads from sensor 1 sensor 2 doesn't appear...
                                  Can anyone help me with this on how to get more than one moisture sensor working.

                                  Thanks.

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

                                  @mrc-core there have been quite a few revisions of the sketch. The latest version (which can be found at github) only support one sensor, which is connected to A0 and A1 in the default configuration. Both pins are required to enable alternating the direction of the current when measuring, to try to minimize corrosion.

                                  Adding support for up to three sensors is technically possible (using A0-A5), but would make the code harder to read and since I have no use for multiple sensor I haven't spent the time required to program and test a sketch with multiple sensors.

                                  mrc-coreM 1 Reply Last reply
                                  0
                                  • mfalkviddM Offline
                                    mfalkviddM Offline
                                    mfalkvidd
                                    Mod
                                    wrote on last edited by mfalkvidd
                                    #67

                                    An update on battery life: The sensor in my bonsai tree has been reporting every 11,5 minutes since 2015-11-07, so over the last ~four months it has done 24,504 measurements. The battery level has gone from 3.187V to 3.142V, which means a drop of 0.01125V per month. Assuming I let it go down to 2.34V (limit for 8MHz according to the datasheet) and that the voltage drop is linear, I should get (3.187-2.34)/0.01125 = 75 months = ~6 years. There are several error sources in this calculation, but it looks like battery life will be quite good, even though the sensor reports much more often than necessary.

                                    0_1457905111939_chart.png

                                    iotcrazyI 1 Reply Last reply
                                    1
                                    • mfalkviddM mfalkvidd

                                      @mrc-core there have been quite a few revisions of the sketch. The latest version (which can be found at github) only support one sensor, which is connected to A0 and A1 in the default configuration. Both pins are required to enable alternating the direction of the current when measuring, to try to minimize corrosion.

                                      Adding support for up to three sensors is technically possible (using A0-A5), but would make the code harder to read and since I have no use for multiple sensor I haven't spent the time required to program and test a sketch with multiple sensors.

                                      mrc-coreM Offline
                                      mrc-coreM Offline
                                      mrc-core
                                      wrote on last edited by
                                      #68

                                      @mfalkvidd Thanks for the replay.
                                      Will use only one sensor per arduino.

                                      Once again thanks

                                      1 Reply Last reply
                                      0
                                      • mfalkviddM mfalkvidd

                                        An update on battery life: The sensor in my bonsai tree has been reporting every 11,5 minutes since 2015-11-07, so over the last ~four months it has done 24,504 measurements. The battery level has gone from 3.187V to 3.142V, which means a drop of 0.01125V per month. Assuming I let it go down to 2.34V (limit for 8MHz according to the datasheet) and that the voltage drop is linear, I should get (3.187-2.34)/0.01125 = 75 months = ~6 years. There are several error sources in this calculation, but it looks like battery life will be quite good, even though the sensor reports much more often than necessary.

                                        0_1457905111939_chart.png

                                        iotcrazyI Offline
                                        iotcrazyI Offline
                                        iotcrazy
                                        wrote on last edited by
                                        #69

                                        @mfalkvidd since you are using 2 AA battery(3V max) with a sensor , how are you powering the sensors ? What sensors are you using ?.Most of the sensors need 5V right ? how are you providing the required voltage for sensor ?. If possible can you share a circuit diagram or close up picture for your sensor node with connection to NRF , Sensor and battery ?

                                        Appreciate it .

                                        mfalkviddM 1 Reply Last reply
                                        0
                                        • iotcrazyI iotcrazy

                                          @mfalkvidd since you are using 2 AA battery(3V max) with a sensor , how are you powering the sensors ? What sensors are you using ?.Most of the sensors need 5V right ? how are you providing the required voltage for sensor ?. If possible can you share a circuit diagram or close up picture for your sensor node with connection to NRF , Sensor and battery ?

                                          Appreciate it .

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

                                          @iotcrazy the fork is entirely passive so no requirements on voltage. See earlier posts in this thread for wiring information.

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


                                          13

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 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