How it works
- Black/Red - 12v or 0v to power the exup motor
- Black/Green - 12v or 0v to power the exup motor
The above two wires switch polarity to change the direction of the exup motor.
- Red/White - potentiometer feedback to ECU (wiper)
- Blue - 5v from ECU reference voltage for potentiometer
- Black/Blue - Ground for potentiometer
Upon startup of the ECU the Black/Red wire is energised first to 12v and the ECU expects to see an increase in resistance from the exup potentiometer. The ECU then reverses polarity and energises the Black/Green wire and expects to see a decrease in resistance from the exup potentiometer.
The ECU is attempting to turn the exup motor through its full range of movement. Lack of resistance i.e. feedback to the ECU results in error 17 displayed on the clocks.
According to the Yamaha service manual the exup will range from 0 - 7,500 Ohms through one full rotation of the valve.
The Arduino analog input pins can't handle voltages over 5v so I have added two voltage dividers to reduce the max voltage to ~1v from a 12v supply voltage.
The code on the Arduino is triggered by the presence of a voltage on either of the motor wires. Positive voltage on the Black/Red causes the digital pot to increase in resistance and positive voltage on the Black/Green decreases resistance.
Once a voltage is detected a while statement in the code increases or decreases a variable from 0 to 97 which is passed to the digital pot increasing or decreasing the resistance. How I determined the range is detailed below.
The whole circuit including the Arduino is powered by 5v from the Yamaha R1 loom on the blue wire.
10,000 Ohms divided by 129 equals 77.52 Ohms per step
We know that one revolution of the exup valve is 7,500 Ohms so;
7,500 divided by 77.52 equals 96.7. Arduino's can only accept whole intergers so lets call it 97.
So, in order to output 7,500 Ohms of resistance on the digital pot we need to tell the MCP4131 to increase from step 0 through to step 97.
- 2No. 10k resistors
- 2No. 1k resistors
- IC holder, 8pin
- Arduino Nano v3 - I use clones purchased from eBay.
- Various lengths of coloured wire
- Protoyping board 70x50mm or use my PCB if you are able to mill your own.
- 6 way connector
- Project case or 3D print mine
Making it look more professional
The last time I had created my own PCB was over 20 years ago at school using acid etching. I don't have access to those materials but I do have a CNC mini mill in my garage!
I started by downloading and installing Diptrace so that I could create a schematic and then a PCB layout. The schematic is the same as the one pictured towards the top of this post.
Getting the layout figured out so everything could be contained on a single layer was a little tricky but I am happy with the results.