RX8 Cluster

RX8 Project – Part 5, Canbus

Following the decision to go for the complete engine swap I had the sudden realisation that nothing was going to work on the car because I wouldn’t have the factory engine and so also wouldn’t have the factory ECU and so no engine data and nothing on the instrument cluster. So I needed to come up with a better plan!

Initially I intended to open up the stock instrument cluster and replace the normal controller circuits inside the cluster with a microcontroller (probably an Arduino) with suitable supporting electronics such as motor driver IC’s to control the gauges and small MOSFET’s to switch the warning lights and anything else I needed to get it working. Done in that way I could interface almost anything to the Arduino and make the cluster behave however I wanted.

I started looking into what wiring the cluster had normally to see if I could hack into anything directly and not have to fake signals, say a nice direct tachometer connection I could use, but found that virtually everything on the cluster was controlled via a canbus communications connection and this gave me other ideas.RX8 ClusterFor anyone who doesn’t know canbus is a differential communications interface used in the majority of common cars to connect all the separate devices together. It is what’s called multi drop and as such all the devices are basically just daisychained on a single pair of wires. Complexity is the data is sent to a specific target device based on a device ID which we don’t know and the format the device needs the data in is to give a particular result is entirely up the manufacturer. So for example even if you found the memory location that controls RPM it might be using a single byte (256 possible values) to represent RPM in the range of 0-7500 rpm. This means that each increment would be a step of approximately 30 rpm which would likely not be noticeable. Or they might use two bytes at different addresses which combine to give the value, or something more complicated! Figure it all out and you can directly control the cluster!

The Arduino can be made to communicate with a canbus system with appropriate components added on. These are available as an off the shelf canbus shield and if you’ve not build circuits like this before I recommend that approach but since I have an electronics background I decided to DIY my own and save the money and so I started down the route of designing a canbus interface. I then had another interesting thought, if I had an engine ECU for the new engine it would be transmitting all sorts of data about what it was doing which would normally go to the cluster of the car it was from. I could work out what address it was sending that data too I could read it all. So suddenly one canbus interface grew to a pair of them so I could connect one to the engine ECU and one to the cluster and eventually use the pair of interfaces to bridge the two canbus connections and convert and reformat all the engine data in real time to control the cluster. Sounds simple right!

Based on information found via Google the chips to use seemed to be the MCP2515 transceiver and MCP2551 canbus line driver. Part of the reason behind this was there are well documented libraries available for the Arduino to work with these, plus they are available in DIP packages to make prototyping on stripboard easier!

Sadly I can’t seem to find the original circuit diagram I drew for this but it was closely based on this one (click to enlarge):Arduino MCP2515 Interface

I tend to use Arduino nanos in my projects, they are very small but have a good clock speed and all the handy features you’re likely to need for fairly small IO count projects. Plus you can buy the knock off version on eBay for very little, my last ones were 5 for £12 delivered next day but can be had for less if bought from a Chinese seller but obviously with a much longer delivery. The down side of these is they make them cheaper by not using the proper FTDI branded USB to serial converter chip, instead they use the CH340G which means the driver isn’t included with the normal Arduino IDE and must be downloaded and installed manually. The appropriate driver can be found from a number of sources via Google.

After quite a bit of work I ended up with something that looked a bit like this (ok, exactly this!)

Arduino Canbus adapter top Arduino Canbus adapter bottom

The red and black coloured solder lines are to distinguish the 5V power from the Arduino from everything else to make sure I hadn’t accidentally shorted  it out. Needless to say there’s quite a bit going on on the bottom of this board! The converter board has options for either screw terminal connectors or the 9 way DSUB used for certain applications. I’ve also included options for connecting power into the DSUB if required. On particularly important feature is the termination resistor, this is situated next to the blue jumper, moving the jumper turns this on or off. Canbus must have this termination resistor connected between the two bus wires (called CANL(-) and CANH(+)) at each end of the bus, so if this is an end node on the bus it needs enabling. If it’s being added to the middle of an existing bus it should be disabled. Other keen people will notice there’s only one Arduino slot occupied, this is because by the time I took the photo it had been commandeered for another project but since I was still working with identifying signals in a single bus at a time it didn’t really matter. I did initial test with two Arduinos connected via canbus  with one transmitting and one receiving just to prove the hardware out.

Next up we need to connect the new hardware up to the RX8 cluster. This assumed it is disconnected from the car, if it isn’t you won’t need to tie in power to the cluster but I have no idea how the but will behave in this situation. If you experimenting as I am it’s advisable to disconnect the canbus pins to avoid problems or just disconnect the whole cluster. to make this work we need to use the smaller connector on the back only. In the diagram above you can see the pinout for this, the simple version is :

