Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Sega original pedals connect to Fanatec or Logitech G2X  (Read 3540 times)

0 Members and 1 Guest are viewing this topic.

universe777

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:November 10, 2015, 01:15:25 am
  • I want to build my own arcade controls!
Sega original pedals connect to Fanatec or Logitech G2X
« on: October 11, 2015, 06:15:07 am »
Hello

I am renovating a Sega Rally 2 to be a MAME / XBOX360 / PS driving simulator.
I have been searching for a way to connect my original Sega pedals to work.
If you use a computer there is no problem. But the problems begins when you want to connect to a console.
I changed the potentiometers to 10K 300 degrees ones but I did not get it to go from 0-10K got about 7,5K span.
So my next way of attacking the problem was to use an Arduino to solve the problem.
I think I have the solution and since I have not seen any good solution I will share it here.
If you use a Fanatec wheel you will have to connect the potentiometers to get 5v output when you dont press the pedal.
If you use a Logitech wheel you will have to connect the potentiometer to get 0v output when you dont press the pedal.
The next thing you have to do is because Arduino uno dont have real analog output it is PWM output.
You have to use a simple DAC to convert it to a real analog output. Build a RC filter with a 10k resistor and a 10 microfarad capacitor.
The next thing is because the DAC makes the voltage drop you have to use a OP-amplifier. LM358
I have made a simple wiring diagram for you if you need.

To get the values that your pedals output uncomment the part in the sketch that is equivalent to the pedal you want to calibrate
start up the serial monitor and press the pedal to max and min and put in the values in the sketch.
Do the same for the other pedal. If you use a Fanatec wheel you will get a high value span and Logitech a low value span.
Put the lowest value a little higher than your lowest value the pedal could output and the highest value a little lower than the highest value the pedal could output to
get a deadzone.

I could change the code to always have a auto calibration function that starts everytime you restart the Arduino. When you start it you have to depress the pedals one at a time to get the high and low level of the pedals.
The downside is that you dont have any deadzone so it gets very sensitive.

Hope it helps someone

Here is the sketch

// Arduino sketch for SEGA or other pedals to connect to Fanatec or Logitech G2X wheels. Made by Robert Andersson.
// Any value of potentiometers work.

// These constants won't change.  They're used to give names
// to the pins used:
const int analogInPin1 = A0;  // Analog input pin that the Gas potentiometer is attached to
const int analogOutPin1 = 9; // Analog output pin that the Gas output is attached to
const int analogInPin2 = A1;  // Analog input pin that the Brake potentiometer is attached to
const int analogOutPin2 = 10; // Analog output pin that the Brake output is attached to


int sensorValue1 = 0;        // value read from the Gas pot
int outputValue1 = 0;        // value output to the Gas PWM (analog out)
int sensorValue2 = 0;        // value read from the Brake pot
int outputValue2 = 0;        // value output to the Brake PWM (analog out)

void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
}

void loop() {
  // read the analog Gas and Brake in value:
  sensorValue1 = analogRead(analogInPin1);
  sensorValue2 = analogRead(analogInPin2);
  // map it to the range of the Gas and Brake analog out:
  outputValue1 = map(sensorValue1, 370, 1020, 0, 255);  // this is the values that your gaspedal put out as most and least and gets mapped to 0-255
  outputValue2 = map(sensorValue2, 370, 850, 0, 255);  // this is the values that your brake put out as most and least and gets mapped to 0-255
 
  // in case the Gas or Brake sensor value is outside the range force it to stay within 0-255
  outputValue1 = constrain(outputValue1, 0, 255);
  outputValue2 = constrain(outputValue2, 0, 255);
 
 // change the Gas analog out value:
  analogWrite(analogOutPin1, outputValue1);
  analogWrite(analogOutPin2, outputValue2);

  // print the results to the serial monitor:
  //Uncomment the next four rows to see the most and least values your gaspedal gives
  //Serial.print("sensorGas = " );   
  //Serial.print(sensorValue1);
  //Serial.print("\t outputGas = ");
  //Serial.println(outputValue1);
 
  //Uncomment the next four rows to see the most and least values your brakepedal gives
  //Serial.print("sensorBrake = " );
  //Serial.print(sensorValue2);
  //Serial.print("\t outputBrake = ");
  //Serial.println(outputValue2);
 

  // wait 2 milliseconds before the next loop
  // for the analog-to-digital converter to settle
  // after the last reading:
  delay(2);
}
« Last Edit: October 11, 2015, 07:03:08 am by universe777 »

