n-e-y-s/G27_Pedals_and_Shifter

pedal wiring polarity

eriknz opened this issue · 6 comments

First off, thanks for the work you've put into this.
I think it'd be good to have a warning that the polarity for the pedals is reversed. For standard pedals, most of the time this isn't an issue although since the pedal bodies are grounded, reversing the polarity will make the screws that fasten the pedals to the base +5v.
However for anyone that has installed a load cell brake mod, this reversed polarity can fry the amplifier circuit. I don't actually know if it'll destroy the chip, but in my case it was getting pretty warm before I realised what was happening and disconnected it.
I've disconnected pin 9 and swapped pins 1 and 6 on the pedals db9 connector and it's working ok now.
I was getting the very laggy input in the windows game controller properties that was mentioned in another post but it has come right after disconnecting and reconnecting it.

Thanks for reporting, that sounds like an issue which should be documented in the .ino file. Can you please confirm that this is the correct wiring:

  // PEDAL PINS
  // | DB9 | Original | Harness | Description | Pro Micro   |
  // |   1 | Red      | Black   | GND         | GND         |
  // |   2 | Orange   | Yellow  | Throttle    | pin 18 (A0) |
  // |   3 | White    | White   | Brake       | pin 19 (A1) |
  // |   4 | Green    | Green   | Clutch      | pin 20 (A2) |
  // |   5 |          |         |             |             |
  // |   6 | Black    | Red     | +5v         | +5v         |
  // |   7 |          |         |             |             |
  // |   8 |          |         |             |             |
  // |   9 |          |         |             |             |

Unfortunately I don't have a multimeter here, so I can't take my own measurements atm.

The wiring on my pedals matches the colors in the Original column. I think the other columns should be changed to:

//| DB9 | Original | Harness | Description | Pro Micro   |
//|   1 | Black    | Black   | GND         | GND         |
//|   2 | Orange   | Yellow  | Throttle    | pin 18 (A0) |
//|   3 | White    | White   | Brake       | pin 19 (A1) |
//|   4 | Green    | Green   | Clutch      | pin 20 (A2) |
//|   5 |          |         |             |             |
//|   6 | connected in pedals plug to pin 9
//|   7 |          |         |             |             |
//|   8 |          |         |             |             |
//|   9 | Red      | Red     | +5V         | +5V         |

Measuring the pins in the wheel base with the pedals disconnected, pin 9 is definitely +5V and pin 1 is GND. If I measure from pin 9 to pin 6 I get 4.7V, same as what I get from pin 9 to GND. There is no voltage difference from pin 6 to pin 1. I guess pin 6 is for the base to sense that the pedals are connected? They don't work unless pin 6 is connected to pin 9.
This does mean that the pedals will have to be inverted.

But the inversion is not an issue since it can be done during calibration process, right?

Yeah, or in the game.

I have added the new suggested wiring in the .ino file (and also kept the initial version).

I can confirm that @eriknz is correct and the originally documented polarity is the opposite of what the G27 wheelbase supplies. Independently ran into the same issue he reported and did my own testing to confirm the incorrect pinout.