Motec C125 dash controls via Arduino-powered steering wheel

It ain’t a real race car without lots of buttons on the steering wheel to do cool stuff, right?

I guess, sorta. While coolness is an added bonus, that’s not really what I was trying to do here. Having the Motec C125 dash set up to read data from the Link G4+ Thunder ECU, I needed to find a way to move the screens on the dash. The dash only displays so much at one time and so you have the ability to scroll within a screen, as well as set up multiple screens to toggle between – as long as you can tell the dash to do the scrolling somehow. Here’s the final product:

One way to do this is to buy the ~$450 I/O module for the dash and wire a few switches directly into the dash. But why take the easy route when you think you still got the skillz to code and could learn a new environment in the process? Hey, here’s another project, because I need more.

Honestly, I was actually shooting to do two things at once: I wanted to create the steering wheel buttons, but I also wanted to read from a USB Tire Pressure Monitoring System (TPMS) sensor, convert the pressure and temperature of each tire to CAN data and display that data on the dash. For the uninitiated, CAN is the automotive industry standard in which different parts of a car talk to each other and send data around. Think of it like WiFi or Ethernet, except for different parts of the car to talk to each other.

To get the physical pieces working, here’s what I used:

I cut out a shape for the backing plate that would fit my steering wheel, mirrored it and cut it out of the urethane sheet.

IMG_1184

I then added the buttons, soldered the requisite connections to the curled cord and used hot glue to hold all the wires in place on the back of the plate.

IMG_1188.jpg

The curled cord on the steering wheel connected to the Deutsch DTM 6-way connector allows me to easily remove the steering wheel anytime via the quick disconnect. Six connections are need: ground, 4 colored buttons and at some later point the horn button as well, which is currently inoperable. The easy disconnect also allowed me do develop all the software on my office desk.

IMG_1190.jpg

Power here comes from the USB connector, which is also how the Arduino board gets power within the car. Below is a picture of the board in its case with the USB shield and TPMS sensor. The two-wire Deutsch DTM connector is the CAN bus connection and the 6-wire. This box is mounted under the dash and can easily be opened with 4 screws.

For now, I’m using three buttons. One to scroll screens, one to move lines within a screen and a third one to change the background brightness on the dash. One cool thing was that the logic for the CAN signal for the brightness was slightly different from the other buttons, but it was easily changed in the software in less than 5 minutes and no compile error on the change. It’s just software! 🙂

Writing the Arduino code was generally pretty simple since it’s more or less C syntax, which I wrote a lot of code in back in the day. There were a couple of key hurdles:

  1. The first CAN shield had bus conflicts with the USB shield. Solution was to buy a different CAN shield.
  2. Figuring out exactly the CAN frame the C125 wants to see to move a screen or page along. I spent a good amount of time debugging CAN frames on the bus. It was often hard to tell whether I’ve set up the dash wrong or whether what I’m sending is wrong. Thankfully using the Motec CAN debugger I was able to get a raw dump of what’s on the CAN bus.
  3. Pushbuttons require “debounce” logic. In short, when such a button is pressed it doesn’t go from fully off to fully on immediately. The signal read by the Arduino upon button press is something like “on off on off off on off on on on off on on on on on…”. You therefore have to wait some amount of time once you see an “on” signal, wait for a few potential bounces to off and then make sure it’s consistently on before declaring it actually to be on and sending that to the dash.
  4. I could not get the USB TPMS sensor to work so I’ve punted on it for now. The idea is that I could send that data and display it on the dash, but I’m having trouble talking to the UBS TPMS sensor from the board and haven’t been able to find anyone to help. It’s not a typical question in an Arduino forum unfortunately.

So that’s it. It was really fun project and it’s been super reliable. The Arduino boots super fast too. I’m still trying to figure out what to do with the fourth button or what else I could do with the Arduino. Perhaps there’s something to be set or changed on the ECU, which I might do. Like the dash, the ECU will read CAN signals sent to it on that same bus and can act on them. I’m open to any ideas you might have. Let me know!

Advertisements

One thought on “Motec C125 dash controls via Arduino-powered steering wheel

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s