Arduino: GSM module set up the required components
A GSM module set up, you need first of all, of course, a GSM-module. All of the components we will show you also, in the gallery at the end of the article.
- In addition, you need an Arduino, and a power supply, a USB cable and three Male-Male-Jumper-cable.
- In order for the module to properly use, you need a SIM card.
GSM module: SIM card & software serial activate.
First of all, you need to take some precautions on the GSM module.
- First, on the back of the GSM-module, SIM-card a. Ensure that this is not protected with a PIN.
- Also, you need to re-connect the two black connectors of the GSM module. How this should be correctly arranged, you will see in the picture. In order to make sure that the module "software serial" is used for this project is important.
Arduino library for the module to install
So you can use the GSM module correctly, you need a suitable library.
- First download this library from GitHub to download.
- Then extract the ZIP file. In the extracted folder you will find another folder with the same name. Cut this folder and paste it in the libraries folder of the Arduino IDE. You can find this at "C:\Users\Ihr_Benutzername\Documents\Arduino\libraries".
- Rename the folder in addition, for the sake of Clarity in "GSMSHIELD".
- Then edit the file "GSM.cpp" and change in line 27 and 28 the "_GSM_TXPIN_" in 7 and "_GSM_RXPIN_" in 8.
- They also change in the file "GSM.h" in line 45 and 46, the value for "GSM_ON" in 9 and the value in "GSM_RESET" in 6.
- Do not forget to save the files at the end.
Arduino: Code upload
Now start the Arduino IDE. In the case of the example codes use appropriate Codes for the GSM should show up module.
- We choose in this example, a Code called "GSM_GPRSLibrary_SMS". Here we remove the two slashes in the line 40 and 41, to the comments into the correct commands.
- In addition, is registered in the command in line 40, the own number (with country code). Also, the content of the message can be edited here: "if (sms.SendSMS("+49123456789", "Hello, CHIP!"))"
- Finally, the Code is loaded on the Arduino, and this disconnected from the PC.
GSM module to Arduino connect
Next, you need to connect the GSM module is connected correctly to the Arduino.
- Three Pins of the GSM module must be connected with Pin 7 and 8 and a Ground on the Arduino. The details you see in the picture.
Arduino: GSM-module
Finally, you can test the GSM module.
- First of all, connect the power supply (power supply) to the GSM module and move the switch.
- Then press for 3 seconds the PWRKEY button on the side.
- As soon as the LED flashes slowly, you can connect the Arduino to the PC, so this is now started.
- Open recently with [Ctrl] + [Shift] + [M] to the serial Monitor.
- A few seconds later, you should receive a new SMS.
In the next practical tip we show you how to make a light sensor with an Arduino to build can.