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. 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel

💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel

Scheduled Pinned Locked Moved OpenHardware.io
117 Posts 18 Posters 23.9k Views 17 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.
  • Nca78N Nca78

    @NeverDie said in 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel:

    I guess it's the land of compromise. By default I'm going with the BMA220, if only because the board is small and the low power mode current drain is 10ua

    At this price buy the small LIS3DH breakout, you'll enjoy the included tilt calculation and a 2uA consumption, 10uA for button cell it too high
    https://www.aliexpress.com/item/LIS3DH-Module-Acceleration-Sensor-Module-Evaluation-Board-Development-Board/32285377730.html

    Else go for that one it's cheaper and has the nrf51822 onboard
    https://www.aliexpress.com/item/Nrf51822-LIS3DH-Bluetooth-Module-CJMCU-8223-Bluetooth-acceleration-module/32821873481.html

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

    @Nca78 said in 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel:

    https://www.aliexpress.com/item/LIS3DH-Module-Acceleration-Sensor-Module-Evaluation-Board-Development-Board/32285377730.html

    Those are both good suggestions. Thinking now though of minimal effort, I may try some cheap ball sensors first:
    https://www.aliexpress.com/item/200PCS-LOT-Sensitive-SW-520D-Ball-Switch-Angle-Switch-SW-520D-Tilt-Switch/1967714977.html?ws_ab_test=searchweb0_0,searchweb201602_4_10152_10065_10151_10344_10068_10130_10345_10324_10342_10547_10325_10343_10546_10340_10341_10548_10545_10541_10562_10084_10083_10307_10178_10060_10155_10154_10539_10312_10059_10313_10314_10534_10533_100031_10103_10073_10594_10557_10558_10596_10595_10142_10107,searchweb201603_25,ppcSwitch_4&btsid=110cafb1-1528-4ca9-bf01-4df9ccf33b93&algo_expid=8506dd81-1d5d-4627-9ae5-f3df06594fbb-9&algo_pvid=8506dd81-1d5d-4627-9ae5-f3df06594fbb&rmStoreLevelAB=0
    I could stick it in one of the leak detection pinouts of my existing board, so it should be easy. :)

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

      Actually, this contraption looks even more promising than the ball switch: https://www.aliexpress.com/item/Vibration-Switch-Shock-Vibration-Sensor-Shaked-Switch-Shaked-Stick-Skates/32686838884.html?ws_ab_test=searchweb0_0,searchweb201602_4_10152_10065_10151_10344_10068_10130_10345_10324_10342_10547_10325_10343_10546_10340_10341_10548_10545_10541_10562_10084_10083_10307_10178_10060_10155_10154_10539_10312_10059_10313_10314_10534_10533_100031_10103_10073_10594_10557_10558_10596_10595_10142_10107,searchweb201603_25,ppcSwitch_4&btsid=8ee4bf46-c3de-4f6a-b23f-32b800aefc7a&algo_expid=d469a8ff-4dce-4442-8590-0e2fdefb1f4b-14&algo_pvid=d469a8ff-4dce-4442-8590-0e2fdefb1f4b&rmStoreLevelAB=0

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

        I uploaded new, upgraded demo code. It's tested and works. :)

        SUMMARY: The demo sketch runs on MultiSensor Version 7 board with an I2C Si7021 module to transmit temperature, humidity, and battery voltage to a MySensors gateway using MySensors protocols.

        1 Reply Last reply
        0
        • NeverDieN NeverDie

          Actually, this contraption looks even more promising than the ball switch: https://www.aliexpress.com/item/Vibration-Switch-Shock-Vibration-Sensor-Shaked-Switch-Shaked-Stick-Skates/32686838884.html?ws_ab_test=searchweb0_0,searchweb201602_4_10152_10065_10151_10344_10068_10130_10345_10324_10342_10547_10325_10343_10546_10340_10341_10548_10545_10541_10562_10084_10083_10307_10178_10060_10155_10154_10539_10312_10059_10313_10314_10534_10533_100031_10103_10073_10594_10557_10558_10596_10595_10142_10107,searchweb201603_25,ppcSwitch_4&btsid=8ee4bf46-c3de-4f6a-b23f-32b800aefc7a&algo_expid=d469a8ff-4dce-4442-8590-0e2fdefb1f4b-14&algo_pvid=d469a8ff-4dce-4442-8590-0e2fdefb1f4b&rmStoreLevelAB=0

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

          @NeverDie have you seen the comments ? :D

          Damn thing works only for the impact of accelerations> 50g. and only in one direction. In life it is not applicable. Shit, shorter.
          
          NeverDieN 1 Reply Last reply
          0
          • Nca78N Nca78

            @NeverDie have you seen the comments ? :D

            Damn thing works only for the impact of accelerations> 50g. and only in one direction. In life it is not applicable. Shit, shorter.
            
            NeverDieN Offline
            NeverDieN Offline
            NeverDie
            Hero Member
            wrote on last edited by
            #67

            @Nca78 No, I hadn't. Now I'm wishing I had. Good catch! I'll try cancelling my order....

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

              Thinking about it more now, I think the ball switch will definitely work if I position it with a vertical orientation, because they invariably fully invert the trash/recycling bin in order to empty it.

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

                Here's a node with the Hall sensor installed:
                0_1511120456766_hall_installed.jpg
                I'll probably be testing it later today.

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

                  Tested. The Hall sensor works. Basically, if you run this code:

                  #define HALL_PIN 9
                    hwPinMode(HALL_PIN, INPUT);
                    while (true) {
                      if (digitalRead(HALL_PIN)) {
                        digitalWrite(LED_BUILTIN,LOW);
                      }
                      else {
                        digitalWrite(LED_BUILTIN,HIGH);
                      }
                    }
                  

                  then the LED will turn-on when you bring a magnet near the sensor, and the LED will turn-off when you move the magnet away. Simple. :)

                  1 Reply Last reply
                  1
                  • G Offline
                    G Offline
                    ghiglie
                    wrote on last edited by
                    #71

                    Great!
                    A bit OT: how are you programming the nRF?

                    atmega328p serial killer
                    HomeAssistant / gateway: ESP8266 & NRF24L01+ gateway

                    NeverDieN 1 Reply Last reply
                    0
                    • G ghiglie

                      Great!
                      A bit OT: how are you programming the nRF?

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

                      @ghiglie I plug it into the nRF52 DK using an IDC cable to its 10-pin connector. Then just select J-Link as the programmer and upload my sketch over the USB port connection to the nRF52 DK from within the Arduino IDE. Easy!

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        DerManni
                        wrote on last edited by DerManni
                        #73

                        @NeverDie
                        Did you or anybody else could write to the NRF5xxx via the Arduino IDE and a ST-Link V2 programmer?
                        I find the DK for approx. 32€ a little bit to expensive for just testing.

                        Edit: Maybe this one could work:
                        http://s.aliexpress.com/FRzU3miM

                        Thanks.

                        NeverDieN 1 Reply Last reply
                        0
                        • D DerManni

                          @NeverDie
                          Did you or anybody else could write to the NRF5xxx via the Arduino IDE and a ST-Link V2 programmer?
                          I find the DK for approx. 32€ a little bit to expensive for just testing.

                          Edit: Maybe this one could work:
                          http://s.aliexpress.com/FRzU3miM

                          Thanks.

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

                          @DerManni said in 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel:

                          ST-Link V2 programmer

                          Not me. As I said, I'm using the nRF52 DK as my programmer of choice. I think others may be using the ST-Link V2. Not 100% sure though.

                          rmtuckerR 1 Reply Last reply
                          0
                          • NeverDieN NeverDie

                            @DerManni said in 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel:

                            ST-Link V2 programmer

                            Not me. As I said, I'm using the nRF52 DK as my programmer of choice. I think others may be using the ST-Link V2. Not 100% sure though.

                            rmtuckerR Offline
                            rmtuckerR Offline
                            rmtucker
                            wrote on last edited by
                            #75

                            @NeverDie
                            Yes i am using the STLink v2 without any problems.

                            D 1 Reply Last reply
                            1
                            • rmtuckerR rmtucker

                              @NeverDie
                              Yes i am using the STLink v2 without any problems.

                              D Offline
                              D Offline
                              DerManni
                              wrote on last edited by
                              #76

                              @rmtucker Could you please explain in weich was you connect the STLINK to the NRF Module to usw the Arduino IDE. Thanks

                              rmtuckerR 1 Reply Last reply
                              0
                              • D DerManni

                                @rmtucker Could you please explain in weich was you connect the STLINK to the NRF Module to usw the Arduino IDE. Thanks

                                rmtuckerR Offline
                                rmtuckerR Offline
                                rmtucker
                                wrote on last edited by
                                #77

                                @DerManni

                                STLink<----------------->NRF

                                SWCLK<--------------->SWD
                                SWDIO<---------------->SWIO
                                3.3v<--------------------->3.3v
                                GND<-------------------->GND

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

                                  I received the version 9 PCB's today. Here's one assembled as a minimalist water leak sensor:
                                  0_1511408166526_v9_1.jpg
                                  0_1511408180982_v9_2.jpg

                                  There's now enough physical clearance between the male header leak detection pins and the CR2032 battery holder that I feel comfortable declaring the hardware as finished. :)

                                  1 Reply Last reply
                                  1
                                  • NeverDieN NeverDie

                                    @Nca78 said in 💬 CR2032 Small Wireless Temperature-Humidity Sensor:

                                    Also, what about moving the led to the center next to its resistor, it would leave enough space to squeeze in a SOT 23 ultra low power hall sensor and it's 100nF capacitor.

                                    Yes, with the Version 4 design serving as the basis, I think there will be enough room to do this.

                                    I'd also like to add a light sensor of some kind: something that will trigger an interrupt when, say, a refrigerator light goes on or off (for the case where the temperature node is in a refrigertor or freezer). Do you have any particular suggestions for that? A simple photoresistor, or would there be something better (lower current)?
                                    alt text

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

                                    @NeverDie said in 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel:

                                    @Nca78 said in 💬 CR2032 Small Wireless Temperature-Humidity Sensor:

                                    Also, what about moving the led to the center next to its resistor, it would leave enough space to squeeze in a SOT 23 ultra low power hall sensor and it's 100nF capacitor.

                                    Yes, with the Version 4 design serving as the basis, I think there will be enough room to do this.

                                    I'd also like to add a light sensor of some kind: something that will trigger an interrupt when, say, a refrigerator light goes on or off (for the case where the temperature node is in a refrigertor or freezer). Do you have any particular suggestions for that? A simple photoresistor, or would there be something better (lower current)?
                                    alt text

                                    A photoresistor turns out to work just fine for binary detection of whether a light is on or off:
                                    0_1512275545150_photo_resistor.jpg
                                    I put it in one of the header pin hole pairs otherwise reserved for the leak detection pins and then ran the leak detection sketch. When a light goes on, the resistance of the photoresistor goes from about 20 megaohms in the dark down to well under 100K ohms (exactly amount depends on the light intensity) in the light. So, under light stimulus the photoresistor behaves essentially the same as leak detection pins which have come into contact with water. :)

                                    The one I used is this: https://www.digikey.com/product-detail/en/luna-optoelectronics/NSL-19M51/NSL-19M51-ND/5039794 Perhaps a cheaper photoresistor would have worked just as well, but for proof of concept prototyping I wanted to try this one, which had desirable specs.

                                    NeverDieN 1 Reply Last reply
                                    1
                                    • NeverDieN NeverDie

                                      @NeverDie said in 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel:

                                      @Nca78 said in 💬 CR2032 Small Wireless Temperature-Humidity Sensor:

                                      Also, what about moving the led to the center next to its resistor, it would leave enough space to squeeze in a SOT 23 ultra low power hall sensor and it's 100nF capacitor.

                                      Yes, with the Version 4 design serving as the basis, I think there will be enough room to do this.

                                      I'd also like to add a light sensor of some kind: something that will trigger an interrupt when, say, a refrigerator light goes on or off (for the case where the temperature node is in a refrigertor or freezer). Do you have any particular suggestions for that? A simple photoresistor, or would there be something better (lower current)?
                                      alt text

                                      A photoresistor turns out to work just fine for binary detection of whether a light is on or off:
                                      0_1512275545150_photo_resistor.jpg
                                      I put it in one of the header pin hole pairs otherwise reserved for the leak detection pins and then ran the leak detection sketch. When a light goes on, the resistance of the photoresistor goes from about 20 megaohms in the dark down to well under 100K ohms (exactly amount depends on the light intensity) in the light. So, under light stimulus the photoresistor behaves essentially the same as leak detection pins which have come into contact with water. :)

                                      The one I used is this: https://www.digikey.com/product-detail/en/luna-optoelectronics/NSL-19M51/NSL-19M51-ND/5039794 Perhaps a cheaper photoresistor would have worked just as well, but for proof of concept prototyping I wanted to try this one, which had desirable specs.

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

                                      @NeverDie It appears that photoresistors of type 5539 and/or 5549 may work as well: https://www.aliexpress.com/item/Free-shipping-20pcs-5549-light-dependent-resistor-photoresistor-resistor-5mm-photosensitive-resistance-35513/32346773727.html?ws_ab_test=searchweb0_0,searchweb201602_4_10152_10065_5000015_10151_10344_10068_10130_10345_10324_10342_10547_10325_10343_10546_10340_10341_10548_10545_5130015_10541_10084_10083_10307_5690015_10539_5080015_10312_10059_10313_10314_10534_100031_10604_10603_10103_10605_5060015_10596_10142_10107,searchweb201603_12,ppcSwitch_4&algo_expid=14488cca-cb1a-4d45-b8d2-d8b444735f2a-16&algo_pvid=14488cca-cb1a-4d45-b8d2-d8b444735f2a&rmStoreLevelAB=2

                                      YveauxY 1 Reply Last reply
                                      0
                                      • Nca78N Offline
                                        Nca78N Offline
                                        Nca78
                                        Hardware Contributor
                                        wrote on last edited by
                                        #81

                                        @NeverDie and what is your approximative power consumption with the photoresistor ?

                                        NeverDieN 1 Reply Last reply
                                        0
                                        • NeverDieN NeverDie

                                          @NeverDie It appears that photoresistors of type 5539 and/or 5549 may work as well: https://www.aliexpress.com/item/Free-shipping-20pcs-5549-light-dependent-resistor-photoresistor-resistor-5mm-photosensitive-resistance-35513/32346773727.html?ws_ab_test=searchweb0_0,searchweb201602_4_10152_10065_5000015_10151_10344_10068_10130_10345_10324_10342_10547_10325_10343_10546_10340_10341_10548_10545_5130015_10541_10084_10083_10307_5690015_10539_5080015_10312_10059_10313_10314_10534_100031_10604_10603_10103_10605_5060015_10596_10142_10107,searchweb201603_12,ppcSwitch_4&algo_expid=14488cca-cb1a-4d45-b8d2-d8b444735f2a-16&algo_pvid=14488cca-cb1a-4d45-b8d2-d8b444735f2a&rmStoreLevelAB=2

                                          YveauxY Offline
                                          YveauxY Offline
                                          Yveaux
                                          Mod
                                          wrote on last edited by
                                          #82

                                          @NeverDie When using a voltage-divider setup with the LDR you'll have better control over the tripping point and consume less standby power:

                                          0_1512289467502_upload-3f3a91f9-2d14-4ceb-bcae-120d4f9022ed

                                          Make sure to select an LDR with high resistance, like the 5549 in my example.

                                          http://yveaux.blogspot.nl

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


                                          12

                                          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