■ FIGURE 2. Schematic for electronic
Hot Wheels drag race system.
the BasicATOM chips. After writing your code, you simply click
the Program button in the BasicATOM IDE screen and the software will compile the Basic language code, produce a .hex file
with the binary ones and zeros, and send it to the BasicATOM
chip through the PC’s RS-232 port and into the BasicATOM
chip via the bootloader. The BasicATOM chip will receive the
.hex file and write its own program memory. (The program will
start running as soon as the download is complete.)
You can’t just connect the BasicATOM chip to the PC
serial port, though. The communication between the
BasicATOM chip and the PC requires a level-shifter circuit to
convert the +12V, -12V RS-232 signals into the 0V, 5V signals
the BasicATOM chip can work with. There are various RS-
232 converter modules available on the Internet, but most
don’t include all the necessary connections required for the
BasicATOM. Most of these modules only have the Tx and Rx
pins. The BasicATOM software also
uses the DTR pin of the serial port to
put the BasicATOM chip into programming mode/run mode. Just having a
reset button won’t work.
I designed my RS-232 breadboard
interface module to include the reset
feature, since I also use it with various
bootloaders that will automatically
reset the micro. I use this setup with
the PICBASIC PRO compiler and
microEngineering Labs’ MicroCode
Studio Plus bootloader. The RS-232 module makes it
real easy to connect the PC to a BasicATOM chip with just
a couple of simple connections, as described earlier.
The BasicATOM will also work with the USB port if you
use an RS-232-to-USB converter cable. The schematic shows
the connections, so you can wire it up with discrete
components in place of my RS-232 module. In Figure 3, you
can see the BasicATOM28B chip, along with the wired up
RS-232 breadboard module.
I wanted to make my system non-contact so it would not
interfere with the Hot Wheels cars racing down the track.
One of the changes they made to the classic track was to add
holes at both ends of the flat part. These are there for custom
track connectors, but when the track
ended up on flat ground, they weren’t
used. I decided to find a sensor to fit in
that hole. At first, I thought about using
a CdS cell, but that would require a
separate light source to shine from
above. Then I remembered my servo
sensor design which I used to monitor
rotation of a robotic wheel (see Figure
4). It uses a QRD1114 reflective sensor.
■ FIGURE 3. BasicATOM28 chip and
RS-232 breadboard module.
July 2007 99