Introduction: Parallel Port Speed Calculator

About: Sometimes my Instructables are few and far between, but I try to make them as well as I can. Hopefully you can be inspired or helped by the content in them!

Here's a neat project that can measure how fast something is going. It's very easy to make, requires few parts, and is fun to use. It simply plugs into a computer's parallel port, and using some software, can record an object's speed.

It works by measuring the time it takes you to step on each of the pads, then converts that to miles per hour and meters per second.

Thanks to this site for part of the code.

Step 1: Tools and Materials

This is a pretty low-cost project, but still works very well. Most of these things you should already have.

Materials:
Aluminum Foil
Scissors
Duct Tape
Cardboard
An old Parallel Cable
Wire (Speaker wire preferable)
Heat Shrink Tubing (Optional)

Tools:
Old Windows 95/98/ME Computer (More on this later)
Heat Gun (Used with heat shrink tubing, optional)
Hot Glue Gun
Soldering Iron
Solder
Helping Hands

Step 2: Making the Pads - Part 1

The pads we are going to make are going to be very low-cost. You can make nicer ones that will last longer, if you like.

Take the cardboard, and cut pieces that are about 9" by 4". You need four of these. Cut four sheets of aluminum foil that are the same size as the cardboard, but about 1 1/2" shorter. You don't want to make them as long as the cardboard, because then you would have no space to glue.

Step 3: Making the Pads - Part 2

Now we need to attach the aluminum foil to the sheets of cardboard.

Center the aluminum foil on the cardboard. Take a piece of duct tape and use it to tape the aluminum foil to the cardboard. Place the tape about a centimeter in to the foil. Try to keep the foil as flat as possible.

It's a good idea to put a dab of hot glue in the center of the aluminum foil before you tape it; it'll hold the foil in place and provide a bump for the two plates to make contact.

Step 4: Making the Pads - Part 3

Now it's time to finish up the pads.

Cut pieces of wire about five feet in length. We need two wires for each pad. If you are using speaker wire, you only need to cut two pieces. For normal wire, four.

Get out your glue gun and some tape. Tape the exposed wire to the aluminum foil, then glue the insulated part to the cardboard so it won't be pulled out. You could use staples to stick the wire to the aluminum foil, I chose to use tape.

Time to glue the pads together. On one of the pads, put a small pile of glue on each of the corners. Wait until it dries, then put a little more glue on top. Place the other pad on top of it, trying to keep a half centimeter of space between them. This is to keep them far enough away from each other so that they don't get set off accidentally, but will still be easy enough to press.

Tip: When you are gluing the corners, don't get hot glue strands on the aluminum. They will make the aluminum stick together the first time you step on them, and that is not good.

Step 5: Creating the Parallel Interface

You need a way to attach this to your computer, right? In this step we will modify the parallel port plug to accommodate the pad wires.

If you're lucky, you got a printer cable that can be easily taken apart and put back together. Mine had small screws that allowed for quick and easy disassembly.

Once you have the connector open, you should have everything shown in picture 2. I threw away the screws used to keep the connector attached to the computer, I don't use them anyway.

Desolder all the wires from the connector. We only wanted the printer cable for the connector. You could also just buy a connector from Radio Shack. I saved the small rubber cable "decorator" shown in picture 3. You don't need it, but I kept it to make the connector look nicer.

We only need pins 12, 13, and 20-25. 12 and 13 are input pins, and 20-25 are all ground pins. Take one of the pads, and thread it's pair of wires through the rubber "decorator". Solder one of the wires to pin 12, and the other to one of the ground pins. Do the same for the other pad, but use pin 13 instead of 12.

It should now look like picture 6. Before you put the plastic hood back together, you should test the pads to make sure it works and that there are no shorts. Use the below program; it was made for Microsoft Quick Basic. To use it, start the program. The number you see on your screen is the "resting" position for the pads. Press one pad, and the number should change. Press the other, and a different number should appear. If not, check your connections and make sure there are no shorts.

For me, the "resting" number was 127, pressing pad #1 yielded 111, and pad #2 was 95. Remember yours, they will be important later.

Program:

10 LET PinStatus = INP(889)
20 LOCATE 10, 1
30 PRINT Pin Status
40 GOTO 10

In the first line, 889 is the standard address for parallel port input lines. Yours may be different.

Attachments

Step 6: Finishing the Interface

If all is working well, then you now need to put the plastic hood back together.

Tie a knot in the wires, so that they cannot be pulled out of the connector, and screw everything back together.

Step 7: The Software

The software used was written by me, with a small portion from qwerty.com. To use it, you need an older Windows 95/98/ME computer and Microsoft QuickBasic. The older computer is essential because newer computers do not allow for direct control of the parallel port. QuickBasic can be downloaded from Microsoft here. The program is included in a BAS file at the end of this step.

Start qbasic.exe and open the BAS file from this step. Press Shift+F5 to start the program. You will be greeted with an intro screen. Press a key to continue.
Enter the amount the pads are spaced apart, in meters. Press enter.
The program will then wait for the first pad to be pressed.
Once that has happened, it waits for the second pad to be pressed.
Some text will pop up, saying how fast you went in m/s and mph.

If, in step 5, your numbers were different than mine, follow this procedure to correctly change the program.

Open the BAS file in Notepad or some other text editor. Find lines 200 and 250. See the numbers, where they say 95 and 111? You need to replace those with your numbers. Once you do that, save the file and close it.

You could write your own software, too. You just need to know how to program BASIC. The key is the timer, which is located in lines 230-280. If you don't get how to use it, see this page and look under "Got a Minute?". This is the original code, which can be modified to be used essentially as a stopwatch.

Step 8: Start Running!

That's it! You're finished! Plug it in, start up the software, and try it out! I can run at 16mph. Beat that!

I labeled the pads, so I know which one is pad #1. Also, make sure that you enter the correct value for the pad spacing, because that could really mess things up if you don't.