Friday, March 25, 2011

Wire you doing this


To connect the pedals to the wheel unit a cable and connector is needed – but I also need to know how everything should be wired up. After a bit of searching online, I discover that the type of connector that the DFGT uses is called a 'D-sub' 9 way connector. Called a 9 way because there are nine pins, only there aren't nine pins, there are seven. The two outer most pins have been removed. Not sure why.

I know that the pedals use two potentiometers but I'm not sure how these are wired up and how these signals from the pedals are interpreted in the game.

To test the DFGT with Gran Turismo 5, I connect everything up and start up the game. I have the pedals clamped to my workbench in front of the TV. After a series of experiments, starting and restarting the game and by using cable ties to restrict the movement of the pedals, I discover the following:

The game calibrates the pedals depending on the highest and lowest signals that it gets from the pedal. For example if you only ever press the accelerator pedal half way down and no further the game thinks “a-ha, this is the highest signal I'm getting from the pedals, so this must be the maximum throttle” and calibrates things accordingly. If you start the game up with the pedal pressed halfway down and never release it beyond this point the game thinks “a-ha, this lowest signal I'm getting so this must be the rest point of the pedal”. If at some point – even during gameplay, you would release the pedal back fully, the game thinks “hang-on, this signal is even lower, must recalibrate things” and will recalibrate during gameplay. I guess this was done so the game would work with a range of steering wheel/pedals without the need for calibration screens. It will have implications later on, but will probably make it a lot easier to get custom pedals set up as any signals from the pedals don't have to operate through the full 0 to +5V range.

After that testing I now need to work out how the potentiometers in the pedal set are wired to the d-sub connector that connects them to the steering wheel. Searching online reveals a couple different pin layouts, sadly not all are the same. I pick the most credible looking and will try to test this using my multimeter to verify if it correct. I can do this without having the pedals connected to any power supply. This is how:

I put the DFGT pedals underneath my desk where I can press them. I have the pedals d-sub connector on the desk. Using an couple of self-clamping tweezers that I use for modelling I am able to clamp onto individual pins in the d-sub. I test the values of resistance through various pin connections, by pressing the pedals I can see any resistance change. If I am connected across one potentiometer's Ground to +5V, the multimeter reads a resistance of about 5kohms. If I press the pedal nothing changes. If however, I am connected across the Ground to the wiper (the bit that moves across the resistor inside the pot I call the 'wiper'), then pressing the pedal does cause a resistance change. 

Through this method I can confirm that the pin configuration I had got was correct (so kudos to whoever first worked this out and put it online). I can also deduce that the accelerator pedal is wired “backwards” compared to the brake pedal. What I mean by this is that when the accelerator pedal is in the rest position, the resistance between its output and +5V (V+in) is very low, meaning the voltage of the signal is relatively high (close to 5V). As the accelerator pedal is pressed this resistance increases and the output signal decrease further from 5V. The brake pedal does the opposite – at rest position, it's resistance between output/”wiper” and +5V is high but falls when the pedal is pressed. 

Testing the pedal d-sub pin layout


Final pin layout is:
1. (Pin Removed)
2. Accelerator Out
3. Brake Out
4. +5v
5. (Pin Removed)
6. Gnd
7. Accelerator Out
8. Brake Out
9. +5v

Why the +5v, Accelerator and brake use two pins each I have no idea. Temptation gets the better of me and I open up the DFGT pedals. From seeing inside the DFGT pedals there is only one wire going to each pot. So somewhere they get merged. 



To make the cable and connector I pop down to the local Maplin and buy the following bits:

- 1 D-sub 9 way plug
- 1 D-sub 9 way hood
- 4 meters (very generously measured) of 9 core wire. I was intending to get something called 'Type 7-1-C' 9 way cable. Not sure if it was actually this but it cost ~£1.50/m.

