InLine

This is an arduino based line follower robot with obstacle avoidance system.

https://www.youtube.com/embed/ijEDKRIHmSU

 

1. Robot structure description

Chassi and wheels: It uses a chassi kit, I bought one from aliexpress: http://www.aliexpress.com/item/Free-shipping-4WD-Smart-Robot-Car-Chassis-Kits-for-arduino-with-Speed-Encoder-New/32352434214.html?spm=2114.32010308.4.83.pxDjb9

Engines: 4 5V engines with reduction gearbox;

Microcontroler: Arduino Mega 2560;

Sensors: I created my line sensor using an PCB and five TCRT5000. The TCRT500 is an simple kit containing an infrared emitter (850nm), phototransistor and an small plastic support holding the led and the phototransistor. Unfortunately, only after done I understood that every sensor would make different readings from the same color, and I used a simple algorithm to compensate these differences between the sensors.

Energy: I used four batteries, and Im not powering things from my arduino. I used a small connector bar connected to the batteries, so everything can get its energy from this bar.

 

2. Lessons learned

a. Always use capacitors between engine pins, it'll prevent undesirable voltage peaks;

b. For an line follower, 2 wheels is the best configuration. My robot has 4 wheels, but none of them can turn to allow maneuvers, to allow this I need to add a servo, so basically a good robot with 4 wheels will need 5 engines. More engines means less energy and more weight . Make it simpler: use only two wheels.

c. Use colored wires for each purpose and labels on every cable. Its a matter of organization. Sometimes you will need to use a lot of wires and it will create a mess, so try to use colored cables/wires and labels. In my case, I had no colored cables or an expensive Hellerman Tyton label kit, so I used a white tape to create my labels (a poor man's choice, hehe, but it works);

d. The TCRT5000 is a good choice to create your line sensor, but you can make a good sensor using infreared led and the right fototransistor, but keep in mind that you will need to follow the same nm spec for both emiter and receiver;

e. Use analog pins to read your infrared sensors;

f. Use a trimpot (20k) and am OP AMP (lm741) for each TCRT5000. It will allow you to make a fine tune in your sensors;

e. Avoid to power your sensors (or something else)  from your arduino;


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

Hey what robot chassis did you use if any?

Dear: Nandoviel

What robot chassis did you use if any? Please give us some more information that would be appreciate!!! Thank you.

From: Noah

Very very good Viel. Keep

Very very good Viel. Keep working and I hope to see soon a new version of your robot.

Thanks for your commments!

Hi guys, thank you very much for your comments, I’ll review my text and I’ll add more details about this robot.

nschreiber0813 - You are right, I used a chassi kit:  http://www.aliexpress.com/item/Free-shipping-4WD-Smart-Robot-Car-Chassis-Kits-for-arduino-with-Speed-Encoder-New/32352434214.html?spm=2114.32010308.4.83.pxDjb9

It’s called “smart car” by its seller, but take a look at my video and you’ll see a not so smart car  :) : it’s because this chassi doesn’t allow my robot to turn its wheels. Right now I’m working im a new version of my robot, making some changes and adaptations to allow it to turn its wheels.

Hehe, my robot needs to “shake” to make maneuvers… When loses central line sensor signal, it does a small maneuver, going backwards for few milliseconds and quickly inverting engines from each side.

My new robot is almost done, the new version will allow it to turn its front wheels, making maneuvers an easier task.

Nice robot chassis and thank you for the update.

Dear: Nandoviel

Nice robot chassis. I thought you used a different one but I wasn’t sure. Cool keep up the good work. Anyways good luck!!!

From: Noah

Thanks guys!

I’m making some changes on my robot, today I finished my new power connector bar, with a power indicator led and a push button to activate it… Soon I’ll finish my new line sensor, with OPAMP and trimpots to make the fine tune.

Thanks!

low power

Hi Duane!

   Today I’m using four NiMH AA 1,35V batteries (total: 5,4V), so I’ll add more batteries…

   I’ll increase the batteries number and I’ll tell you if it worked! 

Thanks a lot!

It would steer like a

It would steer like a tracked tank. A two wheeled would be more manouverable.

Thanks Duane

Duane, you are right, with 12V it worked much better: the robot finished the same track using half the time (27 seconds)! Now I need to think about how to operate the engines with its new stronger behavior .

Right now I’m reviewing it’s code, originally it was built using C, and now I’m using C++. The new code is working very well, my line sensor is already using c++.

 

Thanks a lot!

Thanks Duane

Duane, you are right, with 12V it worked much better: the robot finished the same track using half the time (27 seconds)! Now I need to think about how to operate the engines with its new stronger behavior .

Right now I’m reviewing it’s code, originally it was built using C, and now I’m using C++. The new code is working very well, my line sensor is already using c++.

 

Thanks a lot!