Skip to content

Arduino SIM800L – Dial phone numbers & LASER Tripwire GSM Alarm project [DigitSpace.com]



Sponsored by: DigitSpace
Product used: SIM800L Module Replace SIM900A GSM GPRS 5V Serial with Antenna

Hello there and welcome to another tutorial sponsored by DigitSpace, and it’s about the SIM800L again, the previous article was about sending SMS/Text (Simple and sensor values) to your phone, but this time it’s about dialing phone numbers using the same module, and a little project which is a LASER tripwire GSM Alarm.

Make sure to check this tutorial about the module first: Send SMS/Text from Arduino using SIM800L GSM/GPRS Module [DigitSpace.com], and if you want to send and receive SMS between your Arduino and your phone make sure to check Send/Receive SMS using SIM800L with Arduino + DHT11/MLX90614 [DigitSpace.com]

So to sum up we gonna dial numbers, not make a full phone call, because this module doesn’t have pins for Speaker/Mic like the other version:

SIM800l module

 

HALT!! Please make sure that your SIM Card is unlocked (not protected by a pin code, you can do this by inserting it in your phone and disable the pin code) and that it has enough credit to be able to make a phone call/Send SMS depending on your mobile operator.

N.B: I’m powering the module using a 7.4V Li battery with a buck converter, it could be powered directly from the Arduino but it’s sketchy….

Battery + converter.jpg
Battery + converter

Test 1

So in the test #1 all we have to do is wire the module and dial a phone number using the Serial monitor of the Arduino IDE.

  • The main command for dialing a number is “ATD+xxxxxxxxxx;” where the xx.. stand for your phone number including the country code.
  • The other command is “ATH” to hang up/stop the phone call, if not used the call will end after a certain delay.

Wiring

Wiring1_bb.png
Sim800l wired with Arduino UNO and eternal power source

This is the basic wiring of the module, and the Arduino is powered via USB, it could be powered with the battery too, but I’m in need of the Serial monitor to be able to send AT commands to the module.



Libraries

No external library is required for this, Software Serial, but it’s already with the Arduino default libraries.

Code

You can download the code from here or check below, this code is not something special, it just permits the communication between the module and the PC, you’ll be able to send commands to the module and check the feedback.

Result

After wiring your module and plugging the Arduino board, you can first type just “AT” to check if the module and communication are working, then you can proceed with the ATD command.

Test 1_1
Type the command as said in the serial monitor (the AT is just for check)

After using the ATD command + the phone number press enter, the phone should start ringing.

Test 1_2
Arduino is calling



ATH command is to hang up.

Test 1_3
“ATH” command to hang up

GSM tripwire Alarm Project

So the project is about a tripwire alarm which call your phone number whenever someone passes through it.

I’ve chosen a LASER + LDR, you can use anything you prefer to detect presence for example PIR, Doppler Radar, or some classic modules like proximity sensors HC-SR04, FC 51Sharp IR… Whatever suits you.

KY-008 LASER module and LDR

Don’t forget to add a resistor to the LDR, I’ve used 1kO.

So as you know the LDR (Light Dependent Resistor) changes the value according to light, if there’s light it lowers the resistance, otherwise (when darker) it gets bigger, so when used with a resistor it will change the voltage value that we can read using the Arduino Analog Pin.



Wiring

Wiring2_bb.png
LASER tripwire phone alarm wiring

So here as you can see the SIM module is powered with the battery, but for the rest they are powered by the Arduino plugged in the PC, you can of course power the Arduino using the battery all you have to do is add a wire between the 5V of the Source with the 5V of the Arduino.

Libraries

Just like above, no external one is needed.

Code

The code is meant to work without the Serial monitor, but I’ve add some functions and kept the wiring to use with Serial monitor and check the LDR value. Download the code here or check below.



Result

The serial monitor is constantly displaying the LDR value and as you can see in the last few lines when I obstructed the LASER beam the value dropped significantly, you can use this test to set your threshold.

Test 2_1
Something prevent the light from reaching the LDR, also the values are shown in the serial monitor

When the value dropped below the threshold, which mean something passed through the LASER, the Arduino automatically called the set phone number.

Test 2_2
Will trigger the call automatically to the phone number in the code

Well that’s all folks, thanks a lot to the video sponsor.

Sponsor

Yassine View All

Automation and Electrical Engineer, Electronics amateur trying to share my little projects.

3 thoughts on “Arduino SIM800L – Dial phone numbers & LASER Tripwire GSM Alarm project [DigitSpace.com] Leave a comment

Leave a Reply

Discover more from SURTR TECHNOLOGY

Subscribe now to keep reading and get access to the full archive.

Continue reading