Cub Scout Pinewood Derby Race Start Interface

An electronic "Christmas Tree" and Solenoid interface for Grand Prix Race Manager software

A friend of mine is the Racemaster for Cub Scout Pinewood Derby events in the Frederick, MD area. He uses Grand Prix Race Manager (GPRM) software to run his events. He was planning to build a pretty standard "Christmas Tree" & Solenoid interface using a parallel port, but newer versions of the software dropped the parallel port interface in favor a serial port. Unlike the parallel port versions, where the software controlled timing, the serial port versions provide only a single line each for the "Christmas Tree" & Solenoid. I was asked to help create a workable interface between the new software and the hardware.

Theory and Design

Design Assumptions/Constraints

Inputs/Outputs

Proposed Operation

Schematic and Major Components

The circuit is divided into 3 pieces: the Logic Board, the Interface Board, and the Relay Harness.

Major Components.

Theory of Operation

Logic Board. Interface Board. Relay Harness.

Construction

Both the Logic and Interface boards were built on Radio Shack prototyping boards. I chose this particular model because it wires like a solderless breadboard, letting me move my breadboard model directly to the board.

Logic Board. The components are, from right to left: USB-Serial Converter, 74C04 Hex Inverter, 4027 Dual J-K Flip-flop, 4017BC Decade Counter, and the 14-pin DIP socket (for the ribbon cable to the Interface Board). 5VDC power is provided from the Interface Board.

Interface Board. The lower board in the picture is the Interface Board. The diodes for the Pre-Stage, Stage, and Start signals are installed next to the 14-pin DIP socket (connection to the Logic Board). There are six IRF510 MOSFETs, each with an LED indicator. There are no heat sinks on the MOSFETs as they only operate in cutoff or saturation (i.e., they dissipate no significant power). The blue wires connect the Interface Board to the relay coils, via a terminal strip.

Relay Harness. As shown in the picture, I built a crude bracket to mount the electronics, relays, and wiring in the Data General drive case. I painted parts of the bracket black so that it wouldn't be visible from the open front of the case. Six relay sockets mount on one side of the vertical board. A terminal strip mounts on the other side of the board to interconnect wires from the Interface Board and relay coils. The "free-running" diodes were installed across the relay coil contacts on each relay socket (they need to be as close to the coil as possible - if you look at the front view with the sockets, you can barely see the free-running diodes attached to each socket in the gap between the socket rows [the bare wires]). I wired up the 9-pin and 15-pin chassis connectors and wired them into the relay sockets. The barely-visible number correspond to circuit numbers on the Interface Board. I used the female end of a PC hard drive power cable splitter to provide 12VDC power from the case power supply to the relay contacts for the 9-pin connector.

The following pictures show the completed mechanism before the case was assembled:

The fully assembled case:

From the front, you can see the six relays, labled for their function. An LED lights up on each relay as it is triggered, providing a "closed-case" view of proper operation. It was my intention to cover the front opening with a piece of plexiglas to keep enterprising fingers out, but I didn't get around to it before I delivered the system.

From the rear, you can see the 9-pin and 15-pin connector, as well as the panel-mount USB connector.

External Wiring Harnesses

Wiring is provided for the 12VDC "Christmas Tree" and Solenoid (schematic, 19KB PDF file) and the 120VAC "Christmas Tree" (schematic, 22KB PDF file) for creating your own setup. The 12VDC harness is powered from the power supply and the 120VAC harness is powered externally.

Other

Cost

The labor was all mine, so the total cost was materials. The material cost was about $400 (I spent around $300 for materials and my friend provided about another $100 in parts, as well as the case/power supply). The parts cost was rather expensive, as we were purchasing small quantities at retail and paying shipping. My labor and out-of-pocket expenses were donated to the Cub Scout program.

Operation

Without the USB cable connected, when the system is powered up, it cycles continuously through the stages. When the USB-Serial Converter is powered up (it's powered from the computer's USB port) and its driver initiailizes, the cycle stops at "Pre-Stage" and waits an RTS signal from the race software, indicating that a new race it to begin.

