I need to build a can bus translator for various cars we work on in our shop.
This particular project is an 07 lotus exige with a turbocharged honda engine and a standalone engine management computer. With most cars we usually install an aftermarket gauge cluster that does data logging and all that. For this car we need to retain the oem functionality in the car. Problem is the can protocol from the engine computer is different from that of the oem gauge cluster.
What we're going to attempt here is to use 2 arduino's with a can shield on each, one to receive messages from the computer, that will send the info to the another arduino which will send messages to the gauge cluster.
I will be documenting everything and posting it here since I'm sure other people will need this type of device at some point. This will be my first time messing with the can shield so we'll see how it goes.
the elise regularly transmits only one frame/message ID# and that is 400h (hex). The message is transmitted and thus updated 10 times a second (allowing a resolution of 10 hz). the frame is 8 bytes and so far it looks as though 2 bytes are unused. the frame carries the following data: rpm, speed, temperature, MIL, and fuel. the frame layout and approximate conversions are as follows:
ecu-->cluster broadcast frame
400h 8 AA BB CC DD EE FF GG HH
AA -----------------------> adjusted speed ~= d(XXh)-11d (61h-->97-11=86 mph)
BB --------------------> unused (always 00)
CC DD --------------> tach rpms first part of rpm. take rpm from ecu output eg. 4000rpm and divide by 256 = 15 (dont care about the decimal left overs(.625)) now convert 15 to hex (0F) and send to the dash.
EE -----------> fuel level (00=empty, FF=full)
FF --------> engine temperature ~= deg F with an offset of -14
GG -----> send the following to the dash - all in hex. tc = traction control light.
00 = off. 01 = shift light. 02 = MIL. 03 = Mil&Shift. 04 = oil. 05 = oil&shift.
06 = oil&mil. 07 = oil&mil&shift. 08 = tc. 09 = tc&shift. 0a = tc&mil.
0b = tc&mil&shift. 0c = tc&oil. 0d = tc&oil&shift. 0e = tc&oil&mil.
0f = tc&oil&mil&shift
HH --> unused (always 00)
The ecu can output is a bit more complex, it can be viewed here
I've done some simple things with the Arduino, but never anything that seems this complex.