Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need help with sim900 and arduino uno

Status
Not open for further replies.

vishalvyas

Newbie level 1
Joined
Dec 14, 2013
Messages
0
Helped
0
Reputation
0
Reaction score
0
Trophy points
0
Activity points
27
i am a total new bee for arduino projects.
i am building a project to control relays with gsm/gprs sim900 module and arduino uno board for my finals, and i am not getting it right.
please help me, and also the connection from sim900 to arduino. i have connected tx of sim900 to rx of arduino and rx of sim900 to tx of arduino, 5v from sim900 to arduino and ground to ground. do i need any other chip in between the connection ?. i also got a code from https://www.edaboard.com/threads/284929/
the code i tried is ...

SoftwareSerial cell(2,3); //Create a 'fake' serial port. Pin 2 is the Rx pin, pin 3 is the Tx pin.

int led1 = 9;
int led2 = 10;
int led3 = 11;
int led4 = 12;

void setup()
{
// prepare the digital output pins
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
digitalWrite(led3, LOW);
digitalWrite(led4, LOW);
//Initialize GSM module serial port for communication.
cell.begin(9600);
delay(30000); // give time for GSM module to register on network etc.
cell.println("AT+CMGF=1"); // set SMS mode to text
delay(200);
cell.println("AT+CNMI=3,3,0,0"); // set module to send SMS data to serial out upon receipt
delay(200);
}

void loop()
{
//If a character comes in from the cellular module...
if(cell.available() >0)
{
inchar=cell.read();
if (inchar=='#')
{
delay(10);
inchar=cell.read();
if (inchar=='a')
{
delay(10);
inchar=cell.read();
if (inchar=='0')
{
digitalWrite(led1, LOW);
}
else if (inchar=='1')
{
digitalWrite(led1, HIGH);
}
delay(10);
inchar=cell.read();
if (inchar=='b')
{
inchar=cell.read();
if (inchar=='0')
{
digitalWrite(led2, LOW);
}
else if (inchar=='1')
{
digitalWrite(led2, HIGH);
}
delay(10);
inchar=cell.read();
if (inchar=='c')
{
inchar=cell.read();
if (inchar=='0')
{
digitalWrite(led3, LOW);
}
else if (inchar=='1')
{
digitalWrite(led3, HIGH);
}
delay(10);
inchar=cell.read();
if (inchar=='d')
{
delay(10);
inchar=cell.read();
if (inchar=='0')
{
digitalWrite(led4, LOW);
}
else if (inchar=='1')
{
digitalWrite(led4, HIGH);
}
delay(10);
}
}
cell.println("AT+CMGD=1,4"); // delete all SMS
}
}
}
}
}

i have connected 4 leds at digital pinout of ardiuno uno at pin 9,10,11,12 and same connection goes to the relay through a transistor.

is this code correct? and if yes then i am not getting any results….
i have to submit my project before jan 10 2014…. please help me.
i don't know the name of the company of my boards so i am attaching pictures of the same


my mail address is
vvyasmum92@gmail.com
detailed picture of the boards are here…
https://skydrive.live.com/redir?res...1&authkey=!AM107_XxMCGGX6o&ithint=folder,.jpg
https://sdrv.ms/19J5K3w

please help….
thanks…
 

Even i m doing the same project.The connections are correct.TX of Arduino goes to RX of gsm .RX of Arduino goes to TX of gsm.Make the ground common.No other chips are required.Even i m struggling with the software.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top