BadMouth

  • Moderator
  • Trade Count: (+6)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9263
  • Last login:February 06, 2025, 09:12:35 am
  • ...
Re: Sega original pedals connect to Fanatec or Logitech G2X
« Reply #1 on: October 11, 2015, 09:47:13 pm »
Thanks for sharing.  We need more stuff like this.
It could also help out with analog joysticks.   :cheers:

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19407
  • Last login:Today at 11:08:37 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Sega original pedals connect to Fanatec or Logitech G2X
« Reply #2 on: October 12, 2015, 04:05:55 am »
I'm kind of confused as to why this is needed.  Are you swapping out the wheel and using the same pedals for each system?  If not and you are using a wheel that works on all three systems shouldn't the wheel itself be taking care of all of this?

I'm just confused and would like some clarification as to your plan of attack and general hardware setup. 

BadMouth

  • Moderator
  • Trade Count: (+6)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9263
  • Last login:February 06, 2025, 09:12:35 am
  • ...
Re: Sega original pedals connect to Fanatec or Logitech G2X
« Reply #3 on: October 12, 2015, 10:10:31 am »
I'm kind of confused as to why this is needed.  Are you swapping out the wheel and using the same pedals for each system?  If not and you are using a wheel that works on all three systems shouldn't the wheel itself be taking care of all of this?

I'm just confused and would like some clarification as to your plan of attack and general hardware setup.

Either because of the limited motion of the Sega arcade pedals or the operating degrees of rotation of the replacement pots, the new pedal setup doesn't read the full range of 0-10k.
This isn't an issue on a PC, as they can be calibrated to compensate.
Most modern consoles don't have an option to calibrate, so the pedal is seen as never being fully depressed.

I've run into this issue a lot trying to come up with an analog arcade joystick setup.
It's why I had to cave and use less durable ALPS joysticks on that analog xbox360 control panel I built.
« Last Edit: October 12, 2015, 11:25:15 am by BadMouth »

universe777

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:November 10, 2015, 01:15:25 am
  • I want to build my own arcade controls!
Re: Sega original pedals connect to Fanatec or Logitech G2X
« Reply #4 on: October 12, 2015, 01:12:39 pm »
I'm kind of confused as to why this is needed.  Are you swapping out the wheel and using the same pedals for each system?  If not and you are using a wheel that works on all three systems shouldn't the wheel itself be taking care of all of this?

I'm just confused and would like some clarification as to your plan of attack and general hardware setup.

I am going to swap the steeringwheel to a logitech G2X or a Fanatec wheel.
But I want to keep the original SEGA pedals on my SEGA Rally 2 driving simulator.
Since the original SEGA pedals have 5k pots and Logitech and Fanatec works with 10k potentiometers the voltage will
be different.
Tried new potentiometers but did not get the whole span of 0-5V from either the accelerator or the brake. The brake gave just a span of 0-2V and the accelerator about 0-3.5V.
I was not getting full Gas or Brake.
When connecting to a computer it is no problem since you could calibrate in the computer for each game.
When using a console it is a problem there are no calibration. The values are fixed the console want 0-5V from the wheel.
The Arduino setup takes whatever values you have from your pedals and map them to 0-5V.
The good thing is also that you could change your deadzone.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19407
  • Last login:Today at 11:08:37 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Sega original pedals connect to Fanatec or Logitech G2X
« Reply #5 on: October 12, 2015, 05:37:30 pm »
Ok that makes sense.  I was reading the title about the wheels and I couldn't figure out what you were trying to do.