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 this time 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]
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:
HALT!! Please make sure that your SIM Card is unlocked (not protected by a 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….
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.
Can befound below (Wiring 1).
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.
LibrariesNo external library is required for this, Software Serial, but it’s already with the Arduino default libraries.
CodeCan be found below (Code 1).
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.
ResultSo the project is about a tripwire alarm which call your phone number whenever someone passes through it.
I’ve choosed 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 51,Sharp IR… Whatever suits you.
Wiring can be found below (Wiring 2).
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.
LibrariesJust like above, no external one is needed.
CodeCode can be found below (Code 2).
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.
ResultWell that's all folks :D
Comments
Please log in or sign up to comment.