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. Glass Break Sensor as Switch

Glass Break Sensor as Switch

Scheduled Pinned Locked Moved Hardware
8 Posts 3 Posters 2.1k Views 4 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.
  • mh_alexM Offline
    mh_alexM Offline
    mh_alex
    wrote on last edited by
    #1

    I have found some nice glass break sensors that don't require power. I looked up the data sheet (http://static.interlogix.com/library/75803_shock_sensor_ds.pdf) and it has a certain resistance when idle 14-24Ω. And when the sensor is tripped it has a resistance > 1MΩ. My question is this: will the arduino register 1 MΩ as open? I have the switch sketch working for door sensors and was really hoping to expand to glass break. Any help is appreciated.

    mfalkviddM 1 Reply Last reply
    0
    • mh_alexM mh_alex

      I have found some nice glass break sensors that don't require power. I looked up the data sheet (http://static.interlogix.com/library/75803_shock_sensor_ds.pdf) and it has a certain resistance when idle 14-24Ω. And when the sensor is tripped it has a resistance > 1MΩ. My question is this: will the arduino register 1 MΩ as open? I have the switch sketch working for door sensors and was really hoping to expand to glass break. Any help is appreciated.

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

      @mh_alex it depends on the value of the pullup resistor. A low signal is <0.3Vcc and a high signal is >0.6Vcc (see Electrical Characteristics in the atmega328 datasheet).

      The easiest way to use the sensor is to create a voltage divider by adding a pullup or pulldown resistor.

      A 390kohm resistor is the largest you can use to reliably detect a shift from a few ohms to 1mohm with a simple voltage divider.

      mh_alexM 1 Reply Last reply
      0
      • M Offline
        M Offline
        mortommy
        wrote on last edited by mortommy
        #3

        Another way to use the sensor value is a voltage divider that commands a transistor used as switch, see the schema below:

        0_1466666782540_upload-15d99272-90cf-4ee0-8316-6214e87ccad3

        until the sensor's value is low, the voltage value applied to the transistor's base is low so it'll be OFF and at the collector we'll have Vdd, if connected to an arduino digital pin it is an HIGH digital value. When the sensor has an high value the voltage applied to the transistor's base will switch it on and since the transistor's emitter is connected to the ground the value seen at the collector is almost 0V, so LOW value at the arduino digital pin.

        mh_alexM 1 Reply Last reply
        0
        • mfalkviddM mfalkvidd

          @mh_alex it depends on the value of the pullup resistor. A low signal is <0.3Vcc and a high signal is >0.6Vcc (see Electrical Characteristics in the atmega328 datasheet).

          The easiest way to use the sensor is to create a voltage divider by adding a pullup or pulldown resistor.

          A 390kohm resistor is the largest you can use to reliably detect a shift from a few ohms to 1mohm with a simple voltage divider.

          mh_alexM Offline
          mh_alexM Offline
          mh_alex
          wrote on last edited by
          #4

          @mfalkvidd Thank you for the quick and informative response. I'm new to Arduino and didn't know how to look for this type of information. I think i will try activating the internal pullup resistor as I have already done for my door switches. If this does not work then I will attempt to build my own voltage divider circuit. I will post my findings in the coming week.

          mfalkviddM 1 Reply Last reply
          1
          • M mortommy

            Another way to use the sensor value is a voltage divider that commands a transistor used as switch, see the schema below:

            0_1466666782540_upload-15d99272-90cf-4ee0-8316-6214e87ccad3

            until the sensor's value is low, the voltage value applied to the transistor's base is low so it'll be OFF and at the collector we'll have Vdd, if connected to an arduino digital pin it is an HIGH digital value. When the sensor has an high value the voltage applied to the transistor's base will switch it on and since the transistor's emitter is connected to the ground the value seen at the collector is almost 0V, so LOW value at the arduino digital pin.

            mh_alexM Offline
            mh_alexM Offline
            mh_alex
            wrote on last edited by
            #5

            @mortommy Thanks for the schematic. This seems a more complicated than I was hoping. Do you think activating the internal pullup resistor would be a more appropriate first step? Are there any disadvantages to this approach?

            1 Reply Last reply
            0
            • mh_alexM mh_alex

              @mfalkvidd Thank you for the quick and informative response. I'm new to Arduino and didn't know how to look for this type of information. I think i will try activating the internal pullup resistor as I have already done for my door switches. If this does not work then I will attempt to build my own voltage divider circuit. I will post my findings in the coming week.

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

              @mh_alex the internal pullup will work fine. Try that first.

              1 Reply Last reply
              0
              • mh_alexM Offline
                mh_alexM Offline
                mh_alex
                wrote on last edited by
                #7

                It worked perfectly. I found a sketch in the forums for two switches with interrupts and wired up two glass break sensors. The sensors can be found on amazon for 12 bucks "Interlogix Glassbreak Shock Detector, White (5150W)". Thanks for the help!

                mfalkviddM 1 Reply Last reply
                1
                • mh_alexM mh_alex

                  It worked perfectly. I found a sketch in the forums for two switches with interrupts and wired up two glass break sensors. The sensors can be found on amazon for 12 bucks "Interlogix Glassbreak Shock Detector, White (5150W)". Thanks for the help!

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

                  @mh_alex great to hear, thanks for reporting back!

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


                  25

                  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