Line Following Robot

About Line Follower
The line follower is one of the self operating robot that follows a line that drawn on the floor. The basic operations of the line following are as follows:- Capture line position with optical sensors mounted at front end of the robot. Most are using several number of photo-reflectors, and some leading contestants are using an image sensor for image processing. The line sensing procss requires high resolution and high robustness.
- Steear robot to track the line with any steearing mechanism. This is just a servo operation, any phase compensation will be required to stabilize tracking motion by applying digital PID filter or any other servo argolithm.
- Control speed according to the lane condition. Running speed is limited during passing a curve due to friction of the tire and the floor.
Hardware
Mechanics

The line following robot is upheld in three points of two driving wheels and a free wheel. The driving wheels are made with a 7 mm dia ball bearing and a rubber tire. The free wheel is a 5 mm dia ball bearing attached loosely. To drive driving wheels, two tiny vibration motors that used for cellular phone, pager or any mobile equipment are used. Its shaft is pressed onto the tire with a spring plate, the output torque is transferred to the wheels.
The steearing mechanism is realized in differential drive that steear the robot by difference in rotation speed between the left wheel and the right wheel. It does not require any additional actuator, only controling the wheel speed will do.
Electronics
Controller | ATmega8 (Atmel) |
Line sensor | Six photo-reflectors |
Power supply | Two CR2032 lithium cells (One is for controller, the other is for motors) |
Motor | Two micromotors for left wheel and right wheel |
Dimensions | 45(L), 33(W), 12.5(H) [mm] |
Weight | 15 grams (Body:8g, Cells:7g) |
Performance | 53 centimeter per second at oval course |
Software
Using photo-reflectors

Most photo-detecting modules for industrial use are using modurated light to avoid interference by the ambient light. The detected signal is filtered with a band pass filter and disused signals are filtered out. Therefore only the modurated signal from the light emitter can be detected. Of course the detector must not be saturated by ambient light, this is effective when the detector is working in linear region.
In this project, pulsed light is used to cancel ambient light. This is suitable for arraied sensors that scanned in sequence to avoid interference from next sensor. The microcontroller starts to scan the sensor status, sample an output voltage, turn on LED and sample again the output voltage. The difference between the two samples is the optical current by LED, output voltage by the ambient light is canceled. The other sensors are also scanned the same avobe in sequence.
Signal processing of line detection

Tracking control

The proportional term is the commom process in the servo system. It is only a gain amplifire without time dependent process. The differencial term is applied in order to improve the responce to disturbance, and it also compensate phase lag at the controled object. The D term will be required in most case to stabilize tracking motion. The I term is not used in this project from following resons. The I term that boosts DC gain is applied in order to remove left offset error, however, it often decrease servo stability due to its phase lag. The line following operation can ignore such tracking offset so that the I term is not required.
When any line sensing error has occured for a time due to getting out of line or end of line, the motors are stopped and the microcontroller enters sleep state of zero power consumption.
Notes

- Development diary [Ja]
- Circuit diagram
- Firmware
- Following motion with only P control
This is a video file of line following motion with only P control. The servo system oscllated. - Following motion with P and D controls
Adding D control could improve the servo stability. The robot follows the line correctly. Therefore the servo parameter must be optimized for mechanical characterristics to improve the tracking stability.

Tidak ada komentar:
Posting Komentar