Interfaces for the pedals

Here are all the solutions to plug your SRT pedals. Two philosophies: connect the pedals to your steering wheel, or connect the pedals directly to the computer.

Table of contents

  1. Logitech (G27, G29, G920)
  2. Simucube 1
  3. Simucube 2
  4. Arduino
  5. Leobodnar
  6. Thrustmaster

The vast majority of pedal sets use potentiometers. As the accelerator is based on a potentiometer, and the hydraulic pressure sensor also behaves like a potentiometer, you can connect this pedal sets to most of the steering wheel bases (logitech, Simucube, Thrusmaster…).

Alternatively it can be connected to a Leobodnar or Arduino card which is then connected to the PC via a USB cable.

1) LOGITECH (G27, G29, G920…)

You can connect the SRT pedal set to a G27 or G29 steering wheel. To do so, use a VGA male connector with the following pins:

1 – Ground (0v)

2 – Accelerator

3 – Brake

4 – Clutch

5 –

6 – VCC (+5v)

7 –

8 –

9 – VCC (+5v)

 

2) SIMUCUBE 1

The pedals can be connected to the X11-upper port. See details on the Simucube documentation.

Pin 1 is the rightmost one. A RJ45 (8P8C) cable must be used.

1 – Brake

2 – Throttle

3 –

4 – VCC ( +3,3V)

5 – Clutch

6 –

7 –

8 – Ground (0V)

 

3) SIMUCUBE 2

There is a “SC accessory port” on which there are pins to connect pedals, it’s female vga db15.

See the documentation available here. You can use this type of male connector. The pins you are interested in :

2 – Ground (0V)

6 – Throttle

7 – Clutch

8 – VCC (5V)

13 – Brake

15 – Ground (0V)

4) ARDUINO

If you don’t want to plug the pedals into your steering wheel, using an arduino card is the cheapest solution. The following code allows you to manage from one to three pedals. It only works with Arduino Leonardo and Micro cards (fitted with ATmega32u4 CPU). The Joystick library can be downloaded here.

// V1.0 : ajout du mode verbose
// V1.1 : correction
// V1.2 : display min and max read when verbose_mode is active.
// V1.3 : handbrake analog and digital mode added
// V1.4 : code fix + fast debug : no need to disable DEBUG to operate at full speed.

// comment either out to disable || Mettre en commentaire pour désactiver

#define USE_ACCEL
#define USE_BRAKE
#define USE_CLUTCH
//#define USE_ANALOG_HANDBRAKE
//#define USE_DIGITAL_HANDRAKE
#define DEBUG   //allow to tune min and max

#define AcceleratorPin 0
#define BrakePin       1
#define ClutchPin      2
#define HandbrakePin   3

int minAccelerator = 210;
int maxAccelerator = 595;
int minBrake = 130 ;
int maxBrake = 800;
int minClutch = 130;
int maxClutch = 250;
int minHandbrake = 100;
int maxHandbrake = 300;
int digitalHandbrakeSwitch = 200;

int lastAcceleratorState ;
int lastBrakeState;
int lastClutchState;
int lastHandbrakeState;
int currentAcceleratorState;
int currentBrakeState;
int currentClutchState;
int currentHandbrakeState;

int minAcceleratorRead = 1023;
int maxAcceleratorRead = 0;
int minBrakeRead = 1023 ;
int maxBrakeRead = 0;
int minClutchRead = 1023;
int maxClutchRead = 0;
int minHandbrakeRead = 1023;
int maxHandbrakeRead = 0;

bool sendDebug = false;
int unsigned long lastDebug = 0;
int DebugRefreshRate = 250;

#include "Joystick.h"
Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,
                   JOYSTICK_TYPE_MULTI_AXIS, 4, 0,
                   true, true, false,  true, false, false,         // pour activé la fonction RxAxis
                   false, false, true, true, false);

void setup() {
#ifdef DEBUG
  Serial.begin(9600);
  Serial.println("DEBUG mode activated");
#endif
  Joystick.setRxAxisRange(minAccelerator, maxAccelerator);
  Joystick.setBrakeRange(minBrake, maxBrake);
  Joystick.setXAxisRange(minClutch, maxClutch);
  Joystick.setYAxisRange(minHandbrake, maxHandbrake);
  Joystick.begin();
  lastAcceleratorState = analogRead(AcceleratorPin);
  lastBrakeState = analogRead(BrakePin);
  lastClutchState = analogRead(ClutchPin);
  lastHandbrakeState = analogRead(HandbrakePin);

  delay(1000); //safety delay to flash the code
}

