accelerometer robot

Upload: veerakumars

Post on 02-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 Accelerometer Robot

    1/10

  • 7/27/2019 Accelerometer Robot

    2/10

    The figure shown here is comparator IC. The pin 1,7,8 and 14 are use to give out put to the

    microcontroller.We should connect a reference voltage to the -ve terminal for high output when

    input is high(+ve terminal for high output when input is low) from the LM324 IC.In this circuit we compare the data from x with two terminal one for positive x direction andnegative x direction and same for y direction.

    Encoder(HT12E IC):-The HT12E is an 4bit encoder which encode the input dataapplied on it .The pin description of the HT12E is shown in the figure .

    pin (1 to 8) A0-A7 known as address bits so we do not need to consider them.

    pin no (9 and 18) are use to bias the IC as pin-18 as VCC and pin-9 as GND.

    pin - 17 is connected to the rf transmitter module Din.

    pin-16 and pin-15 are connected by an Osc resistor known as Roscc(1.1 Mohm)

    pin-14 is connected to ground to enable the transmitt.

    pin-13 to pin-10 are known as AD0 to AD3 those having the 4bit data which is required

    to transmit.

  • 7/27/2019 Accelerometer Robot

    3/10

    RF Transmitter Module(TX):-The transmitter module is working on thefrequency of 433MHz and is easily available in the market at the cost of 250rs .

    The vcc pin is connected to the +terminal in the circuit.

    The data pin is connected to the HT12E(pin no-17) that is transmitted or we can say thatencoded data.

    The next pin is shown in figure is GND that is connected to the ground terminal.

    Now the last pin ANT this is connected to a small wire as an antenna.

    http://2.bp.blogspot.com/-Oq6SfXyKnKc/TvYDw0pgx_I/AAAAAAAAAF8/jf5PrU0MI0g/s1600/RXTXTXLink.jpg
  • 7/27/2019 Accelerometer Robot

    4/10

    CIRCUIT OF GESTURE DEVICE (TRANSMITTING

    MODULE)

    1> Receiver or Robot: This part contain four module--1. Receiver2. Decoder(HT12D)

    3. Process(microcontroller 8051)

    4. Actuator (Motor driver L293D)

    RF Receiver Module(RX):-The RF receiver module will receive the data whichis transfered by the gesture device. It is also working as similar to the transmitter module-

    Connect the +vcc pin to the 5volt terminal Connect the ground pin to the ground terminal

    The data pin is then connected to the HT12D (pin-14)

    So that we can get the decoded 4 bit data

  • 7/27/2019 Accelerometer Robot

    5/10

    Decoder (HT12D):- In a very simple way we can say that an HT12D converts thatserial data into parallel which is received by the rf receiver module.The input data is decodedwhen no error or unmatched codes are found. A valid transmission in indicated by a high signal

    at VT pin that is pin no 17.

    pin 18 : It is use to give the +vcc or biasing to the IC HT12D this pin is connected

    with the +5 volt

    Pin 17 : It is the valid transmission pin it will high when the transmission is ok so that

    we connected this pin to an led for indication.

    Pin 16-15: we connect these two pin directly by a 51k resistor

    Pin 14 : This pin is connected with the rf receiver module data pin to receiving the

    serial data.

    Pin 10-13: These pins are data pin which is transferred by the gesture module

    Process (Microcontroller P89V51RD2): The processing is the most importantpart of the robot. Till now we get the data from the decoder now based on that data we have to

    make some decision so here the role of microcontroller is coming up. We use an 8051

    microcontroller for our circuit to give them a decision capability. Our microcontroller is made up

    by nxp the product name isP89V51RD2

  • 7/27/2019 Accelerometer Robot

    6/10

    The basic circuit to initialize the microcontroller is shown below. We just need an reset circuit

    and oscillator to run the program.

    8051 micro controller circuitwe use the port 1 as an input port and port 2 as an output port.

    so the Data from the decoder will connect with pin 1,2,3,4 and motor should be

    connect with pin 21,22,23,24.

  • 7/27/2019 Accelerometer Robot

    7/10

    For forward the data to the Port2 is 0a or for backward it is 05 then for lest its 02 and

    for right it is 08.

    ACTUATOR'S(L293D): The Actuator's are those devices which actuallygives the movement or to do a task like motor's. In the real world their are various

    types of motor's available which works on different voltages. So we need motor driver

    for running them through the controller. To get interface between motor and

    microcontroller . We use L293D motor driver IC in our circuit.

  • 7/27/2019 Accelerometer Robot

    8/10

    motor driver circuit

    As in above circuit 2 pin maleAs in above circuit a 2 pin male connector in connected to the pin 8 this will provide the

    operating voltage for the motor like if we want to run our voltage on 12volt. so we just have toconnect a 12volt power source

    Now here is the full circuit diagram of the robot (receiver module)

  • 7/27/2019 Accelerometer Robot

    9/10

    PROGRAM: Now here is the program of the Gesture Controlled robot. The program

    is in Embedded-C. The microcontroller we used is 8051.

    /**********************************************************************************

    Gesture Controlled robot C program using 8051 microcontroller

    ***********************************************************************************

    INPUT DATA to PORT 1 LM324 OUTPUT DATA to PORT 2 for L293D

    MSB LSB MSB LSB

    1111 0001(0xf1) 0000 1010(0x0a) forward

    1111 0010(0xf2) 0000 0010(0x02) right

    1111 0100(0xf4) 0000 1000(0x08) left1111 1000(0xf8) 0000 0101(0x05) backward

    **********************************************************************************/

    #include //INCLUDE reg51.h for 8951

    void main()

    {

  • 7/27/2019 Accelerometer Robot

    10/10

    P1=0xff; // set port as input port

    P2=0x00; // set port as output port

    while(1) // infinite loop

    {

    if(P1==0xf1){

    P2=0x0a;

    }

    else if(P1==0xf2)

    {

    P2=0x02;

    }

    else if(P1==0xf4)

    {

    P2=0x08;

    }

    else if(P1==0xf8)

    {

    P2=0x05;

    }

    else

    {

    P2=0x00;

    }

    }

    }