Upper Row going left to right
B/Y – Ignition Switched +12V
B – 0V (PSU Minus)
L/R – Permanent +12V

Lower Row
G/Y – Unknown
BR/B – Unknown
R/Y – Unknown

For testing purposes both +12V can be connected together and any normal 12VDC PSU (cheapo wall wart or anything else you have) can be used. Congratulations, you now have a powered up cluster you can work with!

Things will get technical in the next section Canbus #2

11 thoughts on “RX8 Project – Part 5, Canbus”

  1. Following this build and hope it all works out for you. Currently have an rx8 myself and researching wether to repair or replace the engine.

    1. Glad to hear someone is actually reading it! You’re actually the first real comment I’ve had!The problem at the moment is finding the time to keep the blog updated but I’ll try to stick with it!

      My advice would be to find out what state the engine is in internally before committing to either. If it’s anything like mine was it wouldn’t be so much a rebuild as a full replacement!

      1. Thanks for the reply, got my engine stripped down last week. Edges of the rear eccentric shaft bearing seem slightly burned due to excessive heat as well as both rotor housings having chatter damage.

        Just need to plan my next move but will probably be after Christmas before I make a decision.

        1. That all sounds very familiar! Did you have the same o-ring seal failure I did by any remote chance?

          Sadly it seems due to the odd shape of the housings it’s impossible to get them resurfaced (you can get them stripped and fresh hard chrome put on but I couldn’t find anyone short of Mazda themselves who can do the grinding operation to smooth that profile to a usable surface) so you’re stuck trying to find some good condition used ones and that’s getting increasingly difficult.

          I’m aiming to get more regular updates in the future. The actual project is actually a fair bit further on than the blog but it takes so long to write everything up because everything else keeps getting in the way!

  2. Hi, just found you doing the engine swap. I’ve just started mine. I’ve got my 2006 rx8 and a complete 2003 3lt s-type jaguar too. It’s got an incredible engine in it, high power and lot’s of torque. It was a good buy 380 pounds the hole car. I had worries about the gearbox set up, and reading your I’m happy again. Ive only started reading them, but will read the rest. Thanks for doing this I’m looking forward to reading the rest and catching up with your car.

    1. Glad you’re enjoying it! The 3.0 is certainly the better option but this started as a cheapo engine swap which would be unique and as with all good projects it’s grown quite a bit since then!

      If you have the whole S-type you might find it easier to transplant both the engine and gearbox and just get a custom drive shaft made to hook it up to the differential. I’ve no doubt it won’t be as easy as it sounds but worth a thought!

      There’s still plenty more to come, hopefully this summer will see some good progress made and so lots more updates – unfortunately I don’t have a garage so major work is limited to dry weather!


      1. Hi, I’m lucky there. My garage is under my house, 100 square metres of it. I was thinking of fitting the gearbox as well. There’s a company in England that makes custom sub frames, engine mountain etc. I’m back in England next week so I’ll be popping to see them and see what they can do. Got mazda striped just starting to do the same to the jaguar. I’m just worried that the mazda axle can take the change

  3. Hey, been reading this for a while. How does the back end of the car holding up. I’ve heard people swapping the stock ones with the BMW M3s.

    1. It’s still a work in progress – Unfortunately I don’t have a garage and so work on the project is largely seasonal. I’ve spent amounts of the winter when I’ve actually had a moment among everything else working on the engine package so hopefully I’ll get it all put together this summer!

      Funny you should say that, my plan is largely to find out if it fails and if so change it out, most likely for the BMW one!

  4. Nice project. I also have rx8 with two ruined rotaries. Planning to swap with miata 1.8 turbo engine with standalone ecu. Only worries me how to wire oem ecu and standalone to get everything work without check engine lamp.

    1. I’ve seen various comments online about retaining the factory ECU to make it work and for some things that may do it but you’ll still have the problem of making the gauges work on the cluster. As the blog details with the cluster isolated I can control most of the warning lights with the exception of the power steering light. What we’ve found is as soon as the cluster is in a real car there are other modules on the bus (such as the ABS) which broadcast conflicting data and cause some irratic behaviour. Getting other modules to initialise without a factory ECU is a work in progress but sadly I’ve not had the time to work on it recently. Realistically if you put the factory ECU on the canbus I imagine it’ll fix some lights but cause problems elsewhere with things like forcing the RPM and speed to zero but I’ve not tried it. Another option is of course to change the gauges out.

      Good luck with your project! Please let me know how you get on!


Leave a Reply

Your email address will not be published.