Tag Archives: tcrt5000

Bob the Line Follower – the build

IMG_3243 Once all the parts have been chosen and the schematics drawn, it is just a case of getting on with building the bits…

Since the circuit is very simple, most it went onto a cheap bit of single-sided perfboard and is hand wired. Components live on both sides as convenient. The only constraint is that nothing be too tall to fit under the body so some bits are bent over to make room. After all, we don’t want to go racing naked do we.  The dangly bits in the picture are a single push button to allow for a dignified and controlled start-stop and a single red LED so that we can see if it is all alive. There was already space underneath for a slide switch so that it can all be turned off when not in use.

The PicKit2 programmer needs a six pin header for programming so that will need the lid off. However, as the PicKit can do serial comms through two of the pins normally used for programming, I may add a software UART to the code and a 3.5mm stereo socket at the back which would allow me to communicate with the robot whit the lid on. This will be good for testing and to download new calibration or controller values.

Sensors are mounted on a small daughter board shaped to fit into the space at the front of the chassis. A slot cut into the chassis allows the sensors to poke through and see the ground. the original caster wheel would have been in the way here so it was replaced with an upholstery nail glued to the battery cover. A spacer under the nail ensures that the sensors are about 3mm from the track. With the wheels at the rear, there will be no rocking and the sensor height will remain constant. My only concern it that with the robot tracking the line so well, it will eventually wear a line down the middle of the white stripe. OK, so perhaps it won’t – it does in my mind’s eye though – ever the optimist.

IMG_3244 Img_3239a Img_3240a

Continue reading

Posted in Line Follower | Tagged , , , | Leave a comment

New line follower robot

Img_3222a Line followers are a perennial favourite of the small robot builder. It is not hard to make something that will bumble about and follow a line marked out on the floor. the technology can be very simple but the same basic idea is used in sophisticated robots on factory floors. The tricky part is in making the line-follower fast and smooth in its response. Whether or not I can do that remains to be seen but I am going to have a go …

 

There has been a bit of discussion lately about a simple line-following competition to replace a couple of the schools contests at the micromouse events. You can see the proposal on the forum:

http://www.micromouseonline.com/forum/viewtopic.php?f=3&t=281

So that there is at least one entry, I agreed to build a follower in time for the November RoboTic event in Birmingham (http://www.tic.ac.uk/micromouse/ROBOtic08.asp).

Right, the question is, what to make it out of. I looked at various options for motors and was about to order some small gearmotors. These came in at about £12 each and would need wheels making and tyres fitting.

IMG_3222 Then I happened to be in Maplins and I saw a pair of radio controlled dodgem cars. These are supposed to be driven against each other in a little competition that would be unlikely to be entertaining long after Boxing Day. However, they were differentially steered with the wheels at the back and looked ideal for a conversion. At just £19.99 for the pair, they were considerably cheaper and easier than making it all from scratch although unlikely to be blindingly fast.
IMG_3229 Once you open it up and strip out the existing control board, you are left with what seems to be a perfect base for experimenting. With the wheels right at the back and a convenient location right near the front, it could have been made for the job. The motors draw about 800mA when stalled on a 4.5V supply and the 3 AA cell holder will allow the use of cheap Alkaline cells to run the thing. The processor should be happy at that voltage although noise might be an issue.
IMG_3230 I did also look at the commonly available chassis you see on the left. This is used in a variety of robots and robot kits. It is good to work on with mounting points for the circuit boards and sensors as well as a convenient holder built in for four AA cells. Ideal for NiMH batteries. However, when tested, not only is it quite small, it makes an amazing amount of noise and would keep the household up at night. Good enough choice if you can’t find the dodgems though.

For the controller, I chose aPIC18F252 because I happened to have three of them spare. the newer 18F2520 might be a better choice now. the PIC is handy because development tools in the form of MPLAB,  the PicKit2 and a C compiler are easy to get. The software is free and the PicKit2 can be had for very little cost considering its versatility.

Sensors are the Vishay TCRT5000 IR reflective sensor available from Farnell among others. With an eye to future development, I chose to put five sensors in the beast. This should give me better than needed resolution and will allow a ‘proper’ PD controller rather than the usual on-off type of control seen when only using two detectors. Of course, various simpler digital control schemes  can be tried anyway with these sensors. I was specifically looking for versatility so that I can experiment with a range of strategies.

To drive the motors, I was going to use the ubiquitous L293D. However, these are not terribly cheap now and I have no obvious requirement to drive the motors in any direction other than forwards. After a poke about in the parts trays, I found a collection of TIP122 Darlington transistors. These will handle plenty of current. To be on the safe side, I added flyback diodes across the motors although I would expect the TIP122 to survive anything these little motors can generate. We will soon see.

With all the parts decided, it is time to get building.

Continue reading

Posted in Line Follower | Tagged , , , , , | 4 Comments