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;