Professional Documents
Culture Documents
C DOKUZ EYLUL UNIVERSITY FACULTY OF ENGINEERING ELECTRICAL & ELECTRONIC ENGINEERING DEPARTMENT
FINAL REPORT
by
zgr Mehmet DUMAN
Advisor
Asst. Prof. Dr. AHMET ZKURT
04.05.2011 IZMIR
ABSTRACT
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.
TABLE OF CONTENTS
Table of Contents 2 3 4 4
1. INRODUCTION 2. METHODOLOGY
2.1 Current and Voltage Measurement 2.2 Stepping Motors and Drivers 2.3 RF Communication 2.4 Lithium Polymer Charger Design
5 7 8
9 10 11 12 13
13
3. FLOW CHART CHARGE STATION 4. FLOW CHART MOBILE VEHICLE 5. BLOCK DIAGRAM MOBILE VEHICLE 6. BLOCK DIAGRAM CHARGE STATION 7. EXPERIMENTS
7.1 Current and Voltage Measurement 7.2 Stepping Motors and Drivers 7.3 RF Communication and RS232 Communication 7.4 Charger Circuit
13 14
14
15 15
INTRODUCTION
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. This 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 The 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.
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. Acs712 hall effect current sensor is loaded on mobile vehicle, resolution is changed between 66mV/A and 185mV/A.
16F877 MCU has bit ADC device so its resolution 4.887mV/Bit so at minimum resolution of sensor 0.07 A current changing increases one bit LSB of ADC. In addition the charger circuit is designed with Acs712.Voltages measuring of circuits are provided with voltage divider circuits whose ratios are 1/3.
Figure 5 : Principle of operation of 308 per step variable reluctance stepping motor.[3]
STEPPING MOTOR DRIVERS In this project constant voltage drive is used. This drive method is the simplest one. The 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. The current waveforms at low and high stepping rates are shown in figure4. This method is realized with L293D push-pull four channel driver with diodes.
Figure 7:Stepping motors driving with 16f628 mcu and l293d motor driver
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 Lm317 ICs.
RF Communication
In project mobile vehicle current and voltage values are transmitted to receiver of charge station. ARX-34S and ATX-34S are receiver and transmitter modules whose communication frequency 433.920 MHz at UHF band. Maximum binary data communication rate is 2400kps.
Transmitter
DI(digital input)
RF
Li iu
ly
rC
r r
Power suppl of mobile vehi le is chose lithium pol mer battery. Because of li polymer batteries are superior than the other types because of features, li ht wei ht and small package, high energy density, low self discharge, low maintenance. In this project receiver device is designed as li polymer charger. Grid electric energy is adjusted to charger supply with buck converter circuit.
While(true)
Start Timer
Time>3hr
Break
10
false
false
While(true)
While(true)
Motor Drive
Current Measuring
Transmitting
Voltage Measuring
Transmitting
11
BL C
M M B LE E
CLE
12
BL C
13
Photo1: Current measuring with shunt resistance and voltage measurement with voltage divider.
Second week of project my current (Acs12) sensors were shipped so I developed measuring system due to new sensors.
14
transmission process, all numbers and letters were converted characters then every character was sent as bit by bit. To prevent current and voltage data mixing V and A letters were sent after suitable data. Every circuit has computer rs232 connection.
Charger Circuit
Lead acid charger were designed in Embedded 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:Lipo charging
15
CONCLUSION
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 lm324 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 Acs712 hall effect sensors output provide more effective current measurement. Output voltage of sensor increases from Vcc/2 voltage with 133mV/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 16f628 mcu. But isolation must be use because when stimulus from L293d motors try to use supply of mcu so measured current isnt related with battery supplied current, therefore lm7805, 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. These letters would be controlled then values are showed but cu rrent data couldnt be storage so this application couldnt be resulted.
REFERENCES
1.Datasheet of UGN3503 Linear Hall Effect Sensor of Allegro 2. Datasheet of ACS712 Hall Effect Based Linear Current Sensor of Allegro 3. HUGHES, A., Electric Motors and Drives Fundamentals,Types and Applications, pp. 307320,3rd Edition, Elsevier Inc., Burlington, Greate Britain, 12006 4. Datasheet of ATX34S RF module of Udea Firm 5. BUCHMANN, I., Batteries in a Portable World, pp. 44-95, 2nd Edition, Cadex Electronics Inc., CANADA, 2000
16
#fuses XT,NOWDT,NOPROTECT,NOBROWNOUT,NOLVP,NOPUT,NOWRT,NODEBUG,NOC PD
long int plus0=0,plus1=0; int sa =0,satir=1,dut =1,a=1; unsigned long int bilgi; float deger1,deger2; unsigned char data=0x00;
17
dela _ms(100); set_adc_channel(1); dela _us(50); bilgi=read_adc(); deger1=((bilgi*0.004828812)*3); set_adc_channel(0); dela _us(50); bilgi=read_adc(); deger2=((bilgi*0.004828812)-2.46)*1000/80; lcd_gotox (1,1); printf( lcd_putc, "Vol(V)Cur(A)" ); dela _ms(10); lcd_gotox (1,2); printf( lcd_putc,"V=%fVI=%fA",deger1,deger2); dela _ms(10);
if ((deger1<12) && (deger2<0.01)) {dut =dut +1; set_pwm1_dut (dut ); } if (deger1>=12) dut =dut -1; set_pwm1_dut (dut ); //output_low(pin_c0); dela _ms(100); }
} 18
void fivebit0(); // senkron 5 bit 0x00 okuyan alt program void fivebit1(); // senkron 5 bit 0xff i okuyan alt program void data_oku();
void main() { set_tris_b(0xFF); set_tris_c(0xFF);////////////// set_tris_a(0x0f); //set_tris_c(0x00);/////////////////////// setup_ccp1(CCP_PWM); setup_timer_2(T2_DIV_BY_1,99,1); // Timer2 ayarlar yap l yor set_pwm1_duty(duty); // PWM1 k setup_adc(adc_clock_div_32); setup_adc_ports(ALL_ANALOG); lcd_init(); enable_interrupts(INT_EXT); enable_interrupts(GLOBAL); grev sayk l belirleniyor
while (1)
{ fivebit0(); } }
if(input(Dout)==0) { for(;;) { delay_us(10); plus0++; if(plus0>=600) { while(input(Dout)==0); fivebit1(); return; } if(input(Dout)==1) break; } plus0=0; } } }
20
delay_us(10); plus1++; if(plus1>=600) { while(input(Dout)==1); data_oku(); return; } if(input(Dout)==0) { plus0=0; plus1=0; return; } } } } }
say++; data=data<<1; delay_us(230); delay_us(210); } lcd_gotoxy(1,1); printf( lcd_putc, "Cur(A) Vol(V) " );
lcd_gotoxy(satir,2); printf( lcd_putc,"%c",data); delay_ms(10); satir++; if (satir>14) {satir=1; printf(lcd_putc,"\f"); } printf("%c",data); plus0=0; plus1=0; say=0; return; } //////////////////////////////////TRANSMITTER//////////////////// #include <16f877.h>
#device ADC=10
#fuses XT,NOWDT,NOPROTECT,NOBROWNOUT,NOLVP,NOPUT,NOWRT,NODEBUG,NOC PD
22
#use fast_io(a) #use fast_io(b) #use fast_io(d) #use fast_io(c) #define DI pin_d0
float bilgi; int count=0,i; unsigned char a,data[6]; unsigned char data_set=0x00; unsigned char mask=0x80;
} else { output_low(DI); } p_width(); if (count==7) { count++; break; } data1 = data1 << 1; count++; } count=0; output_low(pin_c0); return; }
void sync() {
send(0x00); 24
output_low(DI);
output_high(DI);
p_width();
set_tris_a(0x0F); 25
setup_adc(adc_clock_div_32); setup_adc_ports(ALL_ANALOG);
bilgi=((bilgi*0.004828812)-2.46)*1000/80; sprintf(data,"%.3g",bilgi);
sync(); send(0x41);
sync(); send(0x0D);
26
bilgi=bilgi*0.004828812*3; sprintf(data,"%.3g",bilgi);
sync(); send(0x56);
sync(); send(0x0D);
27