void loop() {
  #if defined(DEBUG)
  if (millis() - lastDebug > DebugRefreshRate) {
    sendDebug = true;
    lastDebug = millis();
  }
#endif

#ifdef USE_ACCEL
  currentAcceleratorState = analogRead(AcceleratorPin);
  if (currentAcceleratorState != lastAcceleratorState)
  {
    Joystick.setRxAxis(currentAcceleratorState);
    lastAcceleratorState = currentAcceleratorState;
  }
#ifdef DEBUG
  minAcceleratorRead = min(minAcceleratorRead, currentAcceleratorState);
  maxAcceleratorRead = max(maxAcceleratorRead, currentAcceleratorState);
  if (sendDebug) {
    Serial.print("Acceleration : ");
    Serial.print(currentAcceleratorState);
    Serial.print(". Min is : ");
    Serial.print(minAcceleratorRead);
    Serial.print(". Max is : ");
    Serial.println(maxAcceleratorRead);
  }
#endif
#endif

#ifdef USE_BRAKE
  currentBrakeState = analogRead(BrakePin);
  if (currentBrakeState != lastBrakeState)
  {
    Joystick.setBrake(currentBrakeState);
    lastBrakeState = currentBrakeState;
  }
#ifdef DEBUG
  minBrakeRead = min(minBrakeRead, currentBrakeState);
  maxBrakeRead = max(maxBrakeRead, currentBrakeState);
  if (sendDebug) {
    Serial.print("       Brake : ");
    Serial.print(currentBrakeState);
    Serial.print(". Min is : ");
    Serial.print(minBrakeRead);
    Serial.print(". Max is : ");
    Serial.println(maxBrakeRead);
  }
#endif
#endif

#ifdef USE_CLUTCH
  currentClutchState = analogRead(ClutchPin);
  if (currentClutchState != lastClutchState)
  {
    Joystick.setXAxis(currentClutchState);
    lastClutchState = currentClutchState;
  }
#ifdef DEBUG
  minClutchRead = min(minClutchRead, currentClutchState);
  maxClutchRead = max(maxClutchRead, currentClutchState);
  if (sendDebug) {
    Serial.print("      Clutch : ");
    Serial.print(currentClutchState);
    Serial.print(". Min is : ");
    Serial.print(minClutchRead);
    Serial.print(". Max is : ");
    Serial.println(maxClutchRead);
  }
#endif
#endif



#ifdef USE_ANALOG_HANDBRAKE
  currentHandbrakeState = analogRead(HandbrakePin);
  if (currentHandbrakeState != lastHandbrakeState) {
    Joystick.setYAxis(currentHandbrakeState);
    lastHandbrakeState = currentHandbrakeState;
  }

#ifdef DEBUG
  minHandbrakeRead = min(minHandbrakeRead, currentHandbrakeState);
  maxHandbrakeRead = max(maxHandbrakeRead, currentHandbrakeState);
  if (sendDebug) {
    Serial.print("   Handbrake : ");
    Serial.print(currentHandbrakeState);
    Serial.print(". Min is : ");
    Serial.print(minHandbrakeRead);
    Serial.print(". Max is : ");
    Serial.println(maxHandbrakeRead);
  }
#endif
#endif
  if (sendDebug) {
    Serial.println("");
  }
  
#ifdef USE_DIGITAL_HANDBRAKE
  if(analogRead(HandbrakePin)>digitalHandbrakeSwitch){currentHandbrakeState = 1;}
  else{currentHandbrakeState = 0;}

  if (currentHandbrakeState != lastHandbrakeState)
  {
  Joystick.setButton(0, currentHandbrakeState);
    lastHandbrakeState = currentHandbrakeState;
  }
  #ifdef DEBUG
  minHandbrakeRead = min(minHandbrakeRead, currentHandbrakeState);
  maxHandbrakeRead = max(maxHandbrakeRead, currentHandbrakeState);
  Serial.print("Handbrake : ");
  Serial.print(currentHandbrakeState);
  Serial.print(". Min is : ");
  Serial.print(minHandbrakeRead);
  Serial.print(". Max is : ");
  Serial.println(maxHandbrakeRead);
  #endif
#endif

    sendDebug = false;
}
Arduino code.

 

5) LEOBODNAR

This adapter allows you to connect the SRT pedals without having to manipulate a code. Indeed, Leobodnar provides an easy to use software that allows to calibrate the pedals.

I created a junction box: a male VGA connector on one side, and three output cables (diameter AWG22, it’s the one indicated in the pedals stroke list. There is an anti-tearing system that ensures reliable operation. The 3D files are on Thingiverse. The male connector can be ordered here on Amazon, or Aliexpress.

6) THRUSTMASTER

The Thrustmaster T-GT, T300, T150, TS-XW, TX and TMX steering wheels are connected to the pedal sets though an RJ12 6P6C (6-wire) cable. If you don’t know where the 1 is on your cable, look at the color codes on Google.

1 – Brake

2 – Throttle

3 – Clutch

4 – VCC ( +5v)

5 – Ground ( 0v)

6 – Ground ( 0v)

I've been passionate about cars since I was a kid! I learned the multiple variations of the Skyline R34 through the Gran Tursimo series, until I discovered GTR2 at the wheel of a keyboard. A few years later, I plunged back into Sim Racing with a G27 which made me enter the DIY world. Always looking for an immersion out of reach in reality, I develop projects that I take care to make accessible to any 3D printer owner!
Posts created 134

3 thoughts on “Interfaces for the pedals

  1. You could make a GitHub public repository with the software for the pedals.
    I think you misstyled – for =

Leave a Reply

Your email address will not be published.

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top