Mazda RX-8 throttle pedal adapter for Mercedes M113 ECU (M113 V8 swap into RX-8).
Mazda RX-8 pedal has two sensors (potentiometers) that have voltage offset between each other.
M113 pedal has two sensors (potentiometers) that have one sensor being 2*voltage of the other sensor.
Adapter reads the voltage from Mazda pedal, converts it to M113 voltage with DAC (for one sensor) and then takes output from DAC and divides it by two using a simple resistor-based voltage divider for the other sensor.
- Read voltages from both sensors on RX-8 pedal
- Calculate percentage from both sensors
- Validate if percentages are not out of sync (safety feature)
- if they are, set the throttle limit to 30%
- if they are not, clear the throttle limit
- Set output for DAC (for "high" pedal)
- Arduino Nano

- MCP4725 DAC

- RX-8 pedal plug
- two resistors for voltage divider (I choose 4.7 kOhm, but it does not really matter)
- some wires
Circuit was drawn using https://www.circuit-diagram.org/.
Source code for the diagram is located in circuit cddx file
Note: This is from a previous version, I've later on decided to insert wires from the top, as it makes it easier to mount the assembly in the case.
- Install Adafruit_MCP4725 library
- Load project from
arduino/pedal_adapter/pedal_adapter.ino
If You have a different swap than M113 You will need to:
- read voltages from the throttle pedal
- if they have the same logic as for mercedes (one is a multiplication of the other)
- You need to recalculate DAC values using the script from "utils"
- if they have different logic (offset, whatever)
- You need to either:
- use two DACs (easier but requires small code change)
- use voltage subtractor (a bit more complex electronic wise, but no code changes required)
- You need to either:
- if they have the same logic as for mercedes (one is a multiplication of the other)



