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. Hardware
  3. Reed Switch normally open or normally closed

Reed Switch normally open or normally closed

Scheduled Pinned Locked Moved Hardware
hardware3d print
20 Posts 7 Posters 8.1k Views 6 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.
  • T Offline
    T Offline
    therik
    wrote on last edited by
    #1

    Hi everyone,

    I'd like to show you a recently completed project. A reed switch-based sensor that can be implemented either normally open to normally closed. (I like normally open (with sense magnet) for low/no current draw, but normally closed (with sense magnet) can also be realized).

    If one does a bit of research on reed switches, it can be found that the switches can utilize two magnets for making a normally open switch (without sense magnet) a "normally closed" switch (without sense magnet).

    The idea is to drill a 7/16" hole in the jamb of a door and imbed the reed switch, then imbed a magnet into the door to complete the install. One wouldn't even know it is there; I would have a node close by to connect directly to the switch in the wall, (for me, new construction will allow this). Have a look, let me know your thoughts.

    I have designed a PCB and case (3D printed) for the switch. The PCB is straight forward, I'll leave that to anyone who'll want to replicate it, but the case took a few revs. Here is the prototype.

    image4.JPG
    Figure 1. Side view of the switch PCB. The switch is the glass tube; on the other side, I super-glued a magnet to the PCB to change the switch from normally open to "closed" (conducting). In this configuration the switch is closed (conducting), and when another magnet (sense magnet) is brought near (must be opposite polarity) the switch changes to open.

    image3.JPG
    Figure 2. Reed switch PCB and case.

    image2.JPG
    Figure 3. Reed switch fitting into case.

    image1.JPG
    Figure 4. Reed switch inside case. ready to be inserted into drilled hole in door jamb. The wires would travel to a node through a smaller hole at the end of the case. (if that makes sense). The sense magnet will be brought close to the 'top' of the cylinder when the door is closed making the switch 'open'. In this configuration, I believe a burglar would have a very hard time cutting wires that are inside a wall, so, no worries and I value normally low power (no current) operation.

    Here is the SketchUp file used to create the 3D print...you should install the "export to .STL" extension and then print away. The PCB is 1.6 mm thick. ReedSwitch_WorkingSet.skp

    Oh, and for those in the USA, I get the magnets from K&J Magnetics

    1 Reply Last reply
    2
    • gaduG Offline
      gaduG Offline
      gadu
      wrote on last edited by
      #2

      Really nice! But can't you buy reed-switches for doors already?
      Like these (sorry for the swedish links)?

      http://www.clasohlson.com/se/Magnetisk-larmkontakt/Pr325329000

      http://www.kjell.com/sortiment/hus-halsa-fritid/larm-sakerhet-overvakning/larm/detektorer-sensorer-brytare/magnetkontakt-nc-dorr-karm-p50502

      1 Reply Last reply
      0
      • T Offline
        T Offline
        therik
        wrote on last edited by
        #3

        @gadu sure! But these are 1/10 the cost (good for when one needs ~30-40), and I'm not sure the commercial ones can be changed from normally closed to normally open with sense magnet nearby like this example. BTW, this one is 10mm x 32mm, so about the same size as in the first link you suggested.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          therik
          wrote on last edited by
          #4

          One more thing...the actuator magnet I'm using is 1/4" diameter x 1/16" thick. (6.35mm x 1.56mm). So, I think this actuator magnet is also much smaller.

          1 Reply Last reply
          0
          • gaduG Offline
            gaduG Offline
            gadu
            wrote on last edited by
            #5

            You're perfectly correct! :)

            1 Reply Last reply
            0
            • sglueS Offline
              sglueS Offline
              sglue
              wrote on last edited by sglue
              #6

              Just bought these online, thought i'll post this for info.
              Didn't know these 3 legged glass reed switches exists.

              "NO/ NC SPDT Reed Magnetic Switch Replacement 2.5x14mm Ri-90 L2l6"

              link text

              0_1533772926891_NO_NC SPDT Reed Magnetic Switch.PNG

              Puneit ThukralP 1 Reply Last reply
              1
              • sglueS sglue

                Just bought these online, thought i'll post this for info.
                Didn't know these 3 legged glass reed switches exists.

                "NO/ NC SPDT Reed Magnetic Switch Replacement 2.5x14mm Ri-90 L2l6"

                link text

                0_1533772926891_NO_NC SPDT Reed Magnetic Switch.PNG

                Puneit ThukralP Offline
                Puneit ThukralP Offline
                Puneit Thukral
                wrote on last edited by
                #7

                @sglue Hello, I have these reed switches which have two output states... NO & NC.

                How would one go about have a two state reed switch on MySensors. I am trying to figure out how to do it on a NRF51822 chip on a coin cell battery.
                Basically I am trying to port this code into MySensors.
                MBED Link

                I need a starting point to take it forward. Any kind of help will be great. Thanks

                sglueS skywatchS 2 Replies Last reply
                0
                • Puneit ThukralP Puneit Thukral

                  @sglue Hello, I have these reed switches which have two output states... NO & NC.

                  How would one go about have a two state reed switch on MySensors. I am trying to figure out how to do it on a NRF51822 chip on a coin cell battery.
                  Basically I am trying to port this code into MySensors.
                  MBED Link

                  I need a starting point to take it forward. Any kind of help will be great. Thanks

                  sglueS Offline
                  sglueS Offline
                  sglue
                  wrote on last edited by
                  #8

                  @Puneit-Thukral

                  Sorry can't be of much help.

                  I used them for my garage door as limit switches, they tend to break easily and on hot days get false trigger.
                  Now using micro switches same thing happens.
                  Will try yo insulate the switches next.

                  1 Reply Last reply
                  1
                  • Puneit ThukralP Puneit Thukral

                    @sglue Hello, I have these reed switches which have two output states... NO & NC.

                    How would one go about have a two state reed switch on MySensors. I am trying to figure out how to do it on a NRF51822 chip on a coin cell battery.
                    Basically I am trying to port this code into MySensors.
                    MBED Link

                    I need a starting point to take it forward. Any kind of help will be great. Thanks

                    skywatchS Offline
                    skywatchS Offline
                    skywatch
                    wrote on last edited by
                    #9

                    @Puneit-Thukral said in Reed Switch normally open or normally closed:

                    How would one go about have a two state reed switch on MySensors.

                    Can you clarify what you want exactly? Usually these are used to decide if something is near or far from the switch by means of a magnet. Therefore if no magnet is present the NO will be open and NC will be closed. As soon as a magnet is moved close enought to trigger the reed switch those values swap over and NO will be closed and NC will be open.

                    The reason some switches have both states is that different systems will use NO or NC loops for detection and a relay that has both can be used in either.

                    1 Reply Last reply
                    0
                    • Puneit ThukralP Offline
                      Puneit ThukralP Offline
                      Puneit Thukral
                      wrote on last edited by
                      #10

                      @skywatch I recollect reading in another project that a NC /NO type reed switch consumes less power than a single output. In that project the author was setting the pin to "floating" when it opened to reduce the power consumption.

                      Is such the case? I
                      Thanks

                      skywatchS zboblamontZ 2 Replies Last reply
                      0
                      • Puneit ThukralP Puneit Thukral

                        @skywatch I recollect reading in another project that a NC /NO type reed switch consumes less power than a single output. In that project the author was setting the pin to "floating" when it opened to reduce the power consumption.

                        Is such the case? I
                        Thanks

                        skywatchS Offline
                        skywatchS Offline
                        skywatch
                        wrote on last edited by
                        #11

                        @Puneit-Thukral I guess it depends on the hardware the user was using and how it was wired up!

                        Really it is just an on /off switch. Well, in your case 2 on/off switches with the connectors commoned at one end of the switch.

                        Is this for a door/window/similar type application?

                        Puneit ThukralP 1 Reply Last reply
                        0
                        • skywatchS skywatch

                          @Puneit-Thukral I guess it depends on the hardware the user was using and how it was wired up!

                          Really it is just an on /off switch. Well, in your case 2 on/off switches with the connectors commoned at one end of the switch.

                          Is this for a door/window/similar type application?

                          Puneit ThukralP Offline
                          Puneit ThukralP Offline
                          Puneit Thukral
                          wrote on last edited by
                          #12

                          @skywatch in my case I will be using for a door sensor.

                          1 Reply Last reply
                          0
                          • Puneit ThukralP Puneit Thukral

                            @skywatch I recollect reading in another project that a NC /NO type reed switch consumes less power than a single output. In that project the author was setting the pin to "floating" when it opened to reduce the power consumption.

                            Is such the case? I
                            Thanks

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

                            @Puneit-Thukral Saving power by floating the pin may return spurious triggers, pull-up resistors give a solid open/close.
                            The gas meter here has a simple reed, now in it's second year on 2xAA at ca 30,000 actions/year, simple high value resistor bridge with a cap across the lower to ground to minimise noise and deal with "bounce" yet minimise current used.

                            Puneit ThukralP 1 Reply Last reply
                            0
                            • zboblamontZ zboblamont

                              @Puneit-Thukral Saving power by floating the pin may return spurious triggers, pull-up resistors give a solid open/close.
                              The gas meter here has a simple reed, now in it's second year on 2xAA at ca 30,000 actions/year, simple high value resistor bridge with a cap across the lower to ground to minimise noise and deal with "bounce" yet minimise current used.

                              Puneit ThukralP Offline
                              Puneit ThukralP Offline
                              Puneit Thukral
                              wrote on last edited by
                              #14

                              @zboblamont Thanks.. this is promising.. Of course, I was trying to complicate this way too much than needed. I will work with the regular reed switch.

                              skywatchS 1 Reply Last reply
                              1
                              • Puneit ThukralP Puneit Thukral

                                @zboblamont Thanks.. this is promising.. Of course, I was trying to complicate this way too much than needed. I will work with the regular reed switch.

                                skywatchS Offline
                                skywatchS Offline
                                skywatch
                                wrote on last edited by
                                #15

                                @Puneit-Thukral Did you see this?....

                                https://www.mysensors.org/build/binary

                                1 Reply Last reply
                                0
                                • Puneit ThukralP Offline
                                  Puneit ThukralP Offline
                                  Puneit Thukral
                                  wrote on last edited by
                                  #16

                                  @skywatch Yes I did try this first.. but I am trying to merge reed sensor with BME280 running on battery (preference is of a coin cell) and I am not using Arduino pro mini or similar. I am trying NRF51822. I did search the forums and openhardware. Most of the sketches available for this board are for NRF52 series board. I already have 10 of the NRF51822 boards and I would like to use them.
                                  On another thread I posted my sketch where I merged but it is not working for me. :-(

                                  Alas, my struggles continue. I am not a programmer but a copy/paste kind of a person. I am sightly modify code but still cannot write from scratch..getting there slowly.

                                  Cheers!

                                  skywatchS 1 Reply Last reply
                                  0
                                  • Puneit ThukralP Puneit Thukral

                                    @skywatch Yes I did try this first.. but I am trying to merge reed sensor with BME280 running on battery (preference is of a coin cell) and I am not using Arduino pro mini or similar. I am trying NRF51822. I did search the forums and openhardware. Most of the sketches available for this board are for NRF52 series board. I already have 10 of the NRF51822 boards and I would like to use them.
                                    On another thread I posted my sketch where I merged but it is not working for me. :-(

                                    Alas, my struggles continue. I am not a programmer but a copy/paste kind of a person. I am sightly modify code but still cannot write from scratch..getting there slowly.

                                    Cheers!

                                    skywatchS Offline
                                    skywatchS Offline
                                    skywatch
                                    wrote on last edited by
                                    #17

                                    @Puneit-Thukral OK - post the TWO codes completely here and I will TRY and help you merge them. That said I have NO experience of the 51822 and so you may still need help. I am fairly busy at the moment but in a few days I should have time to help you out.

                                    Puneit ThukralP 1 Reply Last reply
                                    0
                                    • skywatchS skywatch

                                      @Puneit-Thukral OK - post the TWO codes completely here and I will TRY and help you merge them. That said I have NO experience of the 51822 and so you may still need help. I am fairly busy at the moment but in a few days I should have time to help you out.

                                      Puneit ThukralP Offline
                                      Puneit ThukralP Offline
                                      Puneit Thukral
                                      wrote on last edited by
                                      #18

                                      @skywatch thanks a lot for offering to help. I think I have made some headway.
                                      I used @NeverDie sketches. The one for nrf24 or RFM69 don’t really work well with waking up the nrf51 chip or maybe I made some mistake and were consuming way too much power.

                                      Anyhow , the test sketch is running and interrupts are working fine as well as the bme280 reports fine.
                                      Tomorrow I will move it a battery powered and observe.

                                      Cheers!

                                      1 Reply Last reply
                                      0
                                      • E Offline
                                        E Offline
                                        ersanzop
                                        wrote on last edited by
                                        #19

                                        I also used them for my garage door as limit switches.

                                        1 Reply Last reply
                                        0
                                        • E Offline
                                          E Offline
                                          ersanzop
                                          wrote on last edited by
                                          #20

                                          i had good experience with it. . .

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


                                          8

                                          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