This is the top view of my driver board. The driver board
hooks up to the computer's parallel port via a db25 connector.
The schematic pic explains it in detail, this is just the way
I implemented it using a Radio Shack 276-168B project board
and a bunch of 1K resistors. Shown is a single RJ45 connector,
you can actually have 7 of these (I will have 6 on this one)
to support each controller, all wired to exactly the same row
except the brown wire. That, in my case, is ground and is
what the software watches to see if the joystick buttons
have been pressed. Note in this pic brown goes directly to
the DB25 at pin 2, that's joystick0. Each pin 2-8 inclusive
is an input line for a different joystick, thus you can have
seven max.
This is the bottom of the driver board, so you can see the very
simple connections. Oh, the RJ45 connector I am using is the
vanilla house-wall type sold at Home Depot, brand is Leviton
and eventually will snap into a pretty faceplate. THAT is why
I am only wiring up 6, because the face plates come in 1, 2, 3,
4, or 6 ports and it was as many as I could get. Come on,
neatness counts! This all has to mount in a user-friendly box,
no Frankenstein octopus-wired ugly thing for me.
This is the inside of the controller. Actually, every one of
the controllers are wired identical; it's the plug they plug
into that makes the difference. Very simple, one side of the
button goes to one of the diodes that are inline with each
of 7 legs from the RJ45, and the other side of the button
wires commonly to ground (in this case, wire 8 of the RJ45).
Very, very simple wiring using a Radio Shack 276-150 mini
project board.
This is the finished product, a good sized easy to use box
with rainbow colored buttons on it. The idea was you see an
answer you want on the screen, say the "red" one, and then
you push the red answer. Even kids figure it out really
fast. (Don't know about French folks yet, I'll have to have
Robert and Eric try it to see what happens.)
This is a handy pic of a serial port broken down by data lines,
the first part is a normal port and the second is the port
showing extended data lines when you tickle it the right way.
Thanks to Steffen Schwenke (see next pic!) this made things
very clear to me what was going on, and his C software was
helpful in deriving my Java code.
This is the schematic I swiped from Steffen Schwenke,
a genius guy who came up with the hardware solution years ago
that I stumbled across. VERY helpful guy, and got right back
to me when I had a novice question that he's probably been asked
a million times. Visit his site if you want to know the real
engineering nitty-gritty behind how this works.
THANKS to
Steffen Schwenke's
most excellent web page!
OK, here are the details on how I made the Trivia Box parallel port
gizmo that someone asked for:
Parts:
42 red buttons, Jameco part 106112
42 BAV19 small diodes, Jameco 655592
6 RJ45 solder type connectors, Jameco 1537416
6 PCB's for controllers, Radio Shack 276-150
6 enclosurs for controllers, Jameco IForget
1 PCB for main connector, Radio Shack 276-168
1 enclosure for main connector, Radio Shack 270-1806
6 6K8 resistors, Jameco part 691067
1 DB25 connector, female. Radio Shack IForget
1 Leviton 6 port face plate
6 Leviton snap-in connectors + 3' RJ45 cable
6 RJ46 cables
some light wire, I used black and blue spools of single
strand hobby wire. It's about as thick as a paper clip.
THE CONTROLLERS:
The controllers were easy. Take an RJ45 connector and left shift
the back pins slightly, right shift the front pins slightly, and
attach it to a 276-150 PCB in the middle of the side using rows
2 and 3, so each pin is isolated. Then, attach a diode to one of
the center bars (this will be "ground") and the other end to a
three-hole tab. Note that the banded end, the blocking end, is
attached to the GROUND side, since the current is going to flow
through the diode to ground and not be allowed back through.
Now, drill 11/16 holes in a controller enclosure (7 of them, see
picture above) and snap in the buttons. I used black/blue wire
twisted together for neatness, about 5" long. Solder the wires
to the button, and at the other end one to the three holed tab
that the diode is connected to and to a three holed tab that
nothing is connected to.
Finally, for each of these latter three holed tabs solder a jumper
from there to one of the pins of the RJ45 connector. I soldered
mine in order. For the 8th pin of the RJ45, solder a jumper to
ground. Here is what I ended up with:
RJ45 Pin, with notch down, looking INTO the connector:
Pin 8 --> NEXT Button
Pin 7 --> YELLOW Button
Pin 6 --> PURPLE Button
Pin 5 --> ORANGE Button
Pin 4 --> BLUE Button
Pin 3 --> RED Button
Pin 2 --> GREEN Button
Pin 1 --> ground
That's it, just rinse and repeat for the other 5 controllers. I
then used a dremel and cut the square hole for the RJ45 and glued
it in, I think an L bracket and some small nuts/bolts would be best.
THE MAIN BOX
TOP can mean many things: the non-solder side of the board, etc.
When I say top I mean the end of the board that has the 15 pin
edge connector. Bottom would be the other end of the board.
The main box is also very simple to make, if it wasn't I would not
have attacked this project! Take your 276-168 PCB and cut 8 traces.
Looking at the copper side with the 15 pin edge connector "up" I
will describe what I did. First I cut 4 vertical traces just to the
right of the top cross trace at E, D, C, and B. That means I ended
up with 5 "7" shaped traces, with the top of the 7 5 holes wide.
Then at the bottom I cut 4 horizontal traces, so I detached the long
row next to each of the first 4 7's from the bottom. What I have
then is a long L (down the left and across the bottom) that is all
one piece, and my 5 7's, and 4 extra rows that are isolated. All
my work is going to happen in these pieces, the rest of the holes
are left unused.
First solder a resistor to the bottom of each of the 7's to the
bottom row of the L. That's 5 of your needed data lines. I then
came back and added a resistor to two of the straight lines, using
a resistor to tie them to the bottom of the L in the same manner.
All my resistors were on the component side of my board at the
bottom of the board.
Next, jumper a wire from each of the 7's and the two extra lines
to one of the 15 port edge connector at the top. Also tie a wire
from the L to one of the connectors. I put my wires at the top of
this board, and tied the L to port 15. All the rest in order from
there. (left most 7 at 14, etc. I tied the extra lines last) Now,
jumper a wire from these connected ports to the DB25. Port 15 HAS
to go to pin 9 (D7 on your parallel port), then port 14 goes to
pin 10, etc. They go in order from there up to pin 16 on your DB25.
Once this is done, all that's left is to attach the RJ45 connectors.
To do this, cut a 5-6 inch length of RJ45 twisted pair wire and
trim the plastic wrap about 1/2 inch at one end. Use the punchdown
tool that comes with the connectors and punch the wires onto the
connector, following the "A" pattern of the connector. So solid
brown is pin 8, brown/white is pin 7, etc. Now, remove about 2-3
inches of the outside plastic wrap from the other end and pull your
wires into individual strands. I took this time to strip and
pre-flux the copper ends.
Solder them down like this:
Solid Brown - first joystick data line. I soldered the
brown wire on edge connector port 1 and then ran a
jumper from there to pin2 on the DB25
The rest of the wires solder to any whole in the line that
leads to a particuar pin. For example, Brown/White goes to
pin 10, but you solder the wire anywhere along that vertical
row. The resistor is at the bottom, so keep the wires at
the top. I skipped every couple holes to make things tidy.
see the main box 'innards pic above. The wires for each
controller port are in horizontal lines across the board,
except for the dark brown wire that goes to the top.
Brown/White - pin 10
Solid Orange - pin 11
Blue/White - pin 12
Solid Blue - pin 13
Solid Green - pin 14
Green/White - pin 15
Orange/White - pin 16
I would test the first one now, as described below. The other
controller ports all wire exactly the same way, except that brown
wire which goes to the next available DB25 data port (pin 2 on
the DB25 is data port 0, or "controller 1" as the case may be, pin
3 is next, up to pin 8 if you were to have all 7 used)
That should be it. Using windows 98 or DOS, run the parallel port
test program I include with the software. Connect a DB25 cable
between your parallel port and the main box port. Connect an RJ45
cable between the main box and one of your controllers. Pressing a
button should demonstrate on the screen which button and which
controller you've wired up.
Once you have it all working, I mounted it in the 270-1806 with
the DB25 sticking out one end and the Leviton plate mounted to
the top. It ended up looking pretty cool and fitting in there
quite easily.
TROUBLESHOOTING
First off, yes, the thing will work with windows 2K, XP, and Vista.
But the evil micro$oft has blocked access to these ports in later
OS versions and you have to defeat that using some sort of printer
port driver. I did not have good luck with this, but your mileage
may vary.
Also, your parallel port should be set to be bidirectional since
you are going to send data out and then read it back in. So if
things don't work at all, don't panic. You need a full DB25 cable,
not a null cable and not one missing pins. Your RJ45 cable has to
be CAT5 compliant, ie it must have all 4 twisted pairs (8 wires).
No, phone cable won't work the way I've done this. (If you only
wanted 5 buttons on your controllers you could indeed use RJ11
instead of RJ45, and then yes phone cables would work)
If you *really* get frustrated, email me and I will be glad to
help you troubleshoot it.