Sponsored by: DigitSpace
Product used: SIM800L Module Replace SIM900A GSM GPRS 5V Serial with Antenna
If you're looking for send and receive SMS you may check this.
Hello, and welcome to another easy and step-by-step tutorial, this time we’re about to see how to send SMS/Text from the Arduino Uno board to your phone using SIM800L module, we gonna see how to send a simple text, then we’re going to send some data acquired from the DHT11.
HALT !!!! Don’t forget that this type of modules require a SIM card, micro-Sim size, and make sure that the card doesn’t have a “Pin Code” put it in your phone first and remove the “SIM Lock”, and have enough credit to be able to send a SMS, this depends on your country providers.
We can now continue… There are several versions of the module but I used this one:
It worked very well, and very easy, it can be powered directly from the Arduino, but I don’t recommend that, it’s sketchy… It’s better to power it using a Lithium battery and a converter.
This one comes also with a 3dBi antenna and its uFL-SMA converter, and it improves the signal reception and makes it a lot better.
It has 7 pins, I used two for power (5V/GND), and then TXD/RXD/GND for the UART communication, you may need or not to add the GND, it depends on your wiring.
You can communicate with the module using some AT Commands, we gonna see some of them.
Here’s the full list of commands.
N.B: For the power I’ll be using a 7.4V Li battery with a buck converter (actually a buck-boost), it’s more stable.
Notice also that the module has 2 LEDS, one for Power (ON/OFF), and one that blinks:
- Blinks every 1s: Means it’s looking for signal reception.
- Blinks every 2s: Means it’s communicating GPRS Data.
- Blinks every 3s: Means it’s connected to network and ready.
In the test 1 we’re going to wire the module with Arduino Uno board, add a push button, the idea is that when we press the button, the Arduino will send a simple (String) SMS to a phone number via the SIM800l.
WiringWiring 1 (below)
Wiring is easy, the Arduino is also powered by the “battery” or the 5VDC source, the button is always on HIGH level because I’m using the internal pull up, when pressed it goes low… then RX/TX with TXD/RXD (from Sim800l).
LibrariesNo special library is required… only SoftwareSerial and it’s already installed
CodeCode 1 below. The code contains comments for your help.
ResultThe button defines the general case… You can use any trigger you want: Tripwire, Sensor threshold….
Test 2The test number 2 is really similar to the first one, now instead of a simple message, we’ll be able to send some sensor value, and here I’ve chosen the DHT11, because it’s very easy and a classic.
WiringWiring 2 below
As the first one, now we add the DHT11 and its data pin is on pin 8
LibrariesThe only library required here is the DHT 11 one: Download from Github Install it if you didn’t have already.
CodeCode 2 below with comments.
ResultHere I add the Serial monitor functions in a single function “Serialcom”, you can communicate with the module and test all the AT Commands you want when you are in standby mode, but when the button is pressed, a SMS will be sent to the phone number containing the Temperature and Humidity current values.
Well, that’s it for the tutorial, I hope you find it useful, now you can send easily a SMS to your phone… Now you only have to chose which information to send and what’s your prefered trigger or threshold. Remember to subscribe to the channel if you want to support.
Comments