The Anti-theft Alarm
- Understand how the Infrared Object-Avoiding Sensor works and how to use the self-locking function of the "button" node.
- Connect and use the Infrared Object-Avoiding Sensor and buzzer correctly. Finish making the anti-theft alarm.
- Learn how to set the parameters of each node correctly.
With the advancements in technlogy, and the reinforcement of safety in our society, people across the world are paying more and more attention to their safety and their surrounding environment. As an example, we must protect the lives of our family, both young and old, and property, when we not at home. This passage is a brief intro of how to make an anti-theft alarm by using SmartNode and the nodes and programs behind it.
Picture 1: An Anti-theft Alarm
The key aspect of any anti-theft alarm is triggering the Infrared Obstacle-Avoiding Sensor. Simply put, if anything nears it, we want a buzzer to alarm. With it, we can create a true anti-theft device. It requires an Infrared Obstacle-Avoiding Sensor to obtain data of its surrounding environment and determine whether something enters its warning range. Once something does, a buzzer is triggered. We can learn more about this project by taking a look at Figure 1.
Figure 1: Project Analysis – Anti-theft Alarm
Obtain the data of the things of its surroundings and trigger the buzzer if something enters its warning range
Arduino/Genuino101, Expansion board, Infrared Object-Avoiding Sensor, Buzzer, Button
A. The Infrared Obstacle-Avoiding Sensor
The Infrared Obstacle-Avoidance Sensor is a photoelectric sensor that can both transmit and receive signals as Picture 2 suggests. The light behind the sensor flickers while the digital signal trasmits. Its detection range can be adjusted based on your preferance. This sensor type is capable of long-dance detections, less interferances from visible light, and various other features. They can be used extensively in many different aspects, including robot obstacle avoidance, digital interactive installation projects etc., and of course, alarm systems.
The Infrared Obstacle-Avoidance Sensor is a digital sensor, with outputs of 0 and 1. These are also known as the low and high outputs in digital electronics. In normal conditions, it will transmit the low output. Once the sensor detects a target, it will transmit the high output.
Picture 2: Infrared Avoidance Sensor
The digital buzzer (Picture 3) is a simple voice device of the Arduino/Genuino101 sensors. It is driven by the simple signals of low and high output. This type of buzzer is essential in all warning and alarm systems.
Picture 3: Buzzer
Once we have all the equipment ready, we need to connect the Infrared Avoidance Sensor, buzzer, button, Arduino/Genuino101 and the DF extension board, shown in Picture 4. Here we connect the Infrared Object-Avoidance Sensor to the digital pin 0, the buzzer to 8, and the button to 4.
Picture 4: Connection diagram
To achieve the functionality of the anti-theft alarm, we need to check the device's surrounding environment in real time. Once something enters the warning range, the buzzer will be triggered. This process is shown in Picture 5.
Picture 5: Reference of the anti-theft alarm
C. Set Up
We need to use the Self-locking function of the button to allow the Infrared Obstacle-Advoidance Sensor to obtain the data of its surrounding environment. Press the button and the Infrared Obstacle-Avoidance Sensor will be opened.
If you double-click the button node, an interface will appear (Picture 6). Name it as "On-Off". Next, we will set the digital pin to 4 and select Locking Press-Button as the function to prepare for the next node.
Picture 6: Setting up the Button node
For the DFInfraredAvoidance node, we will set the digital pin to 0 to obtain the data of its surrounding environment. We will also set the time interval value to 1000(ms).
Picture 7: Setting up the DFInfraredAvoidance node
The buzzer node is used to set the digital pin. When the Infrared Obstacle-Avoidance Sensor transmits a "1" signal, the buzzer will sound. See Picture 8 for more details regarding this setting.
Picture 8: Setting up the Buzzer node.
Press "Deploy" and you can then begin to test the device's new functionality. If it is not working as expected, ask your friends or simply post your question on our forums!
Last but not least, don't forget to share your work and learning process with your friends and colleagues!
Both the anti-theft and tempature alarm can be classified as alarms. With the nodes and devices that we already have, can you think of any alternative alarms that might be useful? Tell us some of your ideas!