loading

Hello Friends,

In this instructable I will introduce you my Lightweight Arduino GSM Mobile phone. The lightweight mobile is capable of the following National/International features:

  1. Make Calls.
  2. Receive Calls.
  3. Send SMS.
  4. Receive SMS.

In this project, I used the GSM SIM900A module to connect to the mobile network. It is an adorable all-in-one cellular module that lets you add voice, SMS and data to your projects. It works on frequencies 900/1800MHz and comes with the friendly RS232 which can be easily interfaced with any MCUs, the baud rate is adjustable from 9600 – 115200 through AT Commands.

I also used a display to visualize GUI interfaces, I selected an LCD touch display by Nextion, trust me it is really an awesome display. Nextion adopts a new and easy way to interface any of your projects through UART. Its easy-to-use configuration software (Nextion Editor) allows you to design your own interfaces using GUI commands and makes the pieces of your development effortless, in turn you can save lots of program space in your MCUs. Thanks to Nextion!!..

On its own, the GSM module and the Nextion touch display can’t do anything. It requires a microcontroller to drive it. At the heart is an Arduino Uno to drive the lightweight GSM Mobile phone, which can send and receive commands over its RX/TX pins.

If you are interested making yours, this guide will show you how to build and upload the source codes to get your project up and running. This is a fairly straightforward project, but an intermediate one especially when you take into account the complexity of the codes.

This project is also a great example of how to use arduino especially for string & character handling, as well as for you to get acquainted with the new Nextion TFT Intelligent LCD Touch Display and using AT commands for the GSM module. Hope you will enjoy and find my post interesting. Now let us make it.

Step 1: Part Required:

Here’s the needed parts for this example.

  1. Arduino Uno.
  2. SIM900A GSM module.
  3. Nextion TFT Intelligent LCD Touch display.
  4. SIM Card.
  5. Connecting Wires.

There’s also some optional accessories.

  1. External Mic & Speaker.
  2. Stylus.

Step 2: Wiring:

Connect the GSM module and the Nextion Display to your Arduino by following the appropriate steps below.

  • Nextion +5V to Arduino VDD_5v.
  • Nextion RX to Arduino pin_11.
  • Nextion Tx to Arduino pin_10.
  • Nextion GND to Arduino GND_0v.
  • GSM Rx to Arduino pin_1.
  • GSM TX to Arduino pin_0.
  • GSM GND to Arduino GND_0v.

NOTE: if your SIM card is locked with a PIN code. You can either disable the PIN or enter the PIN via the ‘AT+CPIN’ command just before you can connect the network. Example: “AT+CPIN=1234”.

Step 3: Setup:

Next, I will show you how to prepare the .HMI (Human Machine Interface) for the Nextion display, without forgetting the Arduino sketch.

Tools Required:

Program the Nextion display:

To make Nextion display the interfaces, the first thing to do is to design an HMI file in the Nextion Editor. This editor allow you to design your interfaces using plug-and-play components like (Text, button, progress bar, pictures, gauge, checkbox, radiobox and much more), for which you can set codes & properties for each of these components.

In this project, I used 8 pages to make the interactive GUI. Most of the icons which I used for the implementation are the freely available Android Icons and can be downloaded from this [link]. I used paint.net (Open Source editor) to edit/resize all the pictures and to create the invert of the icons, to give the feeling of touch when components like buttons are pressed. Touch events like (Press & Release) are also included when components are touched. If you are interested to acquire more about Nextion Instruction Set you can visit the wiki page here.

Programming the Nextion display is just as easy as abc but a time consuming process especially when implementing complex features like numpad & keyboards. However, I wish to mention that at the end you will really enjoy the outcomes, the end results are enormously awesome like above pictures.

