Line Follower

It's a line following robot that stops when there is an obstacle in the way and it can also keep track of time for each run. Currently I really want to include a wheel encoder on it, but it's pretty hard since the diameter of the wheel is so small.

Originally it was a mouse maze robot, now I've ripped out all but one of the IR sensors and installed a reflectance sensor array to do line following tasks. Two things that really tick me off about those IR sensors. First thing is that the sunlight can really mess things up and the second thing is the positioning. I also want to try ultrasonic sensors which shouldn't be affected by the sunlight, but its response is gonna be slower.

Please share any good ideas or information with me.

Thanks.

(more)

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/line-follower

Thinking similar

I also am playing with both ultrasonic and IR sensors. I use sharp sensors and haven’t had the sunlight problem yet. The ping seem OK but a little overkill. Thinking of trying the cheapo ultrasonic motion detectors. They just give a simple hi lo signal but do have a lag reset time. Mabe using more directional IR sensors with shades might correct the sunlight problem unless going straight into sunrise or sunset. Any light sensor can only do so much. Also thinking color sensors in theory but not that far along yed. That one may require lenses.

 

Thinking similar

I also am playing with both ultrasonic and IR sensors. I use sharp sensors and haven’t had the sunlight problem yet. The ping seem OK but a little overkill. Thinking of trying the cheapo ultrasonic motion detectors. They just give a simple hi lo signal but do have a lag reset time. Mabe using more directional IR sensors with shades might correct the sunlight problem unless going straight into sunrise or sunset. Any light sensor can only do so much. Also thinking color sensors in theory but not that far along yet. That one may require lenses.

 

Chassis, wheelbase and ball caster
I think my wheelbase is too long, but I have no choice because of the shape of the Tamiya gearbox and the large ball caster in the front. I think a circular shaped chassis is ideal. Speaking of ball caster, originally I had a pingpong ball at the front and it generated more friction over time, thinking that buying a ball caster specially made for this type of robot would solve the problem, big mistake. At first it was alright, but just like the pingpong ball it got bad and really bad as you might be able to tell from the noise the robot makes apart from the gearbox. I reckon tracked vehicle is still the way to go for a differential drive.

I get what you mean. It’s a
I get what you mean. It’s a weight distribution problem.

same problem i had on my
same problem i had on my maze solver. The battery pack is on top and is very heavy, at first it was towards the front and the robot wasnt following the line very well. So i moved the battery pack back a lot and that makes the wheels more in the center of the weight now and it works a lot than it did when i first put it together. But yours is way better at line following then mine was to begin with.

with ultrasonic
I have created a robot obstacle, using ultrasonic and can work well and quickly, I use AVR microcontroller series ATMEGA 16. This example sourcecode for the use of ultrasonic.

unsigned char x, ping1;
unsigned char doPing1 (void)
(
unsigned char dataPing;
DDRA = 0x01; / / PB0 as output
PORTA = 0x01; / / set SIG 1
delay_us (3); / / Delay 3 us
PORTA = 0x00; / / reset SIG 1
delay_us (900); / / delay 700us
PORTA = 0x01; / / set SIG 1, input
delay_us (2); / / Delay 3 us
DDRA = 0x00; / / PB0 as input
PORTA = 0x01;
TCNT0 = 0x00;

while ((Pina & 0x01)! = 0x01) / / wait until high
;
TCCR0 = 0x07; / / start timer 0, clk/1024 prescalling
while ((Pina & 0x01)! = 0x00) / / wait until low
;

TCCR0 = 0x00; / / timer 0 off
DDRA = 0x01; / / PB0 as output
PORTA = 0x00; / / reset SIG 1

dataPing = TCNT0; / / get data
/ / delay_us (100);
return dataPing;
)

if only for a line follower,

if only for a line follower, I think you just need a simple design, with the proximity and LED photodioda given sheath that sunlight does not interfere. We used the gearbox to make Sendir and dc motor with a CD-R.

|x

|x

|x