This is an old revision of the document!
Proximity Alarm
Introducere
The proximity alarm is a defensive device that gives an audio signal when a person passes within its direct range. The goal is to detect unwanted visitors, so someone is aware of their position.The idea behind the project is taken from an online tactical shooter game and it acts like previously stated. The device can be used in Close-Quarters Battle by slowing down attackers and helping out defenders in certain areas.
Descriere generală
Hardware Design
Compontents:
Schema circuit :
Software Design
The IDE used to write the program was Arduino IDE. The modules used in the circuit are:
The program uses a few functions such as :
pulseIn() → Reads a pulse (either HIGH or LOW) on a pin. For example, if value is HIGH, pulseIn() waits for the pin to go from LOW to HIGH, starts timing, then waits for the pin to go LOW and stops timing. Returns the length of the pulse in microseconds or gives up and returns 0 if no complete pulse was received within the timeout. The function is used for the echo pin of the ultrasonic sensor.
tone() → Generates a square wave of the specified frequency (and 50% duty cycle) on a pin. A duration can be specified, otherwise the wave continues until a call to noTone(). The pin can be connected to a piezo buzzer or other speaker to play tones.Only one tone can be generated at a time. If a tone is already playing on a different pin, the call to tone() will have no effect. If the tone is playing on the same pin, the call will set its frequency. We use the function to give an audio warning if something is detected by the sensor.
noTone() → Stops the generation of a square wave triggered by tone(). Has no effect if no tone is being generated.
delay() → Pauses the program for the amount of time (in milliseconds) specified as parameter. (There are 1000 milliseconds in a second.)
setup() → Initialize the components .
Also in order to get the distance in centimeters we use a little formula: distance = (duration * 0.034)/2. Speed of sound travels at 340 meters per second or 0.034 centimeters/microseconds.The alarm gets more alert as you get closer to it. In this case if an object is less than 20 centimeters away from the sensor, but its adjustable according to your needs.
Rezultate Obţinute
The proximity alarm in action.
Results that you recieve on the remote device ( smartphone ).
I also uploaded a demo on youtube. You can find at the following link
Concluzii
Although the project may look “Raw” this might be due to the low grade quality(especially the sensor) of the components or the lack of a casing to protect the circuit as in a real situation in can easly be destoyed. There are a few things that may be worth implementing such as .
Download
Jurnal
Bibliografie/Resurse
Listă cu documente, datasheet-uri, resurse Internet folosite, eventual grupate pe Resurse Software şi Resurse Hardware.
Export to PDF