Although this alarm is designed to protect valuables left in a tent, it can also be used as a baggage alarm (either on or in one‘s bags) and in similar situations.
The tent alarm can be triggered by many different sensors. One is a current loop, connected to pin PB4 of an ATtiny13 micro-controller: this could be a thin wire which would be broken by a prospective pilferer caught off his guard. Alternatively, it can be a reed switch contact normally held closed by a magnet, arranged so that the budding burglar will accidentally move the magnet and thus open the contact. This could be used to protect a door or a zip fastener securing a tent.
Another sensor connected to PB4 is an LDR (light dependent resistor). If the LDR is left in a dark place (such as under a sleeping bag) the thief will trigger the alarm if he moves the bag to expose the sensor to light. The resistance of the LDR is about 100 kΩ in the dark and just a few ohms in the light. If only the light sensor is to be used, the alarm wire (or reed contact) socket can be shorted using a jumper. If the LDR is not to be used, it can either be (temporarily) taped over to exclude light from it or (more permanently) replaced by a 100 kΩ resistor.
Tent Alarm Circuit Diagram:
A third sensor which can trigger the alarm is a vibration detector (S6), which is wired in series with a tilt sensor. The tilt sensor allows the vibration sensor to be disabled when the alarm unit is left upside-down. When the tilt sensor contacts are open, PB1 cannot be pulled low and so no alarm can be triggered.
The unit also features a number of push-buttons and switches connected to PB2. The arrangement and labelling of these buttons and switches is described below.On the left of the device lies switch S1 with the (deliberately misleading) legend ‘Power on/off ’. Of course, this does not turn the alarm on and off. On the right of the device is switch S2 with the legend ‘Speaker on/off ’, which, naturally, does nothing of the sort. As you have probably already guessed, the red and green but-tons also have nothing to do with arming or disarming the alarm.
These decoys should be enough to annoy and delay all but the most resourceful of robbers. Naturally, once the alarm has been triggered by uncovering the LDR, it will not turn off again if the LDR is then covered.The only way to disable the alarm is to set S1 and S2 in the correct positions (namely, ‘Power on’ and ‘Speaker on’) and hold down the two buttons simultaneously for five seconds. More complicated deactivation procedures can be programmed into the software, in case you are worried that some light-fingered Elektor reader (not that such a person exists) will be able to steal your valuables after having seen this article.The circuit requires a supply voltage of between 3.6 V and 5 V. In the circuit diagram we show a power supply made using a 9 V battery and a 5 V voltage regulator.
The ATtiny13 microcontroller belongs to Atmel’s AVR family, and can be programmed using BASCOM. Source and object code files, including fuse settings, are available in a ZIP archive that is available for free download from the Elektor website. The source code can be modified to suit your own application and then recompiled using the free version of BASCOM. The software arranges matters so that the processor enters sleep or power-down mode when the alarm is correctly deactivated; there is no other way to turn the device off. To wake the device up the switches must be set correctly (both to ‘on’) and the unit shaken briefly. The LED blinks twice to con-firm that the device has woken up; after a brief delay of approximately three seconds the alarm is armed. This state is indicated by three flashes of the LED. While the alarm remains in the armed state the LED blinks briefly once every few seconds.
When the alarm is triggered the red LED lights immediately. If it is not disarmed, the alarm sounds after a short pause.
To disarm the unit, both switches again need to be in the ‘on’ position as described above and both buttons must be pressed. After a double flash, whether the LED is on or off indicates whether the buttons must then be pressed again or not.
Author :Stefan Hoffmann - Copyright: Elektor