+ Post New Thread
Results 1 to 17 of 17
  1. #1
    Member level 2
    Points: 355, Level: 4
    MyMelon's Avatar
    Join Date
    May 2012
    Posts
    44
    Helped
    0 / 0
    Points
    355
    Level
    4

    Arduino Connection Problem

    How to interface Arduino to GSM SIM900D? do i need to use RS232 to ttl converter to view the activity in the hyperterminal? thanks

  2. #2
    Member level 3
    Points: 2,091, Level: 10

    Join Date
    Apr 2005
    Posts
    66
    Helped
    7 / 7
    Points
    2,091
    Level
    10

    Re: Arduino Connection Problem

    Are you trying to connect plain chip to Arduino? If yes, then you don't need level converter. Just connect Arduino Tx and Rx pins to modem Rx and Tx pins and start playing with. But hardly you will get a signal without antenna. Better look for a Arduino Shield that has everything you need.


    1 members found this post helpful.

  3. #3
    Banned
    Points: 23,048, Level: 36

    Join Date
    Dec 2012
    Location
    Bangalore, India
    Posts
    4,294
    Helped
    830 / 830
    Points
    23,048
    Level
    36

    Re: Arduino Connection Problem

    If you want to see serial data in PC Hyperterminal then Yes, you need a RS232 Converter (MAX232). You connect your Arduino Rx and Tx pins to MAX232 on one side and then connect a DB9 connector to the o/p of MAX232 circuit. See MAX232 Microcontroller and PC interface circuits.


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  4. #4
    Member level 2
    Points: 355, Level: 4
    MyMelon's Avatar
    Join Date
    May 2012
    Posts
    44
    Helped
    0 / 0
    Points
    355
    Level
    4

    Re: Arduino Connection Problem

    @MinDaugasu When i connect GSM to Arduino directly the hyperterminal hangs.

    @Jayan i know how to connect arduino to Rs232 but how will i connect GSM to arduino? tnx



  5. #5
    Banned
    Points: 23,048, Level: 36

    Join Date
    Dec 2012
    Location
    Bangalore, India
    Posts
    4,294
    Helped
    830 / 830
    Points
    23,048
    Level
    36

    Re: Arduino Connection Problem

    Does your GSM has Rx and Tx pins which are TTL i/p and o/p? If yse you can connect it to Rx and Tx pins of Arduino. If your Arduino doesn't have 2 pairs of Rx and Tx then I think you have to use Soft_UART library and connect your GSM Rx and Tx pins to any pins of Arduino. The software uart library is necessary. can you post the datasheet of your GSM Module?

    Are you doing something similar to this http://tronixstuff.wordpress.com/201...ular-part-one/

    https://www.edaboard.com/thread236063.html

    You have to use UART0_Rx and UART0_Tx pins of SIM900D to connect to Arduino.

    http://www.cooking-hacks.com/index.p...uadband-sim900
    Last edited by jayanth.devarayanadurga; 26th January 2013 at 13:19.


    1 members found this post helpful.

  6. #6
    Member level 2
    Points: 355, Level: 4
    MyMelon's Avatar
    Join Date
    May 2012
    Posts
    44
    Helped
    0 / 0
    Points
    355
    Level
    4

    Re: Arduino Connection Problem

    GSM module SIM900D


    Arduino(clone)


    http://narobo.com/products/DroneCell/datasheet/ATC.pdf



    •   AltAdvertisement

        
       

  7. #7
    Banned
    Points: 23,048, Level: 36

    Join Date
    Dec 2012
    Location
    Bangalore, India
    Posts
    4,294
    Helped
    830 / 830
    Points
    23,048
    Level
    36

    Re: Arduino Connection Problem

    Does both your boards work at 5V or 3.3V? If both boards work at the same voltage levels then just connect the Rx to Tx and Tx to Rx. That is cross connection betwwen the boards.


    1 members found this post helpful.

  8. #8
    Member level 2
    Points: 355, Level: 4
    MyMelon's Avatar
    Join Date
    May 2012
    Posts
    44
    Helped
    0 / 0
    Points
    355
    Level
    4

    Re: Arduino Connection Problem

    thank you jayanth :) it works now

    i have another problem. i try different programs and when i compile theres an error like this samp.cpp:1:20: error: SIM900.h: No such file or directory.
    i downloaded a file GSM directories and i put it in the Arduino Libraries but i dont work.



    •   AltAdvertisement

        
       

  9. #9
    Banned
    Points: 23,048, Level: 36

    Join Date
    Dec 2012
    Location
    Bangalore, India
    Posts
    4,294
    Helped
    830 / 830
    Points
    23,048
    Level
    36

    Re: Arduino Connection Problem

    Do you have the file SIM900.h? What is your include statement? Is it
    Code:
     
    
    Code C - [expand]
    1
    
    #include <SIM900.h>
    or
    Code:
     
    
    Code C - [expand]
    1
    
    #include "SIM900.h"
    ?

    If you have used the second type then you should put SIM900.h file in your project folder.


    1 members found this post helpful.

  10. #10
    Member level 2
    Points: 355, Level: 4
    MyMelon's Avatar
    Join Date
    May 2012
    Posts
    44
    Helped
    0 / 0
    Points
    355
    Level
    4

    Re: Arduino Connection Problem

    this one #include "SIM900.h", what is the difference between the 1st code to the second? why the other have like this < >



  11. #11
    Banned
    Points: 23,048, Level: 36

    Join Date
    Dec 2012
    Location
    Bangalore, India
    Posts
    4,294
    Helped
    830 / 830
    Points
    23,048
    Level
    36

    Re: Arduino Connection Problem

    If you use the first method it will search for the file in library folder like INCLUDE folder. If you use the second type it will search for the file in Project folder. Do you have SIM900.h file on your system?



  12. #12
    Member level 2
    Points: 355, Level: 4
    MyMelon's Avatar
    Join Date
    May 2012
    Posts
    44
    Helped
    0 / 0
    Points
    355
    Level
    4

    Re: Arduino Connection Problem

    i get some files in arduino libraries and put inside my project folder but still occuring the errors.
    is it lacking of files?




  13. #13
    Banned
    Points: 23,048, Level: 36

    Join Date
    Dec 2012
    Location
    Bangalore, India
    Posts
    4,294
    Helped
    830 / 830
    Points
    23,048
    Level
    36

    Re: Arduino Connection Problem

    I don't see a warning related to SIM900.h
    The warning shown are 1. "'delay' was not declared in this scope"
    2. "only initialized variables can be placed into program memory area"
    3. "unused variable response"

    You have to include a header file like delay.h, Initialize all variables with 0 or with their starting values, variable response is not used in the code so you can remove it. If you post your project files it will be easy to solve the issue.


    1 members found this post helpful.

  14. #14
    Member level 2
    Points: 355, Level: 4
    MyMelon's Avatar
    Join Date
    May 2012
    Posts
    44
    Helped
    0 / 0
    Points
    355
    Level
    4

    Re: Arduino Connection Problem

    i don't know if this program is working. only if i know how to figure out how to fix the libraries

    Code:
    #include "SIM900.h"
    #include "SoftwareSerial.h"
    //If not used, is better to exclude the HTTP library,
    //for RAM saving.
    //If your sketch reboots itself proprably you have finished,
    //your memory available.
    //#include "inetGSM.h"
    
    //If you want to use the Arduino functions to manage SMS, uncomment the lines below.
    #include "sms.h"
    SMSGSM sms;
    
    //To change pins for Software Serial, use the two lines in GSM.cpp.
    
    //GSM Shield for Arduino
    //www.open-electronics.org
    //this code is based on the example of Arduino Labs.
    
    //Simple sketch to send and receive SMS.
    
    int numdata;
    boolean started=false;
    char smsbuffer[160];
    char n[20];
    
    void setup() 
    {
      //Serial connection.
      mySerial.begin(9600);
      Serial.begin(9600); //only if USB will be connected
      mySerial.println("AT+IPR=9600"); //sets the GPRS chip to communicate at 9600 as well
      //Start configuration of shield with baudrate.
      //For http uses is raccomanded to use 4800 or slower.
      if (gsm.begin(2400)){
        Serial.println("\nstatus=READY");
        started=true;  
      }
      else Serial.println("\nstatus=IDLE");
      
      if(started){
        //Enable this two lines if you want to send an SMS.
        if (sms.SendSMS("+639062407300", "Arduino SMS"))
          Serial.println("\nSMS sent OK");
      }
    
    };
    
    void loop() 
    {
      if(started){
        //Read if there are messages on SIM card and print them.
        if(gsm.readSMS(smsbuffer, 160, n, 20))
        {
          Serial.println(n);
          Serial.println(smsbuffer);
        }
        delay(1000);
      }
    };



  15. #15
    Banned
    Points: 23,048, Level: 36

    Join Date
    Dec 2012
    Location
    Bangalore, India
    Posts
    4,294
    Helped
    830 / 830
    Points
    23,048
    Level
    36

    Re: Arduino Connection Problem

    I don't use Arduino. Can you zip and post your project folder and mention what software you are using to compile the code. I will have to install it and check the working.

    You have only 1 error the other 2 are just warning. The error is due to the statement delay(1000);. You have to include delay.h file in your program. Look for delay.h or any file which as delay in its filename in the library folder.
    Last edited by jayanth.devarayanadurga; 27th January 2013 at 11:01.



    •   AltAdvertisement

        
       

  16. #16
    Member level 2
    Points: 355, Level: 4
    MyMelon's Avatar
    Join Date
    May 2012
    Posts
    44
    Helped
    0 / 0
    Points
    355
    Level
    4

    Re: Arduino Connection Problem

    i've put all the GSM libraries in my project folder, right now i only get few errors.

    like this:
    samp.cpp: In function 'void setup()':
    samp:28: error: 'mySerial' was not declared in this scope
    samp.cpp:45: warning: deprecated conversion from string constant to 'char*'
    samp.cpp:45: warning: deprecated conversion from string constant to 'char*'


    here's the links
    http://arduino.cc/en/Main/Software
    http://code.google.com/p/gsm-shield-...downloads/list



  17. #17
    Banned
    Points: 23,048, Level: 36

    Join Date
    Dec 2012
    Location
    Bangalore, India
    Posts
    4,294
    Helped
    830 / 830
    Points
    23,048
    Level
    36

    Re: Arduino Connection Problem

    Why don't you use Serial.println instead of mySerial.println?



--[[ ]]--