I get the main outer sheath away about an inch down from the end and then carefully the outer sheath away from each inside wire about a cm down. I don't have proper wire strippers to do this, so just use a modelling knife. From the fantasitic kaleidoscope of colours within my 9 core I choose a colour scheme for the pin layout. Having seen inside the DFGT pedals, it makes sense to stick closely to what it uses so I go with the following:

Red = Power +5v
Black = Ground
White = Accelerator Pedal out
Green = Brake Pedal out)

2. Yellow (kind of like white) For Acc out
3. Blue (kind of like green) For Brake out
4. Orange (kind of like red) For Power

6. Black (same as dfgt) For Ground
7. White (same as dfgt) For Acc out
8. Green (same again) For Brake out
9. Red (same again) For Power

Before I solder these wires in, I must first remove pins 1 & 5 otherwise they will stop me plugging in the connector. I don't know if there is an 'official' way to do this but the way I did it was to take a very small screw-driver (like 2mm) and carefully bend the pin over flat. Then, when carefully levering it back up the metal fatigued and broke off. I tidy up by twizzling the tip of a small file on the pin stump. For good measure I snip off the the sockets on the reverse size with a small pair of clippers.

I'm now ready to solder in the wires. I have drawn myself a little diagram and stuck it infront of my workspace. To avoid confusion however, I make another little diagram showing what coloured wires go where when the d-sub is viewed from the back - which is how I will be viewing it when I solder. Remember that the left-right pin ordering is reversed when viewed from the opposite side. 


My soldering skills leave a lot to be desired but I manage ok. I hadn't done much soldering before so found viewing a few instructional videos on youtube helpful. It also helps if you have four hands - one to hold the soldering iron, one to hold the d-sub, one to hold the wire in place and one to to apply the solder. I don't have four hands so clamp the d-sub to the worktop, and apply the wire into position before picking up the solder - it just about holds in place steady enough. 

D-sub wiring
 

When I am done soldering I apply the hood to the d-sub. There is a small problem here as the hood I brought has a small lip holding the plug in place which is just big enough to stop me plugging it into the dfgt. I quick hack saw sorts this out and I only need to do it for the upper half of the hood. I fix the hood up and now have the dfgt end of the connector and cable ready for my pedals.

Faux UPDATE!!!

I have doubts about soldering up the top three wires. This means that I didn't need to buy 9-core cable at all. All I needed was 4-core. Somewhere between the connector and the pedals the wires in the dfgt cable are connected so there is only one wire for the accelerator, brake and +5V respectively. To save me having to join the wires at the pedal end I resolder my d-sub connector. To do this, basically I just take a small length of wire (say around 1cm) and short out the connections between:

pin 2 and pin 7
pin 3 and pin 8
pin 4 and pin 9

I can now ignore any blue, orange or yellow wires when fixing up the pedals. The colouring scheme is completely consistent with the original DFGT wires. 

The final d-sub wiring


For the record here are the final connections.

1. (Pin Removed)
2. Accelerator Out (Short connection to Pin 7)
3. Brake Out (Short connection to Pin 8)
4. +5v (Short connection to Pin 9)
5. (Pin Removed)
6. Gnd (Black wire)
7. Accelerator Out (White wire)
8. Brake Out (Green wire)
9. +5v (Red wire)

It may be that some of these short connections are not needed, but it is easier for me to solder up the d-sub connector like this then try to work it out by sticking probes in to the d-sub socket on the wheel. So that is it. The cable, and one end of it, is ready.

1 comment:

  1. Thank you, this is very helpful! Did you figure out if the short connections were needed? I have a DFGT with pedals and I'm looking at buying a Fanatec GT3 RS V2 wheel which comes with an adapter for G25/G27. I can't afford the club sport pedals at the moment so I will need to use my DFGT pedals. I have e-mailed Fanatec and confirmed the adapter does not support the DFGT pedals I'm assuming this is because of different pin layouts. The G25/G27 only have one output pin for each pedal compared to the two on the DFGT. If the short connections are not needed then I'm assuming I can get the pedals to work on the Fanatec wheel by simply changing pin locations, do you think that would work? Cheers Joel

    ReplyDelete