mobile robot & charging station (robotic final report)

Upload: ozgur-m-duman

Post on 07-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    1/27

    1

    T.C

    DOKUZ EYLUL UNIVERSI T YFA C UL T Y OF ENGINEERING

    ELE CT RI C AL & ELE CT RONI C ENGINEERING

    DEPAR TM EN T

    Voltage and Curr ent M eas ur ement of M obile Robot

    FINAL REPOR T

    by

    z g r M ehmet DU M AN

    Advisor

    Asst . P r of . Dr. AH M E T ZKUR T

    04.05.2011

    IZMIR

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    2/27

    2

    ABS T RA CT

    Mobile vehicle batterys instantaneous current and voltage information are transmitted to

    charge station by RF modules which are loaded on vehicle and station . Mobile vehicle is designed

    as three wheels, two of them are front and movement is proved by two bipolar stepping motors

    which are connected to front wheels . Hall effect current sensor and voltage divider circuits gives

    battery information of vehicle to microcontroller .

    Charge station contains cascaded ac to dc converter and step down converter which are

    controlled by microcontroller (mcu) . In RF receiver module provides to take vehicle data on same

    station .

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    3/27

    3

    T ABLE OF C ON T EN T ST able of Contents 2

    1. INRODU CT ION 3

    2. M ETHODOLOGY 4

    2.1 Current and Voltage Measurement 4

    2.2 Stepping Motors and Drivers 5

    2. 3 RF Communication 7

    2.4 Lithium Polymer Charger Design 8

    3. FLOW CHAR T CHARGE S TATION 9

    4. FLOW CHAR T M OBILE VEHI CLE 10

    5. BLO CK DIAGRA M M OBILE VEHI CLE 11

    6. BLO CK DIAGRA M CHARGE S TATION 12

    7. EXPERI M EN TS 13

    7.1 Current and Voltage Measurement 13

    7.2 Stepping Motors and Drivers 13

    7.3 RF Communication and R S2 3 2 Communication 14

    7.4 Charger Circuit 14 8 . CON CLUSION 15

    9. REFEREN CES 15

    10 . ABS T RA CT

    10.1 Codes

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    4/27

    4

    IN T RODU CT ION

    Mobile robots are one of the most popular research topic and all industrial applications are

    include mobile robots for professional and quick works . Robots are located at the heart of world of

    future .

    Nowadays, movement of mobile robots is satisfied by different type motors such as DC

    motors which are supplied by DC voltage . Mobile robot technology develops in parallel with

    battery technology . T his relation is provided by suitable measurements systems .

    Current measuring applications are realized a few different methods . Shunt resistances

    serial connection and hall effect current metering are two of them . Many science projects

    succession is related with efficient energy measuring and data transferring . For example Nasas

    mobile robots on T he Moon, satellites and rockets projects have efficient energy measuring and

    transferring systems .

    In this project a mobile robot is created and its battery current and voltage measuring is

    realized and also these data transmitted to standalone charge station .

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    5/27

    5

    M ET HODOLOGY

    Curr ent and Voltage M eas ur ing

    In this project current values of mobile vehicle and charger are measured by hall effect

    sensors of Allegro firm . Hall effect sensors work by magnetic induction on material due to theflowing current . Flux increases due to the increasing current value; hence voltage is appeared at the

    output of current sensor .

    Figure 1: One hall effect sensor application [ 1]

    Low costs and small packages of these sensors are attractiveness properties . In addition,

    only 5 volt is enough to supply the sensor, so creating different hardware to provide supply

    voltages isnt necessary .

    Acs7 12 hall effect current sensor is loaded on mobile vehicle, resolution is changed between

    66mV/A and 185mV/A .

    Figure 2: Acs7 12 hall effect sensor and application circuit . [2]

    16F877 MCU has bit ADC device so its resolution 4.887mV/Bit so at minimum resolution

    of sensor 0.0 7 A current changing increases one bit LS B of ADC . In addition the charger circuit is

    designed with Acs7 12. Voltages measuring of circuits are provided with voltage divider circuitswhose ratios are 1/3 .

    Figure 3 : Voltage divider

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    6/27

    6

    Stepping M oto r s and D r iver s

    In this project mobile vehicle is created three wheels . T wo front ones are moved with

    stepping motors . Back one is drunken wheel .

    STE PPING MO T OR S

    Stepping motors are a type of brushless Dc motors in figure 4. T heir differences with other

    brushless Dc motors are controllable rotor rounding angle of motor in figure 5 and ability of open

    loop position controlling in figure 6 . T orque and speed performance are changeable due to motor

    company products . Stepping motors are able to find desired torque, speed and step angles .

    Small or big devices have stepping motors; T oys, Cd drivers, bandagers, robotic hands and

    future biomedical surgeons .

    Figure 4: Stepping Motors .[3 ]

    Figure 5 : Principle of operation of 3 08 per step variable reluctance stepping motor . [3 ]

    Figure 6 : Open-loop position control using a stepping motor .[3 ]

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    7/27

    7

    STE PPING MO T OR DRIV E R S

    In this project constant voltage drive is used . T his drive method is the simplest one . T he dc

    voltage V is chosen so that when the transistor is on, the steady current is the rated current as

    specified by the motor manufacturer . T he current waveforms at low and high stepping rates are

    shown in figure 4. T his method is realized with L29 3 D push-pull four channel driver with diodes .

    Figure 7 :S tepping motors driving with 16f628 mcu and l 293

    d motor driver

    Figure 8 : Current waveform for different stepping rates[ 3 ]

    In project two stepping motors have different each other one of them is supplied 5V, the

    other one is 7V .So two voltage regulating systems were created with Lm3 17 ICs .

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    8/27

    8

    RF C omm unication

    In project mobile vehicle current and voltage values are transmitted to receiver of charge station .

    ARX- 3 4S and A T X-3 4S are receiver and transmitter modules whose communication frequency

    433 .920 MHz at UHF band . Maximum binary data communication rate is 2400 kps .

    Figure 9: Rf transmitter and receiver modules

    Key features of transmission are data synchronization and data formats .

    TX : preamble + sencron + data1+.....+dataX

    T ransmitter

    DI(digital input)

    RF

    Receiver

    RF

    DO(digitaloutput)

    Figure 10: Sencron rf commucination timing diagram [ 4]

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    9/27

    9

    Li iu ly r C r r i

    Power supp l of mob ile veh i le is chose lithium po l mer ba ttery. Because of li po lymer ba tter ies

    are super ior than the o ther types because of fea tures, li ht wei ht and sma ll package, h igh energy

    dens ity, low se lf discharge, low ma intenance.

    In this pro ject rece iver dev ice is des igned as li po lymer charger. Gr id e lectr ic energy is ad justed to

    charger supp ly with buck conver ter c ircu it.

    Figure11 :Buck Conver ter schema tic

    Figure12 : Lithium Charge Charac ter istic[5]

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    10/27

    10

    FLOW C HAR T C HARGE S TATION

    true false

    Initialization &Descr iption

    Adjus tm ent sof Setu s

    Main Function

    Int erru pt s

    Sta rt

    Wh ile( true)

    Show LCDScree n

    Rece ive Data Sta rt ch ar e

    Volta geRead

    Con stant Curre nt Charging

    Volta ge 3hr

    Sta rt Timer

    Break

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    11/27

    11

    FLOW C HAR T M OBILE VEHI C LE

    false false

    Moto r Drive

    Initialization &Descr iption

    Adjus tm ent sof Setu s

    Main Function

    Sta rt

    Wh ile( true)

    Curre nt Me asur ing

    Initialization &Descr iption

    Adjus tm ent sof Setu s

    Main Function

    Sta rt

    Wh ile( true)

    Tran smittin g

    Volta ge Me asur ing

    Tran smittin g

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    12/27

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    13/27

    13

    BL C DIAGRA M C ARG E S T A T ION

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    14/27

    14

    EXPERI MEN TS

    Curr ent and Voltage M eas ur ing

    In this project, 2 lead acid batteries were connected serially for supplying mobile robots .

    T hese batteries cause weight increasing of mobile robot as 180g, T hats why step motors use highcurrent to lift batteries . But stepping motors havent got enough torque for moving all of mobile

    robot so lithium polymer batteries were selected instead of lead acids but current measuring with

    shunt resistance and voltage measurement with voltage divider were realized with lead acid

    supplied experiences .

    Photo 1: Current measuring with shunt resistance and voltage measurement with voltage divider .

    Second week of project my current (Acs 12 ) sensors were shipped so I developed

    measuring system due to new sensors .

    Step M oto r D r iving

    In project two different stepping motor are used to move the mobile robot . L29 3 D, 4

    channel dc motor driver, whose channels capability of current supply are 6 00 mA, was used to

    drive bipolar stepping motor . All channels were activated by 16f6 28 Mcu .

    Photo 2-3 stepping motor drive

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    15/27

    15

    RF C omm unication and Rs2 32 C onnections

    T wo different type Rf communication modules were bought . T hey werent udea firms

    models but they were worked like them . Voltage and current data were read as integer but in

    transmission process, all numbers and letters were converted characters then every character was

    sent as bit by bit . T o prevent current and voltage data mixing V and A letters were sent after

    suitable data . E very circuit has computer rs 23 2 connection .

    Photo 4-5 Rf data transfer and rs 23 2 data transfer

    C ha r ger C ir cuit

    Lead acid charger were designed in E mbedded module project but constant current

    couldnt be obtained . In this project buck type dc to dc converter is applied to realize last object . Current and voltage values are realized due to charge curve of lithium polymer battery in charging

    process . Constant current supplying is tried by changing duty of PWM signal which is created by

    16f877 mcu .

    Photo7 :L ipo charging

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    16/27

    16

    C ON C LUSION

    In this project, current and voltage measuring of any mobile vehicle then realizing

    communication between the vehicle and standalone system are purposed . In addition own effort, I

    tried to add lithium polymer charger circuit to standalone system .

    Shunt resistance was too small output voltage thats why lm 3 24 opamp necessity broke the

    measurements . Also shunt connection to system creates all systems ground connection differences

    due to battery when the shunt resistance is connected to battery anode . So Acs7 12 hall effect

    sensors output provide more effective current measurement . Output voltage of sensor increases

    from Vcc/ 2 voltage with 133 mV/A resolution .

    Stepping motors, which are used by different supply voltage, has same 7 .5 degree steps

    angle . So speeds are same for same stepping stimulus from 16f6 28 mcu . But isolation must be use

    because when stimulus from L29 3 d motors try to use supply of mcu so measured current isnt

    related with battery supplied current, therefore lm78 05 , 5V regulator heats after this attempt . Also

    two mcu are used on vehicle because of effective motor speed control .

    After experiments these motors couldnt suitable this vehicle because two low torque

    couldnt provide the movement . But vehicle shape was created according to these motors . Steps

    cause current changes, current measurements changed too .

    RF communication security is planned by different algorithm .V and A letters would be

    key of protections . T hese letters would be controlled then values are showed but current data

    couldnt be storage so this application couldnt be resulted .

    REFEREN CES

    1.Datasheet of UGN 3 50 3 Linear Hall E ffect Sensor of Allegro

    2. Datasheet of AC S712 Hall E ffect Based Linear Current Sensor of Allegro

    3 . HUGH E S , A., E lectric Motors and Drives Fundamentals, T ypes and Applications, pp . 3 07-

    3 20 ,3 rd E dition, E lsevier Inc ., Burlington, Greate Britain, 1200 6

    4. Datasheet of A T X3 4S RF module of Udea Firm

    5. BUCHMANN, I ., Batteries in a Portable World, pp . 44 -95 , 2nd E dition, Cadex E lectronics Inc .,

    CANADA, 2000

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    17/27

    17

    APPENDIX

    Codes:

    //////////////////////////RE CEIVER////////////////////////////

    #incl ude < 16f 8 77 .h>

    #define Do ut pin_c 3

    #f usesXT, NOWD T, NOPRO T ECT, NOBROWNOU T, NOLVP ,NOPU T, NOWR T, NODEBUG ,NO CPD

    #use dela (clock=4 000000)

    #use r s232 (ba ud=24 00 , xmit=pin_ C6, r cv=pin_ C7, pa r it =N , stop= 1)

    #use fast_io (b )

    #use fast_io (c )

    #incl ude

    long int pl us0=0,plus1=0;

    int sa = 0,sati r=1,du t = 1,a= 1;

    unsigned long int bilgi ;

    float dege r 1,dege r 2;

    unsigned cha r data= 0x00;

    #int_ext

    void ext_cha r ge( )

    {while( 1)

    {{//ou tp ut_high(pin_c 0);

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    18/27

    18

    dela _ms( 100);

    set_adc_channel( 1);

    dela _ us(5 0);

    bilgi= r ead_adc( );

    dege r 1=((bilgi* 0.0048 288 12)*3);

    set_adc_channel( 0);

    dela _ us(5 0);

    bilgi= r ead_adc( );

    dege r 2=((bilgi* 0.0048 288 12)-2.46 )*1000 /8 0;

    lcd_gotox ( 1,1);

    pr intf( lcd_p utc , "Vol(V )Cur (A)" );

    dela _ms( 10);

    lcd_gotox ( 1,2);

    pr intf( lcd_p utc ,"V=%fVI=%fA" ,dege r 1,dege r 2);

    dela _ms( 10);

    if ((dege r 1

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    19/27

    19

    void fivebit 0(); // senk r on 5 bit 0x00 ok uy an alt p r ogr am

    void fivebit 1(); // senk r on 5 bit 0xff i ok uy an alt p r ogr am

    void data_ok u();

    void main( )

    {

    set_t r is_b( 0xFF );

    set_t r is_c( 0xFF ); //////////////

    set_t r is_a( 0x0f );

    //set_t r is_c( 0x00); ///////////////////////

    set up_ccp 1(CC P_PW M );

    set up_time r _2( T 2_DIV_BY_ 1,99,1); // T ime r 2 a yar la r yap l yor

    set_pwm 1 _d u ty(duty); // PW M 1 k g r ev sa yk l beli r leni yor

    set up_adc(adc_clock_div_ 32);

    set up_adc_po r ts(ALL_ANALOG );

    lcd_init( );

    enable_inte rru pts(IN T _EX T );

    enable_inte rru pts(GLOBAL );

    while ( 1)

    {

    fivebit 0();

    }

    }

    void fivebit 0 ()

    {

    for (;;)

    {

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    20/27

    20

    if(inp ut(Do ut)== 0)

    {

    for (;;)

    {

    dela y _ us(10);

    plus0++ ;

    if(pl us0>=6 00)

    {

    while(inp u t(Do ut)==0);

    fivebit 1();

    r etur n ;

    }

    if(inp u t(Do ut)== 1)

    b r eak ;

    }

    plus0=0;

    }

    }

    }

    void fivebit 1()

    {

    for (;;)

    {

    if(inp ut(Do ut)== 1)

    {

    for (;;)

    {

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    21/27

    21

    dela y _ us(10);

    plus1++ ;

    if(pl us1>=6 00)

    {

    while(inp u t(Do ut)==1);

    data_ok u();

    r etur n ;

    }

    if(inp u t(Do ut)== 0)

    {

    plus0=0;

    plus1=0;

    r etur n ;

    }

    }

    }

    }

    }

    void data_ok u ()

    {

    while(sa y

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    22/27

    22

    sa y++ ;

    data=data14)

    {sati r =1;

    pr intf(lcd_p utc ,"\f" );

    }

    pr intf("%c" ,data );

    plus0=0;

    plus1=0;

    sa y=0;

    r etur n ;

    }

    ////////////////////////////////// T RANS M ITT ER////////////////////

    #incl ude < 16f 8 77 .h>

    #device AD C=10

    #f usesXT, NOWD T, NOPRO T ECT, NOBROWNOU T, NOLVP ,NOPU T, NOWR T, NODEBUG ,NO CPD

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    23/27

    23

    #use dela y (clock=4 000000)

    #use fast_io(a )

    #use fast_io(b )

    #use fast_io(d )

    #use fast_io(c )

    #define DI pin_d 0

    float bilgi ;

    int co unt= 0,i;

    unsigned cha r a,data[6] ;

    unsigned cha r data_set= 0x00;

    unsigned cha r mask= 0x8 0;

    void p_width( )

    {

    dela y _ us(200);

    dela y _ us(18 6);

    }

    void send(data 1)

    {outp u t_high(pin_c 0);

    while (co unt

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    24/27

    24

    }

    else

    {

    outp ut_low(DI );

    }

    p_width( );

    if (co unt==7 )

    {

    count++ ;

    br eak ;

    }

    data 1 = data 1

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    25/27

    25

    send( 0x00);

    send( 0x00);

    send( 0x00);

    send( 0x00);

    send( 0xFF );

    send( 0xFF );

    send( 0xFF );

    send( 0xFF );

    send( 0xFF );

    outp ut_low(DI );

    outp ut_high(DI );

    p_width( );

    }

    void main ( )

    {

    set up_psp (PSP_DISABLED );

    set up_time r _ 1(T1 _DISABLED );

    set up_time r _2( T2_DISABLED ,0,1);

    set up_ CC P1(CC P_OFF );

    set up_ CC P2( CC P_OFF );

    set_t r is_a( 0x0F );

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    26/27

    26

    set_t r is_b( 0x00);

    set_t r is_d( 0x00);

    set_t r is_c( 0x00);

    outp ut_b( 0x00);

    set up_adc(adc_clock_div_ 32);

    set up_adc_po r ts(ALL_ANALOG );

    while ( 1)

    {

    set_adc_channel( 0);

    dela y _ us(5 0);

    bilgi= r ead_adc( );

    bilgi=((bilgi* 0.0048 288 12)-2.46 )*1000 /8 0;

    sp r intf(data ,"% .3g" ,bilgi );

    for (i= 0; i

  • 8/6/2019 Mobile Robot & Charging Station (ROBOTIC FINAL REPORT)

    27/27