Sunday 19 January 2014

Gizduino (Arduino Clone) & GSM Shield Integration Test (Receive SMS)

Hello There! This topic is about my integration test between the GSM/GPRS Shield with the Gizduino for my research proposal. Gizduino is basically and Arduino Clone that I bought from E-gizmo. (Gizduino, an Arduino clone)


The type of Gizduino I used is the v4.0 which is basically the latest KIT they have as of January 2014. The type of microcontroller it comprises is ATmega 168 and ATmega 328, but for this project, I bought the ATmega 328 since it has a 

higher RAM.

The image shown below is the Gizduino (LEFT) and the GSM/GPRS Shield (RIGHT).




In the next image, I mounted the GSM/GPRS Shield to the Gizduino.




In order for this to work, I downloaded an Arduino Sketch Software. The Arduino Software is free, open source, and available for Windows, Mac OS and Linux. You can download the Arduino IDE from their website.



The image shown below is the Arduino Sketch Environment.



Here is the link for learning more about the Arduino Sketch Environment

Here is the program code I have made:

#include "SIM900.h"
#include <SoftwareSerial.h>
#include "sms.h"
SMSGSM sms;
char number[]="ur cellphone number here";
char message[180];
char pos;
char *p;

void setup()                      //declaring inputs and outputs
{
 Serial.begin(9600);              //initiate gizduino witha baud rate of 9600
 pinMode(7, OUTPUT);              //output for turning LED ON or OFF

 if (gsm.begin(9600))             //condition if gsm is initialized
 Serial.println("\nstatus=READY");     //displays "ready" on the serial monitor if gsm is ready
 else Serial.println("\nstatus=IDLE"); //otherwise displays "idle" on the serial monitor if gsm is not found
};

void loop()     //looping of the program
{
       pos=sms.IsSMSPresent(SMS_UNREAD);  //save to variable if there is an SMS
       Serial.println((int)pos);          //display position number (a.k.a index) of the message
       if((int)pos>0&&(int)pos<=20)       //if message from 0-20 is found
              {                   
               Serial.print("Message Received, INBOX=");  //display an output on the serial monitor
               Serial.println((int)pos);                  //display the position/index of the message
               message[0]='\0';                           //display '0' if no messages found
               sms.GetSMS((int)pos,number,message,180);   //get position/index, number of sender, and text message
               Serial.println(message);                   //display the text on serial monitor
               if(strstr(message, "ON")) digitalWrite(7,HIGH);   //if message 'ON' is received, LED is ON
               if(strstr(message, "OFF")) digitalWrite(7,LOW);   //if message 'OFF' is received, LED is OFF
               sms.DeleteSMS((int)pos);                          //after reading, delete SMS
                }
 delay(5000);                             //delay of 5seconds per loop
};

NOTE:
-->But before you would be able to run this program, download the GSM_Library and paste it in the Arduino libraries located on your Arduino folder in order to have this program running successfully.

-->Also, be sure to set the mode of the GSM/GPRS Shield to USART, and not UART. There is a hardware switch located on the top of the GSM/GPRS Shield Board.

Once the program is uploaded, you are good to GO!

A video shown below is the sample actual presentation of the implemented program I made.
(This was my first time to use an Arduino Kit and Arduino Sketch Environment)





The next image shown below is the combined circuit of the GSM/GPRS Shield and the Gizduino with their own regulated power supply from a 12VDC input into a 5VDC and a 9VDC output. The 5VDC source would be plugged into the GSM/GPRS Shield and the 9VDC source would be plugged into the Gizduino. 

GSM/GPRS Shield and Gizduino Circuit combined

Powered ON image of the GSM/GPRS Shield and Gizduino Circuit combined

The regulator transistors that were used are the LM7809 and the LM350. LM7809 is a 1A/9V regulator for the Gizduino source, since the Gizduino must have an input from 8VDC-10VDC. The GSM/GPRS Shield is powered by the LM350. The LM350 is an adjustable voltage regulator from 3VDC-33VDC of 3A. I created a circuit in such a way that I am able to produce an output of only 5VDC for the GSM/GPRS Shield. (You can check the LM350 pdf for the circuit and its formula for the desired output voltage you would prefer to have: LM350 Datasheet)

Here is an actual video footage in testing this combined circuit:



Project made by: Kirk Benedict P. Macaraeg