EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / SMS operated robot

SMS operated robot

|

Microcontroller › AVR › SMS operated robot

  • This topic has 15 replies, 2 voices, and was last updated 11 years, 11 months ago by SOUBHIK KUMAR DEY.
Viewing 15 posts - 1 through 15 (of 16 total)
1 2 →
  • Author
    Posts
  • April 27, 2013 at 2:11 pm #2353
    SOUBHIK KUMAR DEY
    Participant

    Dear Sir,

     

    I want to design a sms controlled Robot that can be controlled via AT commands using SIM300 / SIM900 and AVR Atmega8 MCU. Plz sir I need all the steps in detail including ckt diagram, PCB diagram, circuit components required and programming for AVR.

     

    I stumbled upon a video on YouTube which resembles exactly the robot I want to design. You can search “SIM 300 GSM_GPRS Modem based SMS Controlled Robot” in Search field. I am not giving the direct link coz ur site flags my post as spam.

     

    Plz Sir help me. Also can a Nokia/Samsung phone replace the SIM300? Plz sir, its urgent 4 my college project.

     

     

     

    Thnx n Regeads,

    Soubhik.

    May 3, 2013 at 5:46 am #9608
    Jason Jordon
    Participant

    using a mobile phone would be better as it would make the working pretty easy. You need to have a GSM receiver module and in the code, you can even enter a number to which the system would reply everytime after it is calibrated.

    May 8, 2013 at 3:56 pm #9684
    SOUBHIK KUMAR DEY
    Participant

    Thank You sir. Sir, I need the circuit diagram too.

     

    I hv an AVR development board and what I understand is that I need to connect a RELAY ckt to the OUTPUT pins to the control the motors.

     

    But I hv no idea abt how shall I connect the phone or SIM900 module to the AVR Atmega 8 development board and make it interpret the sms commands like ‘1’ for ON and ‘0’ for OFF.

    I hv written a tentative program to control OUTPUT pins according to HIGH or LOW signal received at INPUT PINS but I hv no idea abt how to make the phone or SIM900 interpret that.

     

    Plz Sir I need the complete CIRCUIT diagram & the components required too. Plz Sir help me.

     

    Thnx n Regards,

    Soubhik.

    May 9, 2013 at 12:16 pm #9690
    Jason Jordon
    Participant

    Hi Tony,

     

    Atmega 8 can be used for applications that are a lot better than a line follower. That is why the scope for development boards (which Soubhik) exists. For instance, here is a R/C based robot: http://letsmakerobots.com/node/27952

     

    Soubhik, I will soon give you a solution.

    May 12, 2013 at 5:38 pm #9723
    SOUBHIK KUMAR DEY
    Participant

    Thank You everyone very much for ur replies.

     

    Atmega 8 is no issue. Atmega 32, 16 n 8 differ only in their memory size & speed of processing. Okay I shall use Atmega 16 or 32 then. My development board is AVR development board and not just specific to Atmega 8. I saw this robot on a video on Youtube. The link is in my first post. I checked the uploader’s channel and found out they used SIM300 and AVR atmega 16. Actually I have seen people making projects like remote SMS lighting system where they switch on a bulb & fan by just sending an sms. They used a relay ckt too which I shall replace with L293D motor driver IC. I modified that concept to replace the bulb by LEFT SIDE MOTOR and Fan by RIGHT SIDE MOTOR of my robot so that my robot moves by differential drive. I have actually modified a line follower program to suit this project.

     

    Thank You Sir.

    Soubhik.

    May 12, 2013 at 5:39 pm #9724
    SOUBHIK KUMAR DEY
    Participant

    Thank you sir.

    Sir, I just need the circuit connections for SIM900 module to interpret my sms commands (AT

    Command concept) like if I send ‘1’ via sms, it would send an ON or HIGH SIGNAL, and if I send

    ‘0’ it would send an OFF or LOW SIGNAL. I cannot get how to make the circuit so as to make the

    SIM900 interpret the SMS commands so as to send HIGH or LOW signal to the AVR microcontroller.

    I am stressing on AVR because I already have an AVR development board. But you may suggest

    help with 8051.

    I am not having any problem with programming or AVR. My problem is how to make my sim900

    interpret the sms commands and send HIGH or LOW SIGNALS accordingly to AVR. Rest is okay for

    me.

     

     

     

    My robot shall move according to the sms I send. It’s steering is based on Differential drive.

    It has 4 motors (2 on each side parallely connected). The robot will perform the following

    action based on sms sent. The SMS shall be a 2-digit no. consisting of only ‘0’ or ‘1’. The

    1st digit controls 4 left side & 2nd digit controls right side.

    SMS         ACTION

    11              FORWARD

    01              LEFT

    10              RIGHT

    00              STOP

    ‘1’ should send a high signal and ‘0’ should send a low signal so that AVR Atmega 16 can

    prepare the output acc to HIGH/LOW signal and send it to L293D IC.

    Thank You Sir very much.

    Soubhik.    

    May 12, 2013 at 5:48 pm #9725
    SOUBHIK KUMAR DEY
    Participant

    The link sent by Sir Sumer Singh is based on DTMF technology but my robot is based on SMS AT Command Technology.

    May 20, 2013 at 10:17 am #9799
    SOUBHIK KUMAR DEY
    Participant

    My robot shall move according to the sms I send. It’s steering is based on Differential drive.

    It has 4 motors (2 on each side parallely connected). The robot will perform the following

    action based on sms sent. The SMS shall be a 2-digit no. consisting of only ‘0’ or ‘1’. The

    1st digit controls left side motors & 2nd digit controls right sidemotors.

    SMS       ACTION

    11           FORWARD (switches ON both side motors)

    01           LEFT (switches OFF left motor OR rotates LEFT motor in OPPOSITE direction and RIGHT motor ON)

    10           RIGHT (switches ON LEFT motor and RIGHT motor OFF OR rotates RIGHT motor in OPPOSITE direction )

    00           STOP (switches OFF both side motors)

    ‘1’ should send a high signal and ‘0’ should send a low signal so that AVR Atmega 8 can prepare the

    output according to HIGH/LOW signal and send it to L293D IC. Sending ‘0’ switches OFF

    corresponding motor or makes it rotate in opposite direction, sending ‘1’ switches on corresponding

    motor to allow Differential Drive steering method. Also if it may be possible to send inputs of more digits,

    each digit controlling a particular function like switching on robot lights etc.(in that case sending a 3-digit no.).

     

    But I am not getting how to make SIM900 interpret my sms commands and make the Atmega8 or 16 perform the required action on I/O pins. Can you please give me the complete circuit
    diagram and PCB diagram with the connections of SIM900, Atmega 8 and L293D IC and other components which I may need?

     

    Please Sir help me for this college project.

     

    June 8, 2013 at 2:24 pm #9908
    SOUBHIK KUMAR DEY
    Participant

    My Atmega 8 DEVELOPMENT BOARD –

    wysiwyg_imageupload:8908:

    June 8, 2013 at 2:25 pm #9909
    SOUBHIK KUMAR DEY
    Participant

    I have connected PIN RxD (PD0) of Atmega 8  to TxD of SIM900 and PIN TxD (PD1) of Atmega 8 to

    RxD of SIM900. Pins PB and PC are OUTPUT PINS connected via switches to L293D IC.

    June 8, 2013 at 2:38 pm #9912
    SOUBHIK KUMAR DEY
    Participant

    L293D IC LAYOUT –

    wysiwyg_imageupload:8911:

    June 8, 2013 at 2:40 pm #9913
    SOUBHIK KUMAR DEY
    Participant

    wysiwyg_imageupload:8912:

    June 8, 2013 at 3:22 pm #9914
    SOUBHIK KUMAR DEY
    Participant

    A program that I have written for the SMS ROBOT –

     

    /* Header files */

     

     

     

    #include<avr/io.h>

    #include<avr/delay.h>

    #include”at8ports.h”

     

    int s[10];              /*GLOBAL VARIABLE to store INPUT in an array format*/

    int sms;                                /*GLOBAL VARIABLE  to receive incoming sms*/

     

    /* Initialise input & output pins */

     

    /*

    PD0 is the sensor input pin

    PB1 and PB2 are the motor speed control pins

    PC0 to PC3 are the motor direction control pins

    */

     

    void init_settings()

    {

                    DDRD_IN(0);                      /* PD0 = Input */

                   

                    DDRB_OUT(1);  /* PB1 = Output */

                    DDRB_OUT(2);  /* PB2 = Output */

     

                    DDRC_OUT(0);  /* PC0 = Output */

                    DDRC_OUT(1);  /* PC1 = Output */

                    DDRC_OUT(2);  /* PC2 = Output */

                    DDRC_OUT(3);  /* PC3 = Output */

    }

     

     

     

    /* Functions for different directions */

    /* Direction is determined from PC0 to PC3 */

     

    /*PB_ON(x) implies to turn ON PULL UP resistor of PBx i.e. set the Output of PBx as LOGIC 1*/

    /*PB_OFF(x) implies to turn OFF PULL UP resistor of PBx i.e. set the Output of PBx as LOGIC 0*/

    /*same concept applies to all other pins*/

     

    void forward()

    {

                    /* PB1 and PB2 will always be high */

     

                    PB_ON(1);

                    PB_ON(2);

     

                    /* PC0 to PC3 = 1010 */

                    /*This is the ideal forward condition i.e. Logic 1:Logic 0:Logic 1:Logic 0*/

     

                    PC_ON(0);

                    PC_OFF(1);

                    PC_ON(2);

                    PC_OFF(3);

    }

     

    void left()

    {

                    /* PB1 and PB2 will always be high */

     

                    PB_ON(1);

                    PB_ON(2);

     

                    /* PC0 to PC3 = 0110 */

                    /* Left motor backward (so opposite LOGIC to FORWARD), Right motor forward*/

     

                    PC_OFF(0);

                    PC_ON(1);

                    PC_ON(2);

                    PC_OFF(3);

    }

     

    void right()

    {

                    /* PB1 and PB2 will always be high */

     

                    PB_ON(1);

                    PB_ON(2);

     

                    /* PC0 to PC3 = 1001 */

                    /* Left motor forward, Right motor backward (so opposite LOGIC to FORWARD)*/

     

     

                    PC_ON(0);

                    PC_OFF(1);

                    PC_OFF(2);

                    PC_ON(3);

    }

     

    void backward()

    {

                    /* PB1 and PB2 will always be high */

     

                    PB_ON(1);

                    PB_ON(2);

     

                    /* PC0 to PC3 = 0101 */

                    /*Both motors in Backward direction, exactly opposite to Forward*/

     

                    PC_OFF(0);

                    PC_ON(1);

                    PC_OFF(2);

                    PC_ON(3);

    }

     

    /* To take input from the sensors [PD0 to PD4] */

     

    void sensors()

    {

                    sms = PD_IN(0);

                   

    }

     

     

    /*SOMEHOW WE HAVE TO BREAK THE DIGITS RECEIVED BY SMS SO THAT EACH DIGIT GETS STORED AS AN ELEMENT OF ARRAY s[ ] AND WE CAN THEN MANIPULATE TO OUR WISH. THIS I AM NOT UNABLE TO DO SO. AS OF NOW LET’S ASSUME OUR INCOMING sms IS A 2-DIGIT NO. CONSISTING OG 1 & 0. THESE DIGITS ARE ASSUMED TO BE STORED IN ARRAY FORMAT IN s[ ] in exactly same order*/

     

     

    void main()

    {

     

                    init_settings();  /* To initialise all input and output pins */

     

                    while(1)               /* Infinite loop */

                    {

                                    sensors();                            /* To take sensor values and store them */

                                   

                                    if(s[0] == 0 && s[1] == 1)                                              

                                    {A

     

     

                                                    left();                    /* Take a left turn */

                                                                                   

    }

     

                                    else if(s[0] == 1 && s[1] == 0)                     /* Rightmost sensor */

                                    {

                                                    right();  /* Take a right turn */

                                                   

                                    }

     

     

     

                                    else if(s[0] == 0 && s[1] == 0)                     /* No sensor on the line */

                                    {

                                                    PB_OFF(1);                         /*Motors stopped

    PB_OFF(2);

                                    }

                                    else                        /* Zero error condition [Move forward] */

                                    {

                                                    forward();                           /* Go straight ahead */

                                    }

                    }                              /* End of while loop */

    }                              /* End of the program */

    June 8, 2013 at 3:25 pm #9915
    SOUBHIK KUMAR DEY
    Participant

    /*SOMEHOW WE HAVE TO BREAK THE DIGITS RECEIVED BY SMS SO THAT EACH DIGIT GETS STORED AS AN ELEMENT OF ARRAY s[ ] AND WE CAN THEN MANIPULATE TO OUR WISH. THIS I AM NOT UNABLE TO DO SO. AS OF NOW LET’S ASSUME OUR INCOMING sms IS A 2-DIGIT NO. CONSISTING OG 1 & 0. THESE DIGITS ARE ASSUMED TO BE STORED IN ARRAY FORMAT IN s[ ] in exactly same order*/

    June 8, 2013 at 3:28 pm #9916
    SOUBHIK KUMAR DEY
    Participant

    This is the at8ports.h HEADER FILE to define the Input and Output ports.

     

    #include <avr/io.h>

    #include <avr/inttypes.h>

     

     

    #define DDRB_OUT(x) DDRB = DDRB | 0x01<<x

    #define DDRB_IN(x) DDRB = DDRB & ~(0x01<<x)

    #define DDRC_OUT(x) DDRC = DDRC | 0x01<<x

    #define DDRC_IN(x) DDRC = DDRC & ~(0x01<<x)

    #define DDRD_OUT(x) DDRD = DDRD | 0x01<<x

    #define DDRD_IN(x) DDRD = DDRD & ~(0x01<<x)

     

     

    #define PB_ON(x) PORTB = PORTB | 0x01<<x

    #define PB_OFF(x) PORTB = PORTB & ~(0x01<<x)

    #define PC_ON(x) PORTC = PORTC | 0x01<<x

    #define PC_OFF(x) PORTC = PORTC & ~(0x01<<x)

    #define PD_ON(x) PORTD = PORTD | 0x01<<x

    #define PD_OFF(x) PORTD = PORTD & ~(0x01<<x)

     

     

     

    uint8_t PB_IN(uint8_t pin)

    {

                    if((PINB & (0x01<<pin))==0)

                                    return 0;

                    else

                                    return 1;

    }

    uint8_t PC_IN(uint8_t pin)

    {

                    if((PINC & (0x01<<pin))==0)

                                    return 0;

                    else

                                    return 1;

    }

    uint8_t PD_IN(uint8_t pin)

    {

                    if((PIND & (0x01<<pin))==0)

                                    return 0;

                    else

                                    return 1;

    }

     

     

    void init_pwm()

    {

       

        TCCR1A|=(1<<WGM10)|(1<<COM1A1)|(1<<COM1B1);

        TCCR1B=0x04;

        DDRB = DDRB | 0x06;

    }

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 16 total)
1 2 →
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • how to work on pcbs that are thick May 19, 2025
  • 100uF bypass Caps? May 19, 2025
  • Fuel Auto Shutoff May 18, 2025
  • Actin group needed for effective PCB software tutorials May 18, 2025
  • compatible eth ports for laptop May 18, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise