📜 ⬆️ ⬇️

GSM alarm system for car based on Arduino Uno

Foreword


Car thefts over the past decade occupy one of the most significant places in the structure of crimes committed in the world. This is due not so much to the specific weight of this category of theft relative to the total number of crimes, but to the materiality of the damage caused due to the high cost of cars. The weak effectiveness of measures taken in the field of combating theft of motor vehicles by the end of the 1990s led to the creation of resilient groups specializing in the commission of these crimes and having the distinctive features of organized crime; You've probably heard the term "black auto business." Automobile fleet of European states is not calculated annually ≈ 2% of cars that become the subject of criminal attacks. Therefore, I got the idea to make a gsm-alarm for my car based on Arduino Uno.


Let's start!

From which we will collect


We must choose the heart of our system. In my opinion, for such an alarm there is nothing better than the Arduino Uno. The main criterion is a sufficient amount of “pins” and price.


The main characteristics of the Arduino Uno
Microcontroller - ATmega328
Operating voltage - 5 V
Input voltage (recommended) - 7-12 V
Input voltage (limit) - 6-20 V
Digital Inputs / Outputs - 14 (6 of which can be used as PWM outputs)
Analog inputs - 6
Direct current through the input / output - 40 mA
Direct current for output 3.3 V - 50 mA
Flash memory - 32 Kb (ATmega328) of which 0.5 Kb is used for the bootloader
RAM - 2 KB (ATmega328)
EEPROM - 1 Kb (ATmega328)
Clock frequency - 16 MHz

It fits!
')
Now you need to choose a gsm-module, because our alarm should be able to notify the owner of the car. So, you need to "google" ... Here, an excellent sensor - SIM800L, the size is just wonderful.


I thought and ordered it from China. However, it was not so rosy. The sensor simply refused to register the SIM card on the network. Everything that was possible was tested - the result is zero.
There were kind people who gave me a cooler thing - Sim900 Shield. This is already a serious thing. In Shield-e and a connector for a microphone and headphone, a full-fledged phone.


Key Features of Sim900 Shield
4 standards of operating frequency 850/900/1800/1900 MHz
GPRS multi-slot class 10/8
GPRS mobile station class B
Compliant GSM phase 2/2 +
Class 4 (2 W @ 850/900 MHz)
Class 1 (1 W @ 1800 / 1900MHz)
Management using AT commands (GSM 07.07, 07.05 and SIMCOM extended AT commands)
Low power consumption: 1.5mA (sleep mode)
Operating temperature range: -40 ° C to +85 ° C

It fits!

Ok, but you need to take readings from some sensors to alert the owner. Suddenly the car is evacuated, then the position of the car will obviously change in space. Take the accelerometer and gyroscope. Fine. Tax, now we are looking for a sensor.

I think that the GY-521 MPU6050 will definitely fit. It turned out that it has a temperature sensor. It would be necessary to use it, there will be such a "killer feature". Suppose the owner of the car put it under the home and left. The temperature inside the car will change "smoothly." What will happen if an attacker tries to get into a car? For example, he can open the door. The temperature in the car will begin to change rapidly, as the air in the cabin will begin to mix with the air of the environment. I think that will work.


Main characteristics of the GY-521 MPU6050
The module of the 3rd axial gyroscope + the 3rd axial accelerometer GY-521 on the MPU-6050 chip. Allows you to determine the position and movement of an object in space, the angular velocity during rotation. It also has a built-in temperature sensor. It is used in various Koptera and model aircraft, as well, on the basis of these sensors, it is possible to assemble a motion capture system.

Microcircuit - MPU-6050
Power supply - from 3.5V to 6V (DC);
The range of the gyroscope is ± 250 500 1000 2000 ° / s
Accelerometer range - ± 2 ± 4 ± 8 ± 16g
Communication Interface - I2C
Size - 15x20 mm.
Weight - 5 g

It fits!

Also useful vibration sensor. Suddenly, the car will try to open the "brute force", well, or in the parking lot, another car will touch your car. Take the vibration sensor SW-420 (adjustable).

Key features of the SW-420
Power supply - 3.3 - 5V
Output Signal - Digital High / Low (Normally Closed)
Sensor Used - SW-420
Comparator Used - LM393
Dimensions - 32x14 mm
Additionally - There is an adjusting resistor.

It fits!

Screw the SD card module. We will still write a log file.

Key features of the SD card module
The module allows you to store, read and write to the SD card the data required for the operation of the device based on the microcontroller. The use of the device is important when storing files from tens of megabytes to two gigabytes. The board contains an SD card container, a power stabilizer for the card, a plug for the interface and power line connector. If you want to work with audio, video or other volumetric data, for example, keep a log of events, sensor data or store web server information, then the SD module of the memory card for the Arduino will provide an opportunity to use the SD card for this purpose. Using the module, you can learn the features of the SD card.
Power supply - 5 or 3.3 V
SD card memory - up to 2 GB
Dimensions - 46 x 30 mm

It fits!

And we will add a servo, when the sensors are triggered, the servo will rotate with the DVR and take video of the incident. Take the MG996R servo.

The main characteristics of the servo MG996R
- Stable and reliable protection against damage
- Metal drive
- double row ball bearing
- Wire length 300 mm
- Dimensions 40x19x43mm
- Mass 55 gr
- Angle of rotation: 120 degrees.
- Working speed: 0.17s / 60 degrees (4.8V without load)
- Working speed: 0.13s / 60 degrees (6V without load)
- Starting torque: 9.4kg / cm with 4.8V power supply
- Starting torque: 11kg / cm with 6V power supply
- Operating voltage: 4.8 - 7.2V
- All drive parts are made of metal

It fits!

We collect


About the connection of each sensor in "Google" a huge number of articles. And I don’t have a desire to invent new bikes, so I’ll leave links to simple and working options.


The articles provide a little more information than we need, but knowledge is not superfluous. Photo assembled layout.



Oh, I completely forgot to mention nutrition, from which our system will be powered. Power will be from 12v car.

Thin moments of the project


Chips on Sim900 Shield should be installed this way. Utility SIM900 Shield.

The position of the power switch to power Sim900 Shield.







AT commands for Sim900 Shield

Total








That's it, the whole sketch is on GitHub . In my opinion, I managed to create a gsm-alarm system that can notify the owner of the car in case of an accident. The project turned out to be economical in terms of financial investments, which undoubtedly pleases. In the future I plan to improve the gsm-alarm system, add new functionality.

Source: https://habr.com/ru/post/403985/


All Articles