Micromouse book
Categories
Recent Comments
Meta
Popular Posts
- Simple ADC use on the STM32 (3,934)
- STM32 Arm-Cortex bootloader (2,657)
- STM32 USART basics (2,535)
- All Japan Micromouse 2011 – finals (1,970)
- STM32F4 – the first taste of speed (1,615)
- Micromouse Book (1,532)
- Nokia 3410 LCD on the STM32 (1,264)
- CodeSourcery GNU Toolchain for the ARM on a Mac (1,097)
- Bit Banding in the STM32 (971)
- ARM STM32 JTAG (921)
Blogroll
-
Upcoming Events
-
Feb6Mon
-
Apr14Sat
-
Tag Archives: tcrt5000
Bob the Line Follower – the build
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.
New line follower robot
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.
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.
Add to Google