Hornby, the line follower

Posted on 17/10/2012 by mpmumau
Modified on: 13/09/2018
Project
Press to mark as completed
Introduction
This is an automatic import from our previous community platform. Some things can look imperfect.

If you are the original author, please access your User Control Panel and update it.

  Hornby (named for the guy who invented Meccano) is an autonomous line-following robot cobbled together from minimal parts. It is my first effort at a small-scale robot, and I hope it will help me refine my knowledge of what the Arduino is capable of on a minimalist level. The key ingredient to Hornby's operation is a custom-built IR sensor circuit, which uses three pairs of "Infrared LED Emitter and Detectors" from Radioshack (part #276-142 for all those who frequent the Shack). The "emitter" ...


Hornby, the line follower

 

Hornby (named for the guy who invented Meccano) is an autonomous line-following robot cobbled together from minimal parts. It is my first effort at a small-scale robot, and I hope it will help me refine my knowledge of what the Arduino is capable of on a minimalist level.

The key ingredient to Hornby's operation is a custom-built IR sensor circuit, which uses three pairs of "Infrared LED Emitter and Detectors" from Radioshack (part #276-142 for all those who frequent the Shack). The "emitter" is an LED light that sends out infrared light, whereas the "detector" is actually a photodiode that, as I understand it, allows current to pass through it if it's blasted with infrared light. Infrared light will not reflect from a black surface, whereas it will from a white, which is exploitable for the purposes of creating a sensor.

I have added the IR sensor array to LMR as a component, with the Fritzing file I used to make the circuit, for all who may be interested in making a similar circuit on the cheap (it cost less than $15 to build to relatively easy to find Radioshack parts.)

For mechanics, I wanted to use only a minimal amount of Meccano parts, as I figured that would keep complexity down and get me to the state of programming much more quickly than anything else. The "actuators" are twin motors ala the ever-so-hip Tamiya dual motor gearbox. I'm also using these fancy, thin rubber Tamiya-compatible tires. The official Arduino motor shield controls the motors. The shield is basically a trumped up dual H-bridge, and has current-detecting bells and whistles.

The entire Arduino Uno/motor controller brick of awesomeness is rubber banded to the Meccano base. Office supply engineering for the win. 

Update Log

October 17, 2012

This is the initial posting of the bot. At this stage, the programming still needs some tweaking. In general I need to experiment with the bot more, as while it seems to be detecting lines drawn on a peice of white cardboard well enough, it often goes too fast, and doesn't turn properly.

I believe the small Meccano plastic wheel in the back might mechanically not be cutting it, as the robot seems to have difficulty turning. Not exactly sure how to fix that, but I'll keep working on it.

And yes, I know everyone likes videos, and I will have one soon. I promise :)

October 18, 2012

I attached a video to this post to demo some of the difficulities I'm having with this bot at the moment. It seems to be having a torque problem, which I'm not exactly sure I understand. Hopefully the video explains my troubles a bit. Any ideas? At this point my only thought is that I need to use motors with higher torque. Not quite sure yet.

October 19, 2012

So, it turned out that the problem with this little guy was that the Tamiya twin-motor gear box needed to be re-geared to a high torque setting. I busted out the directions and rebuilt the gear box, and lo-and-behold it seems to work fine.

Someone had suggested that perhaps the problem was the voltage I'm using on the motors (a separate power source to the motor controller at 6v). It' true that the specs for the motors for the gearbox are 3v. However, if I use only a 3v AA battery box, the motors only seem to barely turn. Some of that, I'm guessing, is because the motor conroller itself eats up some of the power.

I also had to slow down the motors speeds during turns, as otherwise Hornby would overshoot the turns, and more or less keep going in a circle. Simply giving the motors an analogWrite of 150 during turns (as opposed to 255 during straightaways) solved that problem.

I may continue to experiment with this little guy by perhaps giving him some sound effects, or perhaps an LED face, but for the sake of what I was attempting to accomplish, it's basically complete. 

Mission accomplished on my first successful bot!

 

Line Follower

  • Actuators / output devices: tamiya dual motor gearbox
  • Control method: autonomous
  • CPU: Arduino
  • Operating system: Arduino
  • Power source: 4 AA batteries
  • Programming language: Arduino
  • Sensors / input devices: 3 IR LEDs and Detectors
  • Target environment: indoors
Flag this post

Thanks for helping to keep our community civil!


Notify staff privately
It's Spam
This post is an advertisement, or vandalism. It is not useful or relevant to the current topic.

You flagged this as spam. Undo flag.Flag Post