The data is sent to the module or received from the module though UART interface. And the power source should be able to deliver a peak current of 2A. The UART interface is established as shown in figure. The ground of controller and module must be connected for voltage reference. After all connections are done,we need to write a program for the microcontroller to exchange data with module. Since data exchange sequence between controller and module is really complex we will use libraries prewritten for the module.
|Published (Last):||15 August 2012|
|PDF File Size:||11.53 Mb|
|ePub File Size:||5.6 Mb|
|Price:||Free* [*Free Regsitration Required]|
To keep supply voltage safe at 4. You can add an external power supply to the shield with the 5. To use external power source, move the slider as shown above. Warning: The power supply should be able to source minimum 2A of surge current, otherwise the chip will keep shutting down.
The chip supports baud rate from bps to bps with Auto-Baud detection. One for stereo earphone and other for mono microphone. Mic: You can connect an external electret microphone to this jack. Earphone: You can connect earphones to this jack. The shield has two interfaces for connecting antenna viz. FL connector and a SMA connector. They are connected through a patch cord. The shield usually comes with a 3dBi GSM antenna and allows you to put the shield inside a metal case as long the antenna is outside.
Any activated, 2G full-size SIM card would work perfectly. The workings of the SIM card socket can take some getting used to. To unlock the latch, push the top part of the assembly, and then lift it up. Place the SIM card into the bottom part of the socket. Then fold the arm back into the body of the socket, and gently push it forward towards the LOCK position.
So there is no need for any separate RTC. This will keep the time even when the power is OFF. Your network provider may not support setting the time automatically. Power the shield using external power supply rated 5V 2A. Do not be tempted to connect this pin to 5V supply on Arduino, as the shield may not work due to the lack of supply current.
Also make sure you select the external power source with the slide switch next to the DC jack. Now connect all the ground in the circuit. Finally, connect the antenna, insert fully activated SIM card in the socket. There are two ways to do this with our shield. First, you need to solder the SMD jumper named R13 on the shield as highlighted in the image. Next, you need to connect D9 pin on the shield to the D9 pin on Arduino.
Finally, you need to add following custom function in your program. Below sketch will enable the Arduino to communicate with the SIM shield on serial monitor. Before we proceed with detailed breakdown of code, connect your Arduino to PC, compile below code and upload it to the Arduino.
AT — It is the most basic AT command. Higher is better. Of course it depends on your antenna and location! The second should be 1 or 5. Other than these two numbers indicate you are not registered to any network.
It also continuously reads the D7 pin Tx of shield if the shield has any responses. Before trying the sketch out, you need to enter the phone number. Search for the string ZZxxxxxxxxxx and replace ZZ with county code and xxxxxxxxxx with the 10 digit phone number.
So, we need to send 26Dec 1AHex once we send a message. This sketch is very useful when you need to trigger an action when a specific SMS is received. For example, when the Arduino receives an SMS, you can instruct it to turn on or off a relay. You got the idea! This way you can tell the SIM shield either to forward newly arrived SMS messages directly to the PC, or to save them in message storage and then notify the PC about their locations in message storage.
The second field is the name of person sending SMS. Third field is a timestamp while forth field is the actual message. This is not because of a faulty code. Your SoftwareSerial receive buffer is getting filled up and discarding characters. You are not reading fast enough from the buffer. The simplest solution to this is to increase the size of the SoftwareSerial buffer from its default size of 64 bytes to bytes or smaller, depending on what works for you.
The semicolon ; modifier at the end separates the dial string into multiple dial commands. All but the last command must end with the semicolon ; modifier.
ATH — Hangs up the call mySerial. Yet, you may find this sketch very useful, when you need to trigger an action when a call from specific phone number is received. ATH — Hangs up the call.
Using the SIM900A GSM Module with the Arduino