can be downloaded for free from Microchip’s website
( www.microchip.com). For this project, all you have to do
is open the slot car program in an MPLAB project and
assemble the source code.
You will also need a programmer/debugger interface
so that you can program the slot car via the programming
header (see Schematic 1 and Figure 2). The MPLAB ICD 2
Module (part #DV164007) for $189.99, PICkit™ 2 Starter Kit
(part #DV164120) for $49.99, or PICkit 1 Flash Starter Kit
(part #DV164101) for $36 can be used to interface between
your computer and the microcontroller on the slot car drive
circuit. Keep in mind that each of the following programming
interface kits will require a different programming header
on the circuit board that will attach to the slot car. For this
project, I used the PICkit 1 Flash Starter Kit, so the header
you see in Figure 2 will connect to the PICkit 1. All of
these devices can be purchased from Microchip’s website.
Basically, all you’re doing is taking an existing electric
slot car set and giving it some intelligence by installing a
microcontroller circuit between the voltage source and the
brushed-DC motor. Then, by putting IR LED sensor circuits
under certain sections of the track and programming the
microcontroller to read these sensors, you’re giving the slot car
a way of knowing where it is and what to do while it is there.
Figure 6 shows the completed project with all four
track sensors in place, and both modified and unmodified
slot cars on the track ready to race. Before starting this
project, I knew very little about slot cars. After building
this project, I found that I learned a lot and was very
pleased with the final result. The set performed great for
what it was programmed to do, but it still has limitations,
1) Reston Condit, Application Note #AN905, “Brushed DC
Motor Fundamentals;” DS00905A; Microchip Technology,
Inc., © 2004.
2) Mike Rylee, Application Note #AN893, “Low-Cost
Bidirectional Brushed DC Motor Control Using the
PIC16F684;” DS00893A; Microchip Technology, Inc., © 2003.
3) Jamie Dunn, Application Note #AN898, “Determining
MOSFET Driver Needs for Motor Drive Applications;”
DS00898A; Microchip Technology, Inc., © 2003.
4) PIC12F683 Datasheet, DS41211C; Microchip Technology,
Inc., © 2006.
such as no reverse or changing lanes.
In Figure 6, the microcontrolled slot car is on the
inside lane and the unmodified slot car controlled via the
handheld rheostat is on the outside lane.
Being an electrical engineer, my next thought on this
was to make it bigger and better. After spending an
extended lunch hour at a local hobby shop, I found that
you can get larger slot cars with more track options (take
a look at www.scalextric.com) such as side-swipe sections,
lane changes on straight-aways and in turns, and pit-stop
sections. Single lane setups for cars or motorcycles also
exist. With a little modification to the brushes on the cars,
you can give the slot cars the option of reverse. This would
involve using a full-bridge drive circuit instead of a half-bridge.
As you can see, the options are endless. So, before I
leave you to hours of fun, my only advice is to include
family and friends, and plan out your ideas before you
implement them. NV
ITEM COMPONENT NAME QTY PATTERN NAME VALUE
❑ C7 CAP-CRCW0603 1 CAP0603 27 pF
❑ C3, C5, C6 CAP-CRCW0603 3 CAP0603 100 nF
❑ C1, C2, C4 CAP-CRCW1206 3 CC1206 10 μF
❑ J1 CNN-HDR-2MM-2X4-SMT 1 CNN-HDR-2MM-2X4 2MM SMT
❑ D3 DIO-1N5817-MELF-DL41 1 DIO-MELF-DL- 41 1N5819
❑ D1, D2 DIO-LL4150-MINI-MELF 2 DIO-MINI-MELF-GLASS LL4150
❑ Q3 FET-IRF7509-NPCH-DUAL-MICRO- 8 1 MICROMAX-8-PIN IRF7509
❑ Q1 FET-NTJD4001N-NCH-DUAL-SOT-363 1 SOT-363 NTJD4001N
❑ U1 ICP-PIC12F629/SN 1 SOIC-8PIN-150”, PIC12F683/SN”
❑ R1 RES-CRCW0603 1 RES0603
❑ R2 RES-CRCW0603 1 RES0603
❑ R4, R5 RES-CRCW0603 2 RES0603
❑ R3 RES-CRCW0603 1 RES0603
❑ R7 RES-CRCW0805 1 RES0805
❑ R6 RES-CRCW1206 1 RES-CRCW1206
❑ Q2 TRS-PHOTO-PNA1601M-2MM 1 TRS-PHOTO-PNA1601M-2MM
❑ TP1, TP2, TP3 TSP-P60R38 3 TP-60R38
❑ VRG1 VRG-LM78L05ACM-8-PIN-SOIC 1 SOIC-8PIN-150”, LM78L05ACM”
NOTE: Parts list for slot car circuit only. All the parts used for this application are shown. There are other equivalent
parts that can be used, as well.
May 2008 51