Micromouse book
Categories
Recent Comments
Meta
Popular Posts
- Simple ADC use on the STM32 (4,106)
- STM32 Arm-Cortex bootloader (2,803)
- STM32 USART basics (2,703)
- All Japan Micromouse 2011 – finals (2,011)
- STM32F4 – the first taste of speed (1,690)
- Micromouse Book (1,587)
- Nokia 3410 LCD on the STM32 (1,337)
- CodeSourcery GNU Toolchain for the ARM on a Mac (1,145)
- Bit Banding in the STM32 (1,045)
- ARM STM32 JTAG (973)
Blogroll
-
Upcoming Events
Tag Archives: 18f252
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