good time days 🙂 Today we will talk about signaling. The service market is full of firms, organizations that install and maintain security systems. These firms offer the buyer a wide selection of alarm systems. However, their cost is far from cheap. But what about a person who does not have so much personal money that can be spent on a burglar alarm? I think the conclusion suggests itself - do alarm their hands. This article is an example of how you can make your own coded security system using an Arduino uno board and some magnetic sensors.
The system can be deactivated by entering the password from the keyboard and pressing the ‘ * ‘. If you want to change your current password, you can do so by pressing the ‘ B', and if you want to skip or abort the operation, you can do this by pressing the key ‘#’. The system has a buzzer to play different sounds when performing a particular operation.
The system is activated by pressing the ‘A’ button. The system gives 10 seconds to leave the room. After 10 seconds the alarm will be activated. The number of magnetic sensors will depend on your own desire. The project involved 3 sensors (for two windows and a door). When the window is opened, the system is activated and the buzzer alarm is activated. The system can be deactivated by entering a password. When the door opens, the alarm gives the person who enters 20 seconds to enter the password. The system uses an ultrasonic sensor that can detect movement.
Video of the device
craft Made for informational/educational purposes. If you want to use it at home, you will need to modify it. Enclose the control unit in a metal case and secure the power line from possible damage.
Let's get started!
If you want to build a system without using Arduino, you will also need the following:
And one box to pack it all!
Tools:
The connection scheme is quite simple.
Small clarification:
High contrast LCD:
Keyboard 4×4:
From left to right:
The step shows the code that is used by the built-in !
Download the codebender plugin. Click on the "Run" button in the Arduino and flash your board with this program. That's all. You have just programmed the Arduino! If you want to make changes to the code, click the "Edit" button.
Note: If you are not using the Codebender IDE to program the Arduino board, you will need to install additional libraries in the Arduino IDE.
After successfully assembled and tested new project on the Arduino base uno, you can start making your own board.
A few tips for a more successful completion of the undertaking:
Its author wanted to make homemade, so that it was cheap and wireless.
This homemade product uses a PIR motion sensor, and information is transmitted using an RF module.
The author wanted to use the infrared module, but since it has a limited range, and plus it can work only line-of-sight to the receiver, so he opted for an RF module that could achieve a range of approximately 100 meters.
All the author needs is:
- 2 boards ARDUINO UNO / ARDUINO MINI / ARDUINO NANO for receiver and transmitter;
- RF transceiver module (433 MHZ);
- PIR motion sensor;
- 9V batteries (2 pieces) and connectors to them;
- Buzzer;
- Light-emitting diode;
- Resistor with a resistance of 220 Ohm;
- Bread board;
- Jumpers / wires / jumpers;
- Circuit board;
- Interboard pin connectors;
- Switches;
- Cases for receiver and transmitter;
- Colored paper;
- Mounting tape;
- Type-setting scalpel;
- Hot glue gun;
- Soldering iron;
- Nippers / tool for removing insulation;
- Scissors for metal.
After that, I checked the operation of the sensor
Later, as the motion sensor detects movement in front of it, the LED will light up, and you can also see the corresponding message in the monitor.
Stage 2.
Receiver Diagram:
Transmitter software.
Before uploading the firmware code to the board, the author set following options IDE:
- Board -> Arduino Nano (or whatever board you are using);
- Serial Port ->
Receiver Software
The author repeats the same steps for the receiving board:
- Board -> Arduino UNO(or whatever board you are using);
- Serial Port -> COM XX (check the com port your board is connected to).
Stage 4.
Next, after downloading the software, the author decided to check if everything is working properly. The author connected the power supplies, and ran his hand in front of the sensor, and he got a buzzer, which means everything is working as it should.
First he cut out: a hole for the switch, and also round hole for the motion sensor, after which I glued it to the case.
Good afternoon! Again, a multi-review of Chinese electronic components, as usual, a little about everything, I will try to be shorter, but will it work? So, meet GSM alarm worth up to 700 ₽. Interesting? Please under "cut"!
Let's get started! Before starting, I recommend looking into this one, fewer components and greater autonomy. So, the "terms of reference", the basic requirements for signaling:
1) Notify when sensors are triggered.
2) In the event of a power failure, some autonomy must be provided.
3) Alarm management via sms and calls.
Due to the fact that the process of creating an alarm was delayed for several months and some sellers no longer sell those components that were purchased from them, the links will be updated to the goods of other sellers who have the maximum or close to the maximum number of sales of goods and best price. The prices in the review are current as of the date of writing.
List of what you need:
List of changes
GSM_03_12_2016-14-38.hex- Fixed device operation with M590 modem.
GSM_05_12_2016-13-45.hex- added console command memtest, optimization of RAM usage.
GSM_2016_12_06-15-43.hex- Added output of command results to the console, memory optimization. Occupied: 49% SRAM.
GSM_2016_12_07-10-59.hex- now phone numbers are added and removed correctly. Occupied: 49% SRAM, 74% Flash Memory.
GSM_2016_12_07-15-38.hex- added the ability to connect a motion sensor, connects to pin A0 (in this case, pin A0 is used as a digital one). Added SMS commands PIRON, PIR Off. Occupied: 48% SRAM, 76% Flash Memory.
GSM_2016_12_08-13-53.hex- Now, after successful execution of a command that does not send an SMS message in response, the device blinks a blue LED once. Now, after an incorrect execution of a command that does not send an SMS message in response, the device blinks twice with a blue LED. Now, after initialization of the device parameters, if the "silent" mode is enabled (SendSms = 0), the device blinks rapidly with a blue LED for 2 seconds. Fixed a bug due to which the number was not always deleted from memory by the DeletePhone command. Occupied: 48% SRAM, 78% Flash Memory.
GSM_2016_12_11-09-12.hex- Added console commands AddPhone and DeletePhone, the syntax is similar to SMS commands. Memory optimization. Occupied: 43% SRAM, 79% Flash Memory.
GSM_2017_01_03-22-51.hex- Implemented support for similar I / O port expanders on the PCF8574 chip, for connecting an additional 8 sensors, including reed switches. Automatic address search and automatic module configuration. The standard names of the sensors and the logical level of their operation are changed using the EditSensor command. Changed the content of alarm SMS for the main sensor (pin D0) “Alarm! main sensor! and motion sensor (pin A0) “Alarm! PIR sensor! Added commands EditSensor and I2CScan. Occupied: 66% SRAM, 92% Flash Memory.
GSM_2017_01_15-23-26.hex- Support for A6_Mini modem. Control of the presence of external power supply (pin D7). Added SMS commands WatchPowerOn, WatchPowerOff. Added console commands ListConfig, ListSensor. Now the EditSensor sms command works correctly. The output of debugging information to the port monitor has been slightly "cut down". Occupied: 66% SRAM, 95% Flash Memory.
GSM_2017_01_16-23-54.hex- Now in the response message to the SMS command "Info" the state of the motion sensor is also reported. Fixed a bug due to which empty response SMS messages were sometimes sent. Now the device notifies not only about the shutdown, but also about the resumption of external power. All modems began to “talk less”, now the port monitor has become a little cleaner. Occupied: 66% SRAM, 95% Flash Memory.
GSM_2017_02_04-20-23.hex- Fixed "Watch the power on" bug. Now, after disarming, the “alarm pin” is turned off. Now, after deleting the number, the correct information is displayed in the console. Perhaps a bug has been fixed due to which empty response SMS messages were sometimes sent. Occupied: 66% SRAM, 90% Flash Memory.
GSM_2017_02_14-00-03.hex- Now SMS messages are sent by default, the SendSms parameter is again equal to 1. Now, when the contacts of the main reed switch are closed (the door is closed), the device flashes a blue LED for 2 seconds, signaling about normal operation sensor. Occupied: 66% SRAM, 90% Flash Memory.
GSM_2017_03_01-23-37.hex- The WatchPowerOn command has been removed. Added console command WatchPowerOff, identical to SMS command. Added commands WatchPowerOn1, WatchPowerOn2. WatchPowerOn1 - external power monitoring is enabled if the alarm is armed, WatchPowerOn2 - external power monitoring is always enabled. Implemented arming and disarming function external devices, for this, pins A1(D15) and A2(D16) are used. The alarm will arm/disarm when it appears on output A1(D15) high level+5V or at pin A2(D16) low GND. Pin A1(D15) is pulled up to GND, pin A2(D16) is pulled up to +5V through 20 (10) kOhm resistors. Added GuardButtonOn and GuardButtonOff commands. Now, after arming, the red LED flashes until the integrity of the main reed sensor circuit is checked. If the circuit is complete, the red LED lights up. Occupied: 66% SRAM, 95% Flash Memory.
GSM_2017_03_12-20-04.hex- Now the console is even cleaner, but if the "TestOn" test mode is enabled, additional information is displayed in the console. The "Sent!" bug has been fixed, now information about sending messages is correctly displayed in the console. Fixed "repeated fake call" bug. Now the balance request should work correctly on all modems. Occupied: 67% SRAM, 95% Flash Memory.
GSM_2017_04_16-12-00.hex- Fixed. Now the Info and Money commands will always send a response SMS. The GuardButtonOn command has been replaced by the GuardButtonOn1 and GuardButtonOn2 commands. Occupied: 67% SRAM, 99% Flash Memory.
GSM_2017_04_21-09-43.hex - not recommended for use, only as a test, thanks for the errors found :) - Now the sendsms parameter does not affect the sending of SMS messages for monitoring the power grid. Added SMS command DelayBeforeGuard responsible for the delay when arming, the value cannot exceed 255 seconds. Added SMS command DelayBeforeAlarm responsible for delaying sending notifications and turning on the "alarm pin" when sensors are triggered, the value cannot exceed 255 seconds. Removed ClearSMS commands, now messages are deleted automatically upon receipt. Occupied: 68% SRAM, 100% Flash Memory.
GSM_2017_04_22-20-42.hex- Fixed multiple bugs. ClearSMS commands are back in the firmware. Memory optimization. Occupied: 68% SRAM, 98% Flash Memory.
GSM_2017_04_23-17-50.hex- Now the balance request should work correctly on all modems. Arming and disarming by external devices now works correctly. Info command SMS response messages must not be empty. Memory optimization. Occupied: 68% SRAM, 98% Flash Memory.
GSM_2017_04_24-13-22.hex- Now the transmission of console commands to the GSM module is performed only if the test mode is enabled. Now there is no division into SMS commands and console commands, all existing commands can be sent both via SMS and via the console. Possibly fixed a bug with the Info command. Memory optimization. Occupied: 68% SRAM, 94% Flash Memory.
GSM_2017_04_25-20-54.hex- Fixed a bug where the ListConfig command changed the value of the last event. Now, when entering commands through the console, unnecessary SMS messages are not sent. Possibly fixed a bug with the Info command. Memory optimization. Occupied: 66% SRAM, 94% Flash Memory.
GSM_2017_04_30-12-57.hex- Temporarily enabled output additional information to the console when sending SMS messages and forming a response to the Info command. Possibly fixed a bug with the Info command. Memory optimization. Occupied: 66% SRAM, 92% Flash Memory.
GSM_2017_05_06-11-52.hex- Fixed with DelayBeforeAlarm function. Occupied: 66% SRAM, 93% Flash Memory.
GSM_2017_05_23-21-27.hex- Slightly changed the output of information to the console. Added support for port expansion modules on PCF8574A with addresses from 0x38 to 0x3f inclusive. Fixed c bug. Now the device reboots automatically after the FullReset, ResetConfig, ResetPhone commands and in case of successful execution of the MemTest command. Added WatchPowerTime command. Now it is possible to set the time after which an SMS message about disconnection will be sent external source nutrition. Occupied: 67% SRAM, 94% Flash Memory.
GSM_2017_05_26-20-22.hex- Fixed sensor memory initialization of the expansion board. The syntax of the AddPhone command has been changed. Added EditMainPhone command. The principle of operation of the notification system has been changed, when the sensor is triggered, sms messages will be sent first, after which voice calls will be made. Alarm sms messages will be sent to telephone numbers marked with "S" (SMS). Voice calls will be made to numbers with the sign "R" (Ring). Messages about turning off/on an external power source will be sent to telephone numbers with the sign "P" (Power). Added RingTime command. Now it is possible to set the duration of the alarm voice call, the parameter can have a value from 10 to 255 seconds. Now the RingOn/RingOff command globally enables/disables notification by voice calls. Added ResetSensor command. Occupied: 68% SRAM, 99% Flash Memory.
GSM_2017_06_02-17-43.hex- The "I" (Info) parameter has been added to the AddPhone and EditMainPhone commands, which is responsible for sms notification of arming or disarming the device. Now, after adding the main number, the device will automatically reboot. Now you can enter the same numbers into the device's memory. When adding the second and subsequent duplicate numbers, the attributes "M", "S", "P" and "I" will be automatically removed from them. These numbers will be used for repeated voice calls when the sensors are triggered. Fixed a bug with wry output to the console after executing the AddPhone command, now information is not displayed automatically after adding a number. Added Reboot command. Occupied: 69% SRAM, 99% Flash Memory.
GSM_2017_06_11-00-07.hex- Now again, when the contacts of the main reed switch are closed (the door is closed), the device flashes with a blue LED for 2 seconds, signaling the normal operation of the sensor, while the device is not taken into account when the device is armed or disarmed. The RingOn/RingOff commands have been removed. Now the device can be disarmed during an alarm call, now they are made in background. Occupied: 69% SRAM, 99% Flash Memory.
GSM_2017_07_04-21-52.hex- Now the Pause command does not send a reply SMS. Removed TestOn and TestOff commands. All numbers have the sign Management removed. Occupied: 68% SRAM, 96% Flash Memory.
GSM_2017_07_24-12-02.hex- Added ReedSwitchOn/ReedSwitchOff commands for monitoring the main reed sensor, now it can be enabled/disabled in the same way as a motion sensor. Fixed Info command bug. The TestOn and TestOff commands are back in the firmware. Occupied: 68% SRAM, 96% Flash Memory.
GSM_2017_07_26-10-03.hex- Added ModemID command. The modem is automatically detected only if the value of this parameter is equal to 0. After setting the parameter value to 0, the device is automatically rebooted. Occupied: 68% SRAM, 98% Flash Memory.
GSM_2017_08_03-22-03.hex- Now the alarm can control external devices. The analog output A3 is used for control (D17 is used as a digital one). The output logic level (+5V or GND) can be changed, after changing the level through the setting command, the device will automatically reboot. The duration of the external device control signal can be changed. Added commands ExtDeviceLevelLow, ExtDeviceLevelHigh, ExtDeviceTime, Open. Some changes in the logic of the control commands. Memory optimization. Occupied: 68% SRAM, 99% Flash Memory.
GSM_2017_08_10-12-17.hex- Removed commands SmsOn/SmsOff, ReedSwitchOn/ReedSwitchOff, PIROn/PIROff and everything connected with them. The DelayBeforeAlarm command has been replaced with extended commands. Changed the output of the Info command. Optimized the output of the ListConfig command to the console. Now any high or low level digital sensors, including reed switches, can be connected to pins D6 and A0. Pins D6 and A0 must be pulled to ground (GND) through a resistance of 10 (20) kOhm. If the sensor is set to a low level of operation (enabled in the reed switch mode), then the integrity of the circuit is checked. The logic level of operation on inputs D6 and A0 (+5V or GND) can be changed, after changing the logic level the device will be automatically rebooted. For each of the sensors (main, second, PCF-extension cards), when triggered, a specific time can be set, after which a notification will be made (sms and/or voice call). "PIR Sensor" renamed to "Second sensor". Fixed the operation of the expansion board, an error due to which the device always notified about the operation of sensors, regardless of whether the device was armed or not. Now you can select the operating mode in which the device can monitor the sensors of the expansion board both in the armed mode (GuardOn) and in the disabled mode (GuardOff). Added commands PCFForceOn/PCFForceOff, MainSensorLevelHigh/MainSensorLevelLow/MainSensorLevelOff, SecondSensorLevelHigh/SecondSensorLevelLow/SecondSensorLevelOff, MainDelayBeforeAlarm, SecondDelayBeforeAlarm, PCFDelayBeforeAlarm. Occupied: 68% SRAM, 99% Flash Memory.
*Subsequent firmware versions include changes to previous versions.
Arduino Nano v3 ports used
D4- output of the "alarm" pin, when the sensor is triggered, a high level signal is set on this pin
D5- inverted output of the "alarm" pin, when the sensor is triggered, a low level signal is set on this pin
D6- reed sensor. Starting from the GSM_2017_08_10-12-17.hex version, any digital sensors with a high or low response level, including reed switches, can be connected to pin D6. Pin D6 must be pulled to ground (GND) through a resistance of 10 (20) kOhm.
D7- connected to a voltage divider from an external +5V power supply. Upper arm 2.2 kΩ, lower arm 3.3 kΩ.
Voltage divider
D8- TX modem
D9- RX modem
D10- red LED
D11- blue LED
D12- green LED
Peripheral connection:
A0- Motion Sensor . Starting from the GSM_2017_08_10-12-17.hex version, any digital sensors with a high or low response level, including reed switches, can be connected to pin A0. Pin A0 must be pulled to ground (GND) through a resistance of 10 (20) kOhm.
A1- Input for external control. The alarm sets/disarms when a high level +5V appears at the input.
A2- Inverted input for external control. The alarm sets/disarms when a low GND level appears at the input.
A3- Configurable (+5V or GND) output for controlling external devices. When a control command is received, the value at this output changes depending on what was set for the set time period.
A4- SDA I2C
A5- SLC I2C
, to connect additional 8 sensors.
Control commands for hex firmware
Attention! Commands highlighted in bold can only be performed from the main number, as they are responsible for the configuration of the device. The remaining commands can be executed from numbers with the "Management" sign.
SMS - control commands are not case sensitive:
Add Phone- Add phone number. In total, no more than 9 numbers can be added + 1 main number, which is automatically stored in memory the first time you call the device after resetting to factory settings by commands reset phone or Full reset. Those. whoever called the device first after resetting it to factory settings is the “main” one, this number is entered in the first memory cell and it cannot be changed or deleted via SMS. It is not possible to add two identical numbers.
Command example:
Command syntax:
Add Phone- team
: - separator
5 - write to the fifth memory cell
+71234567890 - phone number
Up to version GSM_2017_05_26-20-22.hex:
a - "Alarm" parameter - SMS messages will be sent to numbers with this parameter - alarm messages and messages for arming or disarming.
Starting from version GSM_2017_05_26-20-22.hex:
m - "Management" parameter - alarm management is allowed
s - "SMS" parameter - an SMS message will be sent when sensors are triggered
r - "Ring" parameter - a voice call will be made when the sensors are triggered
p - "Power" parameter - an SMS message will be sent when the external power is turned on / off
i - "Info" parameter - an SMS message will be sent when arming or disarming
In the absence of the parameters "m", "s", "r", "p", "i", the phone is stored in memory, but is not used in any way.
Command syntax:
DeletePhone command
: - separator
+71234567891 - phone number
Command syntax:
EditMainPhone command
: - separator
srpi - parameters
Command syntax:
BalanceNum - team
: - separator
#103# - balance request number
L24 - The length (len) of the forwarded response is 24 characters, we cut off the spam from the balance request.
EditSensor:1+Datchik dvizheniya v koridore#h
Command syntax:
EditSensor - command
: - separator
1 - write to the first memory cell
+ - separator
Datchik dvizheniya v koridore - the name of the sensor, cannot exceed 36 characters, including spaces.
#h - A sign of a high logic level from the sensor, upon receipt of which an alarm will be triggered. If "#h" is missing, the alarm will be triggered when a low logic level is received from the sensor.
Command syntax:
SleepTime - team
: - separator
20 - 20 minutes of "sleep".
Command syntax:
AlarmPinTime - command
: - separator
30 - 30 seconds to enable/disable the alarm pin.
Command syntax:
DelayBeforeGuard command
: - separator
25 - 25 seconds before arming
Command syntax:
DelayBeforeAlarm - command
: - separator
40 - 40 seconds before sending an "alarm" notification
Command syntax:
WatchPowerTime - command
: - separator
5 - 5 minutes before sending an SMS message
Command syntax:
RingTime - command
: - separator
40 - 40 the duration of the call will be 40 seconds, after which the next subscriber will be called.
Command syntax:
ModemID - command
: - separator
2 - modem ID.
Command syntax:
ExtDeviceTime command
: - separator
5 - 5 seconds
ResetSensor- reset the parameters of the sensors of the port expander
resetconfig- factory reset
reset phone- deletion of all phone numbers from the memory
Full reset- Reset settings, delete all phone numbers from the memory, restore the default value of the BalanceNum command.
Ring On- enable notification by a call to the "main" number recorded in the first memory cell when the sensor is triggered. Removed since version GSM_2017_06_11-00-07.hex
Ring Off- turn off the notification by a call when the sensor is triggered. Removed since version GSM_2017_06_11-00-07.hex
SmsOn- enable sms notification when the sensor is triggered. Removed since version GSM_2017_08_10-12-17.hex
sms off- turn off sms-notification when the sensor is triggered. Removed since version GSM_2017_08_10-12-17.hex
PIRON- enable motion sensor processing
PIR Off- disable motion sensor processing
ReedSwitchOn- enable processing of the main reed sensor
ReedSwitchOff- turn off the processing of the main reed sensor
WatchPowerOn- turn on the external power control, an SMS message about the external power failure will be sent, provided that the alarm system is armed. Removed since version GSM_2017_03_01-23-37.
WatchPowerOn1- turn on the external power control, an SMS message about the external power failure will be sent, provided that the alarm system is armed.
WatchPowerOn2- turn on external power control, SMS message about external power failure will be sent in any case
Watch Power Off- turn off external power control
GuardButtonOn- control of the alarm by external devices or a button is enabled Removed starting from the version GSM_2017_04_16-12-00.
GuardButtonOn1- function placing or withdrawing protection by external devices or the button is turned on
GuardButtonOn2- function only performances armed by external devices or by the button is turned on, disarming is carried out by a call to the device or using an SMS command.
GuardButton Off- alarm control by external devices or by button is disabled
PCFForceOn- continuous monitoring of a group of all sensors of the expansion module
PCFForceOff- monitoring of a group of all sensors of the expander only when the device is armed
MainSensorLevelHigh- an alarm notification will be sent when a high level signal (+5 V) appears at the input (D6) from the sensor
MainSensorLevelLow- an alarm notification will be sent when a low level signal (GND) appears at the input (D6) from the sensor
MainSensorLevelOff- input sensor processing (D6) disabled
SecondSensorLevelHigh- an alarm notification will be sent when a high level signal (+5 V) appears at the input (A0) from the sensor
SecondSensorLevelLow- an alarm notification will be sent when a low level signal (GND) appears at the input (A0) from the sensor
SecondSensorLevelOff- input sensor processing (A0) disabled
MainDelayBeforeAlarm- the time after which an "alarm" SMS notification will be sent when the main sensor (D6) is triggered, if the alarm has not been disarmed during this period of time. The syntax is the same as the DelayBeforeAlarm command.
SecondDelayBeforeAlarm- the time after which an "alarming" SMS notification will be sent when triggered additional sensor(A0) if the alarm has not been disarmed within this period of time. The syntax is the same as the DelayBeforeAlarm command.
PCFDelayBeforeAlarm- the time after which an “alarm” SMS notification will be sent when the sensors of the expansion board (PCF8574) are triggered, if the alarm has not been disarmed during this period of time. The syntax is the same as the DelayBeforeAlarm command.
GuardOn - arm
GuardOff - remove protection
Open - external device control command
Info - check the status, in response to this message, an SMS will be sent with information about the number from which the security was turned on / off
Pause - pauses the system for the time set by the sleeptime command in minutes, the system does not respond to sensor triggers.
TestOn - the test mode is turned on, the blue LED blinks.
TestOff - the test mode is turned off.
LedOff - turns off the standby LED.
LedOn - turns on the standby LED.
Money - balance request.
ClearSms - Delete all sms from memory
Console commands (up to version GSM_2017_04_24-13-22.hex) - are entered in the Arduino IDE port monitor:
AddPhone - similar to the AddPhone sms command
DeletePhone - similar to the DeletePhone sms command
EditSensor - similar to the EditSensor sms command
ListPhone - output to the port monitor a list of phones stored in memory
ResetConfig - similar to the ResetConfig sms command
ResetPhone - similar to the ResetPhone sms command
FullReset - similar to the SMS command FullReset
ClearSms - similar to the ClearSms sms command
WatchPowerOn1 - similar to WatchPowerOn1 SMS command
WatchPowerOn2 - similar to WatchPowerOn2 sms command
WatchPowerOff - similar to WatchPowerOff sms command
GuardButtonOn - similar to GuardButtonOn sms command. Removed since version GSM_2017_04_16-12-00
GuardButtonOn1 - similar to GuardButtonOn1 SMS command
GuardButtonOn2 - similar to GuardButtonOn2 SMS command
GuardButtonOff - similar to GuardButtonOff sms command
Memtest - a test of the non-volatile memory of the device, all device settings will be reset, similar to the FullReset command.
I2CScan - search and initialization of supported devices on the I2C bus.
ListConfig - output to the port monitor of the device's current configuration.
ListSensor - output to the port monitor of the current sensor configuration.
UPD. When using motion sensor, to avoid false positives during modem operation, it is necessary to between pins GND and A0 Arduino put resistance thank you friend
AllowPhone = ("70001234501", "70001234502", "70001234503", "70001234504", "70001234505") - Numbers that are allowed to manage security.
AlarmPhone = ("70001234501", "70001234502") - Numbers for sending SMS notifications when a sensor is triggered and notifications about disarming or arming. The first number in the list will be called when the sensor is triggered if the RingOn command is executed, by default this option is enabled. This is done because sms messages may arrive with some delay, and the call should go through immediately.
If a call is received from an authorized number or an SMS message with the GuardOn/GuardOff command, then depending on current state protection, an SMS message about arming or disarming will be sent to the numbers listed in the AlarmPhone array, an SMS message will also be sent to the number from which the call came.
When the sensor is triggered SMS messages are sent to all numbers from the AlarmPhone array (list) and a voice call is made to the first number from this array.
Light indication:
The LED glows red - armed.
LED lights up in green- disarmed, enabled/disabled by SMS command LedOn/LedOff.
The LED is constantly blinking blue - it signals that everything is in order with the Arduino, the board has not hung, it is used exclusively for debugging, it is enabled / disabled by the TestOn / TestOff sms command.
* The LedTest() function is present in the code, it blinks with a blue LED, it is made only to monitor the Arduino, it blinks - it means it's working, it doesn't blink - it's frozen. Haven't hung up yet :)
Not relevant!
Connection of 2 or more sensors for open firmware (applies only to this firmware sketch_02_12_2016.ino)
To connect additional reed sensors, we use free digital pins D2, D3, D5 or D7. Wiring diagram with additional sensor on D7.
Necessary firmware changes
... #define DoorPin 6 // Input number connected to the main sensor int8_t DoorState = 0; // Variable for storing the state of the main sensor int8_t DoorFlag = 1; // Variable for storing the state of the main sensor #define BackDoorPin 7 // Number of the input connected to the additional sensor int8_t BackDoorState = 0; // Variable for storing the state of the additional sensor int8_t BackDoorFlag = 1; // Variable for storing the state of the additional sensor...
void setup() ( ... pinMode(DoorPin, INPUT); pinMode(BackDoorPin, INPUT); ...
... void Detect() ( // Reading values from sensors DoorState = digitalRead(DoorPin); BackDoorState = digitalRead(BackDoorPin); //Processing the main sensor if (DoorState == LOW && DoorFlag == 0) ( DoorFlag = 1; delay(100); if (LedOn == 1) digitalWrite(GLed, LOW); Alarm(); ) if (DoorState == HIGH && DoorFlag == 1)( DoorFlag = 0; delay(100); ) //Process additional sensor if (BackDoorState == LOW && BackDoorFlag == 0) ( BackDoorFlag = 1; delay(100); if (LedOn == 1) digitalWrite(GLed, LOW); Alarm(); ) if (BackDoorState == HIGH && BackDoorFlag == 1)( BackDoorFlag = 0; delay(100); ) ) ...
And one more thing:
1. It is better to use diodes designed for a current of 2 A, since the module infects with a current of 1 A and we still need to feed the Arduino and the modem with something. In this instance, 1N4007 diodes are used, if they fail, I will replace them with 2 A.
2. I used all the resistors for the LED at 20 kOhm, in order not to illuminate the entire corridor at night.
3. I also hung a 20 kOhm resistor on the reed sensor between the GND pin and the D6 pin.
That's all for now. Thank you for your attention! :)
I plan to buy +204 Add to favorites Liked the review +112 +243 an experienced person February 15, 2012 at 04:34 pmGood afternoon.
I would like to bring to your attention an alarm system for any premises - at home, a store, an office, which, upon detection of unwanted penetration, sends an email and calls mobile phone.
The uniqueness of the alarm system - all alarm management is carried out through the makridenkov.ru/signals website, from any device, Android, iPhone. Iron - self-made, on Arduino with a low cost of ~$45. The scheme and program of iron are open at the link. It's easy to repeat on your own.
General scheme of the alarm system.
As can be seen from the figure, the Arduino transmits all information from the sensors to the control site. On the site, depending on the status of “enabled” or “disabled”, the alarm is decided to raise the alarm or not.
The Arduino sends a “connection” signal every 20 seconds. This allows you to notify the owner of the premises about the situation if the attacker turned off the electricity or somehow disabled the alarm, broke it, or used any means of radio interference “gsm jammers”. That. notification is completely independent of the state of the iron in the room.
On the alarm management site, a schedule for moving around the room is built. That. we get a picture of which paths and places are popular. What for? For example, find out how often the sellers of your store visit the smoking room. Or for fun, ask the question, what does your spouse visit more often - a place for cooking or a computer with the Internet? These questions are answered by the movement schedule.
I want to demonstrate the data that we managed to collect alarms.
My travel schedule.
Usually, from the moving schedule, it is clear that one room in an apartment is enough when you live alone. However, today I moved around all the rooms, for some reason.
Funny observation, you can see exactly what time he went to work. And use this data as a tool for self-improvement punctuality.
P.S. Photos of the finished and working device.
This story ends.
All the best.
Tags: circuit, alarm, gsm, arduino, homemade,
They are special hardware platforms on the basis of which you can create various electronic devices, including and . Devices of this type are characterized by a simple design and the ability to program their operation algorithms. Thanks to this, the alarm system created using the Arduino GSM , can be maximally adjusted to the object that it will protect.
Arduinos are implemented as small boards that have their own microprocessor and memory. The board also contains a set of functional contacts to which various electrified devices can be connected, including sensors used for security systems.
The Arduino processor allows you to load a program written by the user yourself. By creating your own unique algorithm, you can provide optimal modes work security alarms for different objects and different conditions use and tasks to be solved.
Arduino modules are very popular among many users. This was made possible due to its simplicity and accessibility.
Programs for module control are written using regular C++ and additions in the form of simple functions for controlling input / output processes on module contacts. In addition, the free software environment Arduino IDE, which operates under Windows, Linux or Mac OS, can also be used for programming.
With Arduino modules, the procedure for assembling devices is greatly simplified. GSM alarm on Arduino can be created without the need for a soldering iron - the assembly takes place using a breadboard, jumpers and wires.
The main requirements that a do-it-yourself gsm alarm system created on Arduino must meet include:
To create an alarm you will need:
A distinctive feature of Arduino modules is the use of special expansion boards. With their help, all additional devices are connected to the Arduino, which are required to assemble the configuration of the security system. Such boards are installed on top of the Arduino module in the form of a "sandwich", and the corresponding auxiliary devices are connected to the boards themselves.
When one of the connected sensors is triggered, a signal is transmitted to the Arduino module processor. Using the downloaded user software, the microprocessor processes it according to a certain algorithm. As a result, a command to actuate an external actuator can be generated, which is transmitted to it through the corresponding expansion-interface board.
To provide the possibility of sending warning signals to the owner of a house or apartment that is being guarded, a special GSM module is connected to the Arduino module through an expansion board. It installs a SIM card from one of the cellular providers.
In the absence of a special GSM-adapter, a regular mobile phone can also play its role. In addition to sending SMS warnings about alarms and dialing, the presence of a cellular connection will allow you to control the GSM alarm on Arduino remotely, as well as monitor the state of the object by sending special requests.
"Note!
To communicate with the owner of the object, in addition to GSM modules, conventional modems can also be used, which provide communication via the Internet.
In this case, when the sensor is triggered, the signal processed by the processor is transmitted via modem to a special portal or site. And already from the site, automatic generation of warning SMS or mailing to the attached e-mail is carried out.
The use of Arduino modules will allow users to independently design GSM alarms that can work with different functional sensors and control external devices. Thanks to the possibility of using various sensors, the alarm functions can be significantly expanded and a complex can be created that will monitor not only the safety of the object, but also its condition. For example, it will be possible to control the temperature at the facility, detect water and gas leaks, shut off their supply in the event of an accident, and much more.
kayabaparts.ru - Entrance hall, kitchen, living room. Garden. Chairs. Bedroom