Project: Emerald ECU map Switching

Hell Thanks for view my Project or helping in learning some programming.

Recently bought an arduino to help with this map switch project. What I need to make is a circuit which has 3 inputs (switched) + Arduino + 1 PWM 3 stage (voltages 0v, 2.5v, 5v)

Inputs: These are simple push buttons, like you find on keyboard, remote and etc

Arduino: Requires programming I'm a total noob which come to this.

Outputs: Variable output which goes to the Emerald ECU. The has a single input channel and requires 3 different voltage levels to switch the maps. This is why I require the PWM output on the arduino. This is an example of how the map switching would be done normally.

I can connect the switch up to the arduino. for example Pins 10, 1, and 7 to Aduino inputs pin 13, 12, and 11 output connect the ECU to PIN 5

On the programming side I need to help to do this. Pin 13 receives push signal, arduino puts 5volts to pin 5 Now Pin 12 receives signal, arduino puts 2.5 volts to pin 5 Next Pin 11 receives signal, arduino puts 0volts to pin 5

This is what I require to do please help. Thanks

:~Any Help on the coding Please, Thanks

PWM is not a natural fit here - you'd need a low-pass filter and a buffer amp that can sink sufficient current to pull the line close to 0V - quite complex.

I would use a single pin in tristate mode - connect the line to ground via 1k (this provides 2.5V if the Arduino pinMode is set to INPUT. When its an OUTPUT you can drive the line to 5V or to 0V. The Arduino pins can drive a 1K load directly. My only slight worry is how much noise there might be on the line (depends on the length of wiring to the unit).

Thanks Mark The run of the cable would be 1.5 m also shielded too.

For Tri state mode: Bit confused :~ Is this what you mean??

Thanks for your help

Hi would this be right for a tri state configuration?

need help on programming side.

thx

bump