A university student who played with the PVC Water Pipe Tron Controller at a party said "That's OK... but I like to play driving games". It started me thinking and over the next week I spent a few evenings building a PVC pipe steering "wheel" connected to a computer via a hacked USB joystick that could be used to play racing games.
My first attempt at hooking it up to the computer using two mercury switches didn't work well. However, I persevered and found a way to get smooth analog steering happening. Later I added accelerator and brake pedals, and then a chassis so that it essentially became a wheel-less PVC go-kart frame.
The video below isn't great but it shows two of the PVC cars in action at the first PIIIG (Payap International Innovative Interactive Games) day we held at Payap University where I teach (the video should start playing at the 3:33 mark so you can see the cars in action):
Read on to find out about the development of the cars and how they work...
Unit 00 - Prototype (零号機)
My first attempt at a "steering wheel" to play car racing games looked more like the yoke from a plane. The steering wheel actually consisted of two parts - the "wheel" that you hold on to and a pedestal that supports the wheel (see the picture on the right). The wheel was made from 18mm (1/2") PVC using:
One of the problems when building things from PVC pipe is that the pieces either fit together very tightly (normally what you want but it doesn't allow any movement) or if you use different sizes of pipe together they are too loose. If you want to build something that rotates smoothly - for example, a steering wheel - then this is a problem.
Fortunately, it turns out that 18mm PVC pipe fits smoothly through the center of a 20mm (3/4") T-piece. To make the top of the pedestal for the steering wheel I cut the center section from two 20mm T-pieces (see the left picture below). With a small amount of filing they will fit nicely inside either end of the next size-up 25mm (1") T-piece. When glued in place they effectively reduce the diameter of the larger T-piece so that a piece of 18mm (1/2") pipe inserted through it will rotate freely with only a small amount of "play". The picture below right shows a normal 25mm (1") T-piece on the left and a T-piece with the glued inserts on the right. This is the same technique I went on to use for the Coffee Grinder Puzzle Bobble controllers and the Mario-kart steering wheel.
The rest of the pedestal is constructed from approx. 2.1m (6'10") of 25mm pipe and an additional 3 x 25mm T-pieces. The 18mm joiner on the back of the steering shaft isn't glued but is held in place by an eye bolt so it can be easily disassembled. A simple centering mechanism is created by threading rubber bands through the eye of the bolt and attaching them to a second eye bolt located on the pedestal below the top T-piece.
To capture the steering wheel rotation I used two mercury switches that were simply hot-melt glued onto the top of the PVC joiner at the back of the steering shaft (just visible in this image) so that one of the switches would be on and the other off as you turned the steering to the left or right.
I wired the two mercury switches up to a male 25-pin D-Subminiature (D-Sub)
connector along with the two (somewhat unreliable) handgrip buttons
which were left over from the first version of
my Bug-zapper Guitar Hero
controller. To test it I plugged the D-SUB connector into
the gamepad I'd hacked for the
wooden DDR mat and fired
up Re-Volt - a fun
radio controller car racing game from 1999 which still has a surprising
following. I mapped the two buttons to "accelerate" and "fire" and
made a rear projection screen using
some butcher's paper, a clothes rack, and a data projector.
Unfortunately, there was a large dead-spot in the center of the
steering when both mercury switches were off and when either one was
on you were turning either hard right or hard left so you ended up
fish-tailing the whole time! It was very frustrating to play and I
was disappointed that what I thought would be a fun idea didn't work.
Unit 01 - Test Type (初号機)
One of the great thing about PVC is that if you want to change something you can just hack the end off with a saw and glue some more on. I decided that genuine analog steering would solve my fish tailing problem so I decided to modify the steering wheel to use a variable resistor (also known as a "potentiometer") instead of the two mercury switches.
The new steering mechanism worked well so I then built some pedals and eventually added an expandable "chassis" with a roll-cage (you can never be too careful when gaming!). My steering wheel grew into something like a wheel-less PVC go-kart frame as shown in the image to the left.
The two X and Y potentiometers in most game controllers with thumbsticks have a resistance of 10kΩ so I bought a 10k linear potentiometer and mounted it on a small piece of prototyping board. I also bought a knob that matched the shaft on the potentiometer and cut the center piece out of the knob. This was then hot-melt glued into a hole in the back of an 18mm PVC end cap (see the first two pictures below). The end cap isn't glued but is simply pushed onto the end of the steering shaft so it can be rotated to match the center position on the potentiometer.
Using a 25mm T-piece I added a bar beneath the steering shaft that
was used as a point to connect the rubber bands for centering and as
an anchor point for the steering potentiometer (see the picture below
right). To stop the body of the potentiometer from rotating I
connected the bottom of the prototyping board to the end of the
centering bar using two cable-ties.
A limitation of this design is that the potentiometer can only rotate through approximately 270 degrees (+/-135 degrees from the center position). So if the driver tries to turn the wheel too far it could damage the potentiometer. At the time I couldn't think of an easy solution that wouldn't potentially result in broken pieces or plastic fatigue.
My first steering wheel was connected to the computer via a gamepad
which only had digital on/off inputs. I now needed an analog input
for the potentiometer so I purchased a
USB joystick for 100THB (about US$3) and hacked it by adding a female
9-pin D-Sub connector underneath. The potentiometer requires three
connections: Vcc, Ground, and a wiper (corresponding to the current
rotation value). I also wanted to connect four buttons (accelerator
and brake plus the two buttons on the steering wheel) so I used the
pin-out shown below:
|3||Left Analog X-axis (Wiper)|
Inside the joystick a smaller printed circuit board for the
thumbsticks is connected to the main board via a grey ribbon cable. I
examined the thumbstick circuit board and worked out which of the
leads on the cable was for the left thumbsticks X-axis (the trace
shown in yellow in the left image below). I still wanted to be able
to use the joystick after the hack so I carefully cut the left X-axis
lead and added a small
(Single Pole Double Throw) switch so I could swap between the
thumbsticks potentiometer and my external one (see the right picture
I sketched a few ideas for implementing brake and accelerator pedals and eventually decided to re-use the same T-piece restriction technique that I used for the steering wheel but with the pedals sliding forwards and backwards through the T-piece like pistons instead of rotating (see the first two pictures below). Each pedal consists of:
The pedals work just like the light inside your refrigerator (trust
me on this) or car. When you are not pressing the pedal some rubber
bands pull the end cap on the back of the pedal up against the bottom
of the larger T-piece which holds the microswitch in an off position
Open switch). As soon as you press on the pedal (see the third picture
below) the switch is released and turns on (like opening the
refrigerator or car door). Even though the accelerator and brake are simply on/off switches
most people assume that they're analog and report that they felt that
pushing harder made their car go faster!
The common connection on each microswitch is wired to the +5 volt Vcc pin (pin 1) on a male 9-pin D-Sub connector and the normally open connections are each wired to one of the button pins (pins 6 and 7). I added a scavenged JST/Berg connector from an old DVD player between the pedals and the male D-Sub connector so I could separate the pedals from the rest of the steering wheel's wiring (see the last picture above).
Using two 41cm (16") lengths of 35mm (1 & 1/4") pipe
I made sleeves to join the steering wheel and pedals together. The
sleeves slid over the 25mm pipe extensions at the base of the steering
wheel and pedal assemblies and 4 x 55mm (approx. 2 & 1/4")
bolts held them in place. I propped an old hinged floor chair against
a pillar to use as a seat and then fired up the PC version of the
classic arcade racing
USA (see the images below).
It was a lot of fun to play but the pedal and wheel kept moving forward away from the driver (as is evident from the white duct tape in the picture above). To solve this problem I built a roll bar that was attached to the rest of the frame to support the seat and hold it all together. The roll bar is made from 25mm PVC using:
The roll bar was attached to the chassis using two more 41cm long
35mm sleeves and by drilling some more holes along the 25mm extensions
at the base of the three assemblies (pedals, steering, and roll bar)
the overall length can be adjusted to accommodate different sized
drivers. For reference, each of the tiles in the second picture is
30cm (approx. 11 & 3/4") square.
Unit 02 - Production Type (弐号機)
This second version of the PVC car isn't really a production type but it has some improvements over the first version (and I liked the Neon Genesis Evangelion unit numbers). Some Thai engineering students who saw the first car wanted to know how it all worked so six of them from Maejo University and Rajamangala University of Technology Lanna (Techno) came around one Saturday and we spent the whole day working as a team to build a second car (see the first picture below).
I had bought all the parts required to build the second car and took a photograph of them laid out on the floor before we started (see the first image below). In the top left corner are the parts for the pedals, top right are parts for the steering wheel, bottom right are the parts for the roll cage, and bottom left are the parts for the steering column.
The improved version of the car had a more compact steering wheel design that also included two rumble motors mounted on the back of the steering shaft for force feedback (see the images below). The rumble motors were connected to pins 2 and 4 on the D-Sub connector which were unused in the original pinout. A second DPDT (Double Pole Double Throw) switch was also added to the joystick so you could swap between the joystick's internal rumble motors or the external ones mounted on the steering (see the last picture above). The two rumble motors fit snugly into the ends of a 20mm to 18mm T-piece adapter and two larger 35mm end caps were used to cover the motors. The end caps were held in place with screws.
I asked the guys to sign the new car Apple-style using a soldering iron and they tested it by playing Need for Speed: Carbon. With two cars we could now race against each other and the PC version of Daytona USA has a split-screen mode so with a single computer and a data projector you could go head-to-head.
The cars have had a lot of use since 2007 including at my son's 8th birthday party (see the first picture below) and International Day at Payap University. We've also taken virtual pinball, Multiplayer Guitar Hero, and the PVC racing cars into some of the local schools for Science Week. The middle picture below shows students crowded around the cars at Dara Academy while the right picture is the queue of students waiting to play at Chom Tong School.
With some students from Payap we've taken the cars to the Agape Home for babies with HIV/AIDS.
This is a third car I made with a friend back in 2013. The steering design differs slightly with a different mount for the potentiometer and a single rumble motor for force feedback.
The potentiometer is mounted in a hole on a sleeve made from a larger piece of PVC pipe that slides over a vertical extension at the back of the steering pedestal. This allows the whole potentiometer to move up and down slightly while still holding the back of the potentiometer in place. The corresponding knob for the potentiometer is hot-melt glued into one side of a 20mm T-piece and the rumble motor is mounted in the lower part of the T-Piece (see the images below).
Instead of scavenging connectors we used some break away pin headers and header connectors in the wiring so that the potentiometer could be easily replaced and so the pedal wiring could be unplugged from the rest of the wiring. This allows you to separate the car into three sections and with the help of a friend you can even take it home on your motorbike in a single trip!
I have also built some bamboo car controllers using a similar approach, or you may be interested in reading about some of my other PVC and/or game related projects:
PVC Racing Cars
Asteroids Cabinet Fish Tank
Wooden DDR Mat
Everyday uses for PVC water pipe
Bug-zapper Guitar Hero Controller
PVC Water Pipe Tron Controller
Halo Motorbike Helmet
Multiplayer Guitar Hero
Bamboo Racing Cars
Plasma Pong Table
Blossom Motorbike Helmet
Coffee Grinder Puzzle Bobble
Stormtrooper Motorbike Helmet
Tron Handheld POV Display
Countertop MAME Arcade Cabinet
Payap Pinball Machine
Gundam Motorcycle Helmet