Steps:

  1. Load the .HMI file into the editor. Scroll down to find my GitHub repository section of this page.
  2. Compile the .HMI file (just under the menu bar).
  3. Go to file > Open build folder > copy the .tft file > paste into SD card.
    • Note: make sure the SD card is formatted to FAT32.
  4. Once copied, insert the SD card into the Nextion and then power_on.
  5. Wait for the .tft to upload.
  6. Power_off the Nextion, securely remove the SD card and then again power_on.
  7. Voila!, you should see your new interfaces on the Nextion Display.

Simulation:

Nexiton also provide a handy simulator to test/debug the .HMI files well beforehand you connect your display to your MCUs. The “Instruction Input Area”, allows you to insert commands such as change page, hide/show picture, enable/disable button, enable/disable/insert text & much more to the Nextion display. On the other side, the “Simulator Return Data” gives you the responses from touch events when components on the Nextion display are pressed or even for the commands triggered to the Nextion.

Step 4: Program the Arduino:

The Ardiuno Uno is the brain of the whole mobile system, the Arduino acts as a middleware which interfaces the GSM Module and the Nextion display.

For this project, I did not used any Nextion libraries, as it seems difficult to understand and lack documentations and also my skectches does not compiled when using Nextion libraries, hope to get improvements soon. As such, I decided to move on without the use of libraries, seems to be difficult right? Believe me it’s not.

To get the complete code, simply scroll down to find my GitHub repository section of this page. Copy the code, and paste it into a new sketch in the Arduino IDE. Save it, upload it to your Arduino.

That’s all for the software part!! Compile the code. If there are no errors, congratulations your devices is now configured to automatically connect to the cellular Network through the GSM module. Open the Serial monitor, you should see the AT command logs for each events triggered from the Nextion Display.

Step 5: Source Codes:

You can download the complete code of this project from my GitHub by clicking this link.

Step 6: Demo:

Step 7: BONUS:

By default, the GSM module has an SMS buffer size of 20. Unfortunately, we cannot display all the 20 SMS at once on the Nextion display, getting buffer overflow while compiling Nextion code. As such, I have programmed the Nextion display in such a way to present only 10 SMS.

If 10 or more SMS are present on the GSM buffer, the Low memory warning icon will be displayed on the Nextion display, warning you to delete previous SMS to view the new SMS in an incremental way.

I hope you like my post and hope this tutorial helps you find a way to implement your own Arduino GSM Mobile and yes please share any of your innovations.

Have Fun.. Cheerz… Thanks for reading and sharing.

-Avishek Hardin

<p>Great project! I forgot about the GSM shield I had sitting in my parts box. I recall why I never used it much - I had problems finding a SIM card that would work with arduino's and the GSM shield.</p><p>Would you please share one more bit with us? What brand sim do you use?</p><p>Thanks for sharing your project!</p>
<p>Hello Electron_flow, </p><p>thanks for watching.</p><p>The sim I used in this project is actually a Nano SIM which supports (LTE, 3G, 2G) and my Mobile Operator is Emtel.</p><p>Note: The SIM card slot in the GSM module accepts only Normal SIM, as such, I used a &quot;SIM card Multi-Adaptor&quot; to turn the Nano SIM into a Normal SIM, refer to below image.</p><p>You can select any SIM card from your favorite Mobile Operator available in your region, no matter if it is a prepaid or postpaid, both should actually work.</p><p>Additionally, you need to confirm with your Mobile Service Provider if they support GSM(2g) network, if you reside in country other than USA then by default its YES.</p><p>Thanks &amp; Enjoy :-)</p>
<p>There is no Arduino file (.ino) in your GitHub collection.</p>
<p>Hello grayl, thank you. you can use &quot;lightweight arduino gsm mobile.h&quot;. Open it with any of your favorite editor, copy &amp; paste the codes. Enjoy.</p>
<p>Awesome project!</p>
<p>Hello Mderton, thank you..</p>

About This Instructable

1,380views

36favorites

More by Avishek Hardin:Lightweight Arduino GSM Mobile Phone. Arduino GPS Speed Camera Detector Arduino - DHT11 and OLED V3.0 
Add instructable to: