Glass break sensor?
-
Has anyone implemented a glass break sensor?
I'ld like to implement a few for my home, but haven't found any info on how to do this with an Arduino as the microcontroller, nor what kind of sensor to use for this.
Thanks!
-
Have a look at the vibrationSensor sketch in the mySensor examples. It uses the DFR0027 vibration sensor found here
http://www.dfrobot.com/wiki/index.php/DFRobot_Digital_Vibration_Sensor_V2_SKU:DFR0027
An accelerometer might be of use for this also
-
I should have mentioned that I was looking for a sound-based glass break sensor, since then one sensor can cover many windows/doors.
A vibration sensor won't cut it for what I'm trying to do, but thanks for the link. Interesting application.
-
sound based sensor is complicated...
you would need to calibrate the mic to have it sensible enough
you would have to fo FFT (hard to do in an arduino) to get the sound mesure
-
I was hoping to find a pre-made sonic glass break sensor and just interface it to the arduino.
Might try to rework a Glasstrek 456 sensor and see if it can be tied to a microprocessor like the duino with an RF radio attached. It has relay outputs, and if those don't work, maybe tie into an indicator LED for an output signal.
-
Why not just sample an accelerometer?
-
How would that help? Unless you attach it to the glass, which means I would need a few dozen for all the glass in my house, and that ain't happenin'.....too much hassle and looks ugly as well.
-
Ok, then things will be complicated. You will need some fancy sw to sample and analyze the sound to differentiate breaking glass from anything else. And it is only the actual accelerometer that needs to be attached to the glass. Should exist sensors for exactly that purpose.
-
I want a pre-made sound-based glass break sensor, so that actually makes it easier, since then it comes pre-calibrated and all you get out the back end is a "tripped" signal that can go on a single Arduino pin.
As I said, the Glasstrek unit might be usable for such an interface. You can get them under $20 each, and a couple or three would cover the whole house.
-
Ok. I'd like to have something more precise in my home. Otherwise my automatic sentry gun might target the wrong area
-
@Anticimex said:
Ok. I'd like to have something more precise in my home. Otherwise my automatic sentry gun might target the wrong area
LOL....good one!
If I miss with the .45 ACP, and my wife misses with her .38, and the dogs don't rip the baddies to pieces, it's likely the cats will claw them to death and leave the bits in their litter boxes, so I'm not worried.
With 7 sensors spread around the house, which I've built all myself and which include thermostat (https://github.com/chaeron/thermostat), and MySensors-based temp, humidity, barometer and water level sensors, my own little Skynet will soon be ready for the Singularity!
-
Just make sure you use message signing or you might be in for a bad surprise
-
I haven't yet, but plan to not too far down the road.
-
@chaeron They are all over ebay.
The way they work with a wired alarm system (like almost all wired alarm sensors) is there is a normally closed circuit, and if the sensor detects something it opens the circuit. (this is so that cutting the wire to the sensor also trips the alarm)
This is dead simple to interface with, just hook it up betweenVCCa 12V battery and any digital pin (via some method of stepping down the voltage) that is pulled low. If the pin goes low the alarm is triggered.[Edits in Bold: slight correction, guess I was more tired than I wanted to admit last night]
http://www.ebay.com/itm/Generic-Glass-Break-Detector-for-Wired-Wireless-Burglar-Alarm-PA-456-/222030136167?hash=item33b2070367:g:AJgAAOSwyQtVjBN8
-
Thanks Rod, good price on that generic unit.
The specs say the output is 28VDC....so wouldn't I have to add a circuit to drop the voltage to 5v or 3.3 V before tying it into a 'duino pin?
-
Voltage division resistors
https://learn.sparkfun.com/tutorials/voltage-dividers
-
Another write up on resistors dividers and opto-couplers: http://electronics.stackexchange.com/questions/43498/how-can-i-use-a-12-v-input-on-a-digital-arduino-pin
I've used optocouplers in the past without any problem. They can be purchased for practically nothing on aliexpress. In either case it's important to check the voltage on the signal line ahead of time to really see what the sensor is putting out.
-
Yes, regardless of the source, always check the spec sheet and even take some measurements your self when you get it to be sure.
You can use resistors as voltage dividers, or use optocouplers/relays, or even burn it off with a step down voltage regulator like an LM7805. You will need to supply ~12V to the sensor too, as that is what it is designed for in a burglar alarm system, so take that into account. This one says it will operate off 9V, but don't count on powering it long off a 9V square battery.