I used an Arduino Duemillanove with the ATMega 328. Propulsion is provided by the two Parallax Futaba Continuous Rotation Servos. My sensor is the Pololu QTR-6A IR Reflectance Sensor Array, and it is all powered off 4 rechargeable NiMH Duracell AA Batteries :)
It can follow a dark like, on a light background. In this case i used black tape on a whiteboard. It first calibrates itself for 5 seconds. You move it across the line a few times so it gets used to the difference in reflectance. After the calibration it begins moving foward. I used an algorithm to determine its error off the line. If it determines through the algorithm that it is at an extreme error, it will turn for a longer amount of time. Similarly, if the robot determines it is only a fraction of an inch off the line, it will only turn for a fraction of a second. This reduces over compensation and makes the line following a little smoother and more reliable.
This is the code I used, I started it from scratch and added the MegaServo Library. I'm aware that there is a library for the Pololu IR sensor arrays, but I encountered problems so i decided to start from scratch with the sensor reading as well. I'm using the Analog version of the Pololu sensor array, as opposed to the RC version, which outputs a digital signal. My sensors output an Analog voltage based on the reflectance of the surface. For example, if you are providing 5V to the sensors at Vcc, and you encounter a dark surface, that sensor will output a a voltage closer to 5V. Conversely, if the sensor encounters a very reflective, (white surface) it will output closer to 0V. I can read these 6 Analog outputs from my 6 sensors through the 6 Analog I/O pins on my Arduino.
In addition, my STOP algorithm uses nested if statements to check 3 times if the robot is really at the end, before it stops for 10 seconds, blinking the light. This prevents an accidental stop in the middle of the track due to inaccurate readings or glitches. During calibration, I calculated an average value of reflectance which i use later on to help with the navigation and decision making. I also printed some data to the Serial screen for testing purposes.
@zeeshanamriya See his instructable on Instructables
He has his email listed in the comment. Youtube is not letting me post direct link to his Instructable
snyperbob 2 months ago
could you give your email id so that i could contact you. i wish to know some specifications
zeeshanamriya 3 months ago
@kyCap222 I used the same robot for another project involving ultrasound mapping. Its not active in this video.
aduff64 7 months ago
@kyCap222 maybe because if suddenly an obstacle falls in front of the robot and you don't want to damege it driving against...
jamesbond0096 10 months ago
@jamesbond0096 Yes it is but why?? its a line follower.
kyCap222 10 months ago
@kyCap222 I think ist a Ping))) ultrasonic distance sensor.
jamesbond0096 10 months ago
Y is there a sonic detector on the front?
hayden
kyCap222 11 months ago
Very Nice!!! That's awesome man!! :D
Yarotryuki 2 years ago
wow! it must have taken you foreverrr to make that! it's amazing! but it could really use some sort of designnn or color. pink in my opinion would be best. oh and your hands are reallyyyy flawless looking. they look good for stuff and things... like robots of course...
09tehee 2 years ago