Let's Make Robots!

A PID controlled Fast Line following Robot


This is a basic Line follower based on PID Algorithm. The robot base is home made PCB. The robot is running at 1.2 m/Sec. The PID configuration is still in progress. I believe with a good PID value it can go up to 1.5 m/sec. Robot consists of two 6 volts motors running at 9 volts through adjustable voltage regulator.

I made the robot round shaped as it will perform two functions

1. Line following

2. Line maze solving

Maze solving code is still in progress.

Parts Used are

Microcontroller - Atmega328 PU running at 20MHz

Motor Driver-TB6612FNG

Sensor-Pololu QTR 8A

 

The Pololu QTR 8A has 8 IR sensors of which 6 are used as Atmega328 PU DIP package has only 6 ADC channels.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Please let us know ur robot's values of PID constants? 

can you please give me the values of P, D, and I?

also how did you scale the variables?

did you scaled the

pos = qtra.readLine(6);

pos = pos - 2500; // (center line target = 0)

did you scaled pos after this?

 

or did you scaled

power_diff = prop*p + integ*i+deriv*d;

power_diff = power_diff/scaler;

?

thanks

Where can I get the code and circuit diagram for the line following part alone?

What wheels do you use

These are Tamiya Truck Tire Set (http://www.pololu.com/catalog/product/65).Though they are made for hex shaft I have somehow fitted them in my D-Shaft motors. Pololu Wheel 42x19mm Pair (http://www.pololu.com/catalog/product/1090) should be more appropriate choice.

 

Can u send me coding? My I'd is sarath.kct@gmail.com

Thanks,My code is messy and hard to read. The base code is taken from pololu avr library (Download pololu avr library http://www.pololu.com/docs/0J20/2.a) and changed according to characteristics and pin configuration of my robot.

 

Thanks. Robot is now doing 1.5 m/s with slightly changed PID value.

As I have said before i am working with maze solving part I will test that on the weekend and upload video.

Wow. Impressively fast and snappy. I like this one a lot!