Vous êtes sur la page 1sur 4

A Report on

Robotics Projects using PIC


By: Himanshu Rao
Electronics and Communications Engineering Delhi Technological University

Microcontroller specifications:

Microcontroller name: PIC18F8722 Architecture: 8-bit RISC architecture Power Supply: 9-15V XTAL frequency: 40 MHz

In-Built ports: Serial, USB, Ethernet Burner: ICD2 for PIC

Bluetooth(Cell Phone) controlled robot:

Signal from Cellphone bluetoooth

BlueSmirf (on robot)

Microcontroller (PIC18F8722)

H-Bridge

DC Motors (geared)

Power source used: Lead acid battery, 12V, 1.3Ah Astrodyne for 12V and 5V supplies Code for PIC controller: written in MPLab IDE Control type: Differential drive using PWM (pulse width modulation) Code for Cell-phone: J2ME based App for Symbian OS, written in Mobile Processing IDE Port D used as output to H-Bridge, Bluesmirf connected to RC6(Tx) and RC7(Rx).

PIC18F8722

Lead acid battery

BlueSmirf Astrodyne

Cell-phone Bluetooth controlled Robot

PID controlled Line follower:

IR emitters

IR Sensors

Op-Amp (LM324)

Microcontroller (PIC18F8722)

H-Bridge

DC Motors (geared)

Power source used: Lead acid battery, 12V, 1.3A Code for PIC controller: using MPLab IDE Control type: Differential drive using PWM with PID (Proportional, Integral and Derivative) Port D used as output to H-Bridge, Port B used as input from OpAmps.

PID psuedo code: Error detection in main()

Evaluation of correction term in interrupts

Implementation of correction term using PWM on motors

1. Errors were assigned according to the position of IR sensors relative to the line to be followed. 2. Following interrupts were used: Timer 0Used for the application of PWM on the right motor. Timer 1Used for the application of PWM on the left motor. Timer 2Used for the evaluation of the PID term and the correction to be applied on the system. Timer3Used for serial communication of the robot with the computer(for testing purposes).

3. The PID term evaluated from the PID control loop is applied as correction to the current pulse width of each motor. Tuning of the PID loop done using the Zeigler Nicholas method:

ZieglerNichols method giving K' values Control Type P PI PID Kp 0.50Kc 0.45Kc 0.60Kc Ki' 0 1.2KpdT/ Pc 2KpdT / Pc Kd' 0 0 KpPc / (8dT)

The gains were futher perfected by performing trial runs.

Op-Amps (LM324)

IR sensor arrray

PID controlled line follower

Team Members: Himanshu Rao, Karan Talreja, Jayant Malani


Electronics and Communications Engineering, DTU

Vous aimerez peut-être aussi