When my friend first tried to use the system at a race night, it didn't work. GPRM wasn't propertly initializing the USB-Serial interface and the system just cycled continuously. He also uses a serial race timer and GPRM didn't seem to want to talk to both serial interfaces (the race timer and my box). Afterward, the unit tested out OK, so I built a small test program to exercise the unit, which my friend used to manually trigger the unit for his second race night. His conversations with the GPRM author indicated that GPRM wasn't properly using data from its own configuration file. The author provided a patched version, which my friend used without problem in his third race night (his largest race of the season, a full-day event). Looking at the GPRM Web Site, the updates page seems to indicate that GPRM versions 7.0.1515 and later should work fine.

Oct, 2008 Conversion from USB to Serial Interface

After the end of the 2008 race season, my friend approached me about modifying the device to connect using RS-232 vice the USB interface. He obtained a Lantronix "WiBox" dual-port WiFi-to-serial converter (WB2100E). His intention was to interface to both the Christmas Tree device and his Race Timer to the WiBox and connect his laptop to the Wibox using WiFi. The Lantronix "Com Port Redirector" software will make the WiBox serial ports appear as local serial ports on his laptop.

Technical Details

To convert from USB to serial, I needed to remove the USB-Serial converter shown above, and replace it with a converter circuit. The obvious way would be to use a MAX-232 chip, but I only need to convert an incoming RTS line. I found a nice, simple converter circuit at Dale Botkin's web site. The circuit was workable, but I was concerned that his MOSFET "open" and "floating" gate design (the line from pin 3 on his web page) wouldn't cut it. The device will be unplugged and stored almost all the time, and I was afraid of static discharge a the serial connector. I was also afraid that there was no overvoltage protection for the MOSFET in case something stupid happened.

My solution is shown in this updated Logic Board schematic( 35KB PDF file). I made the following changes to Dale Botkin's design:

Construction

Below is a picture of the modified Logic Board showing the new circuit installed on the right side where the USB interface formerly resided. The "orange" components in the lower right-hand corner are the 1N5244B Zener diodes and the 2N7000 MOSFET is located toward the upper-left-hand corner of the circuit board. The green and white wires are the serial input with the RTS (DB-9 pin 7) on the green wire and GND (DB-9 pin 5) on the white wire.

I also modified the rear panel to accept a DB-9 female connector. The device still triggers on the RTS pin, just as the USB version did, so device operation has not changed (only the interface). The connector fit is a bit tight, but workable. There's also a bit of messiness where I modified the USB connector cutout to accept the DB-9 connector. Not pretty, but I wasn't prepared to cut out a new rear panel. The "Christmas Tree" connector positions were reversed because I reinstalled the panel insert backward (not paying attention to what I was doing).

Cost

The cost of this mod was pretty trivial. From Mouser Electronics, the 2N7000 MOSFETs cost about 30 cents each and the 1N5244B Zener diodes cost about 3 cents each. I bought extras and still paid more for First Class Mail than the cost of the components. The DB-9 female crimp-style connector cost about $2.50 at Radio Shack. The resistors were from my stores (one of those monster-size resistor assortments).

Testing


Disclaimer. Any and all opinions expressed on this page are solely those of the author. The author accepts no responsibility for the accuracy of data provided on this web site, nor does the author accept any responsibility for the use and /or misuse of information provided on this web site. It is the full and sole responsibility of the user to determine whether and/or how best to use the information provided within their own circumstances, and it is the full and sole responsibility of the user to accept any and all benefits and/or consquences of their actions. Please see my Privacy Policy.

Copyright 2001-2009, Tim Sharpe. You are free to use this information for personal, non-commerical use without restriction. All rights reserved for commerical, organizational, or government use. Questions or comments to tim@beaststwo.org. Flames to /dev/nul.

[Python Powered]
All the Perl that's Practical to Extract and Report

10024 visits since