I’m an IT teacher at a technical and vocational high school in Turkey. We have designed a line follower robot which we used mainly Pololu products on, and it won the first prize at The 3rd National Robot Contest (6 March 2009).
Thanks to Pololu for compact, high quality and inexpensive products, extensive stock and fast shipping.
Motor: Pololu 30:1 Micro Metal Gearmotor HP
Motor mounting brackets: Pololu Micro Metal Gearmotor Bracket Extended
Main wheels: Pololu Wheel 42x19mm
3rd wheel: Pololu Ball Caster with 3/8" Metal Ball
Motor driver: Pololu TB6612FNG Dual Motor Driver Carrier
Line sensors: Pololu QTR-8A Reflectance Sensor Array
Battery: ThunderPower 480 mAh 7.4V Li-Po
Microcontroller: Microchip PIC18F2550 at 20 MHz (10 ADC channels - 8 used)
Compiler: CCS C
PID period: 3ms
Velocity: 1.6 m/s
Turn radius: 25cm
1.6 m/s is average speed on the running track. Base motor speed is 60% of full speed. We haven’t tried it on turns with less than 25 cm radius. But I think it’s possible at approximately same speed with shorter PID period and more traction at wheels. We will be entering to another competition next weekend. So we will have chance to try this week.
What are you using as your robot controller? You might find the PID line following section of the 3pi robot user’s guide helpful. To really use PID well, you want to find a way to convert the sensor readings into a single “position” value that tells you where the line is. Ideally, the function you come up with will vary monotonically as the sensor array sweeps over the line. That is to say, as you sweep across the line, you want your position value to always increase as you move in one direction and always decrease as you move in the other. If the position value sometimes increases and sometimes decreases for the same sweep direction, the PID algorithm could result in instability problems.
As Ben says, the 3pi robot user’s guide is very helpful, so we have benefited from it. Also you should check to the following links.
PID equation: bestune.50megs.com/typeABC.htm
I have used PID equation in “type A” with only P and D term in our robot. The I term is not necessary for the line following algorithm.
e: Error reading from sensors
CO: PWM duty cycle for motors
I recommend that you review the web sites.
I wrote some code in some PID. I could not but be successful, especially in return. My program was more successful than previously. Even though I did not get the results you want great lengths. I took my time PID control. I was very tired.
Can I just wonder if the PID control routine Cenk? You look at the program for the problem easier to solve.
Features in the following way:
QTR-8A sensors card
motor speed: 1000 rpm
programming language: picbasic
PWM frequency: 20000 Hz
Clock frequency 10Mhz
Have you already study the codes written by Pololu and ChaN?
According to you, are there any missing points or mistakes on them? I don’t think so.
There are no magic codes available to get to drive any line follower robots. The codes depends on the design of robot. Also the design depends mostly on the running track. Actually our robot is not complicated, it is pretty simple.
In addition to my previous post:
Choosing the right motor controller IC:
To get the robot to be reactive, the motor driver IC should brake the motors when the PWM signal goes low. Please have a look at the control function table in the file below. pololu.com/file/0J86/TB6612FNG.pdf
And finally a 32 bit microcontroller:
We need a powerful MCU to make the PID and error calculation functions to be faster. We will use a ARM7 based header board with easy to use libraries. The Espardino micro2148 board has a LPC2148 MCU with 60 MIPS, 32K RAM and 512K flash (Woow…). espardino.com/
I have to ask you to excuse me that I haven’t noticed your post before.
Yes, you are totally right, the motor shafts applied to the tires on the desktop line follower robot. But it is not our robot. It builded by ChaN from Japan as already stated at website. This robot is just a reference for us.
IT IS: Powered by Pololu
Pololu TB6612FNG Dual Motor Driver Carrier with paralleled outputs for each motor
Pololu QTR-8A Reflectance Sensor Array
Pololu Pushbutton Power Switch SV
Pololu Mini Metal Gearmotor Bracket Pair
Pololu Ball Caster with 3/8" Metal Ball
Congratulations on winning! Thanks posting the video and thanks for posting the parts list here, it’ll be a nice resource for someone trying to clone your bot or make a fast line follower.
How did you like the Espardino micro2148 board?
I’m asking because in a future robot you could probably replace your two TB6612FNG carriers, your Espardino, and your pushbutton power switch with a single Orangutan SVP-1284. The SVP has two TB6612FNG drivers built in to it, so you would be able to get the same performance out of your motors. The only thing is that the ATmega1284 (running at 20 MHz) is less powerful than the processor you used, so I’m wondering if you needed that power and what you used it for.
LPC2148 is a 32 bit 60MIPS MCU with 32K RAM, and Espardino supports microSD/SDHC cards. All the calculations on my code take just 125 microsecond on that MCU. It means I read the line 4 times in every one milimeter. I think a 8 bit 20 MIPS MCU can run the same code within 750 microsecond. Besides I log some important data in the 32K of RAM without effecting the normal operation of the robot and then dump it to a microSD card and then analyze it in the computer. This is very useful for debugging and finding out some bugs.
I burnt one of the motor drivers when the motor got stalled last week and I could easily replace it with a new one. So, Orangutan SVP-1284 Robot Controller is not suitable for me because I am not able to solder some SMD parts. When they are seperated parts, I also can replace the motor drivers with which are more powerful than them if I need . Besides I can place the parts on the body more properly than a single big package.
Espardino + two TB6612FNG carrier + pushbutton cost $75, but an Orangutan SVP-1284 Robot Controller costs $90. Everytime I need more power at low cost
I think you could probably replace two MCUs on your controller with a powerful MCU like based on ARM7