Below is a quick explanation how the controls work. Let us know if you have questions how it works.
- Control keys hardwired to the ECU: Traction Control On/Off, Engine Brake On/Off and Launch On/Off. These are latching type switches.
- Control keys connected to the C125 display: Trim+,Trim-,Page and reset. These are momentary switches.
- ECU and Display communicate thru the CAN bus
Schematic of typical switch input
How to set it up, for example button for Traction Control?
In M1 Tune, Traction control is set as Driver Switch 1.
Then, this switch is connected to a physical input, in this case Analogue Temperature Input 3:
When key is not pressed, voltage in the Analogue Temperature Input 3 is about 5V since the Pullup Control is turned On.
When the key is now pressed, the Input voltage drops to 0V, below the Threshold set for the input. Now ECU will detect that the key was pressed and the state of the Driver Switch 1 is changed to One (On).
Setup is the same for all switches connected to the ECU. Things are different though for the other switches connected to the display, this is little bit more complicated and next.
Little more complicated: Controls connected to the Display
As an example, let's use the Trim + button which is connected to the display. Switch is momentary type and is connected to the display in a similar way as ECU switches. Pullup is turned on etc..
One problem is to find a way how to send the switch state to ECU. This is where the CAN Bus comes to the rescue.
Trim + switch is connected to the AT1 analog input in the Display and we measure the voltage in that input. Channel measurement is then sent every 100ms to the CAN Bus, to CAN ID 0x7F0. Value is in byte Offset 4 and lenght is 2 bytes.
In the ECU side, ECU Receive CAN ID Base is set to 0x7F0. ECU listens all messages with this ID and then decodes the channels.
Next, in the ECU, we connect the Traction Plus Switch to Driver Switch 4:
Then, we connect the Driver Switch 4 to the Resource, which is the CAN ID to which the display is sending the value. In this case it is CAN Receive Base ID - 0x7F0 = 0, so CAN 0. Offset was 4, so we select CAN 0 Offset 4.
Now the ECU uses this resource as the Voltage of the Driver Switch 4.
To simplify all this
When the key is pressed, input voltage is 0V -> value sent to CAN -> ECU receives the CAN message -> ECU decodes the message and sets the value from Resource CAN 0 Offset 4 to Driver Switch 4 -> value is below the Threshold -> Key was pressed and state is changed to On.
Trim buttons are little different though since the Trim value is actually between -5 to +5. Every Trim + button press adds to a counter in the firmware until value of +5 is reached. Trim - then decreases the value of the counter with every press. This value is held between power cycles to keep the last value.
How is the Trim setting shown on the display?
Method is similar to the Trim + button but in a reverse direction.
ECU sends out CAN messages to ID 0x663 where the Driver Traction Trim value is. This message is decoded by the display and then shown on the screen.
What is important here is the Signed checkmark since the value can be negative.
Then, we use a simple alarm for this channel and give an alarm if the value changes with 1.
That's it, simple and works well. Thanks MoTeC for making this easy.
Go back to Yamaha R1E Main project page