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. General Discussion
  3. Garage door status sensors ideas

Garage door status sensors ideas

Scheduled Pinned Locked Moved General Discussion
doorgaragesensor
27 Posts 11 Posters 5.2k Views 8 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.
  • gohanG gohan

    I still think the reed switch on the side of the door is the best solution, as you can have a battery powered node that can wake up only when sensor is triggered

    zboblamontZ Offline
    zboblamontZ Offline
    zboblamont
    wrote on last edited by
    #17

    @gohan Tend to second this on the KISS principle, but I recall a comment that the door would sometimes overshoot the optimal contact point (possibly door flexing?) on the 'closed' position...

    Perhaps it might be worth re-examining WHERE the switching contact is located to minimise the possibility of 'passing', or change from reed to microswitch with a finger actuator to give a range of detection of say 10mm.
    A c/o contact micro would also give confirmation the door was mid transit, the node could have a rundown timer to alarm out if the closed or open signal not received as expected?

    1 Reply Last reply
    0
    • gohanG Offline
      gohanG Offline
      gohan
      Mod
      wrote on last edited by
      #18

      Of course you need to find the right spot for the magnet to trigger the reed switch

      1 Reply Last reply
      0
      • I Offline
        I Offline
        iahim67
        wrote on last edited by
        #19

        Hi, maybe you can use the reed switch in a different way, I mean do not use it like contact closed or contact opened as this would cause you overshoot issues.
        When the magnet attached to the door slides in front of the reed switch, then you'll have the reed switch closed for a short time at least, most likely, you can test that. You can use the reed just like you would use a motion detector.
        I mean connect the reed to pin 3 - interrupt - and put this at the end of your code, so when an interrupt occurs you will know the door has moved (and you can keep track of movement of course so you would know if the door is open or close) ... just an idea ... :

        sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);
        dbemowskD 1 Reply Last reply
        1
        • rozpruwaczR Offline
          rozpruwaczR Offline
          rozpruwacz
          wrote on last edited by
          #20

          another option is to place couple of reed switches in parallel in several places. Only one is needed to close the circuit and trigger the interrupt.

          1 Reply Last reply
          0
          • I iahim67

            Hi, maybe you can use the reed switch in a different way, I mean do not use it like contact closed or contact opened as this would cause you overshoot issues.
            When the magnet attached to the door slides in front of the reed switch, then you'll have the reed switch closed for a short time at least, most likely, you can test that. You can use the reed just like you would use a motion detector.
            I mean connect the reed to pin 3 - interrupt - and put this at the end of your code, so when an interrupt occurs you will know the door has moved (and you can keep track of movement of course so you would know if the door is open or close) ... just an idea ... :

            sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);
            dbemowskD Offline
            dbemowskD Offline
            dbemowsk
            wrote on last edited by
            #21

            @iahim67 That is a creative option.

            Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
            Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

            1 Reply Last reply
            0
            • Tim Nagy183T Offline
              Tim Nagy183T Offline
              Tim Nagy183
              wrote on last edited by
              #22

              Couldn't you just use a proximity sensor mounted to the ceiling. That way you can see if the door is up, or if something is parked there, or if the door is down with nothing parked there - all based on the measured distance.

              1 Reply Last reply
              0
              • gohanG Offline
                gohanG Offline
                gohan
                Mod
                wrote on last edited by
                #23

                Remember that if you have a battery powered node, try to find normally closed reed switches as they will not drain battery as the magnet will keep the reed switch open.

                1 Reply Last reply
                0
                • I Offline
                  I Offline
                  iahim67
                  wrote on last edited by
                  #24

                  @dbemowsk Thank you :smile:
                  To be a bit more creative I think, @McQueen you can use the interrupt as RISING at the end of your code like this:

                  sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), RISING, SLEEP_TIME);
                  

                  The goal is to set a flag in your main loop every time you get an interrupt and then put this flag in the EEPROM, use the Relay Actuator sketch example again to see how to do that:

                          // Store state in eeprom
                          saveState(message.sensor, message.getBool());
                  

                  And read the flag from the EEPROM like this:

                          // Set relay to last known state (using eeprom storage)
                          digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF);
                  

                  This way you'll know the status of your door. This only works however is during the magnet slide you get just one interrupt trigger, that you can check for yourself, use Arduino itself to print out how many times you get interrupted while closing the door or opening the door. Hope it helps ...

                  gohanG 1 Reply Last reply
                  0
                  • I Offline
                    I Offline
                    iahim67
                    wrote on last edited by
                    #25

                    If you get interrupted by the magnet several times during closing or opening the door then you can eventually debounce ...

                    1 Reply Last reply
                    0
                    • I iahim67

                      @dbemowsk Thank you :smile:
                      To be a bit more creative I think, @McQueen you can use the interrupt as RISING at the end of your code like this:

                      sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), RISING, SLEEP_TIME);
                      

                      The goal is to set a flag in your main loop every time you get an interrupt and then put this flag in the EEPROM, use the Relay Actuator sketch example again to see how to do that:

                              // Store state in eeprom
                              saveState(message.sensor, message.getBool());
                      

                      And read the flag from the EEPROM like this:

                              // Set relay to last known state (using eeprom storage)
                              digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF);
                      

                      This way you'll know the status of your door. This only works however is during the magnet slide you get just one interrupt trigger, that you can check for yourself, use Arduino itself to print out how many times you get interrupted while closing the door or opening the door. Hope it helps ...

                      gohanG Offline
                      gohanG Offline
                      gohan
                      Mod
                      wrote on last edited by
                      #26

                      @iahim67 that's a little overkill, just do debounce and you should be fine. Even if you get multiple interrupts, what would it be the problem? It will just report door open or closed a few times.

                      1 Reply Last reply
                      0
                      • I Offline
                        I Offline
                        iahim67
                        wrote on last edited by
                        #27

                        That's right @gohan , if you place the "door closed"reed near the floor then only first interrupt should matter, first interrupt should tell you the door is closed. Same for a second reed placed high - the "door open" reed, that would tell you the door is open when interrupted the first time. @McQueen, could be close to you needs ...

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


                        33

                        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