Yamaha YZF-R7 Forum banner
1 - 5 of 5 Posts

· Registered
Joined
·
149 Posts
Discussion Starter · #1 ·
Anyone done any CAN sniffing on the R7? Just getting started on this project for mine and was hoping that others might already have some experience or guidance to offer. I have the wiring harness and will easily be able to figure out which wire is CAN H and CAN L. From there it will be a lot of effort to reverse engineer the noisy bus traffic. So hopefully someone else has done some of this and willing to share.
 

· Registered
Joined
·
149 Posts
Discussion Starter · #2 ·
Ok, no one else replied so I had to just start the work on my own. I'll share my learnings so far in case anyone is interested in doing something similar. First and foremost you'll need a cable to connect to the OBD port which is the red capped connector underneath the seat. I ordered this one from amazon https://a.co/d/8oZR6vU confirmed to work. From there I used an ESP32 dev board https://a.co/d/9in28Rz and a CAN Bus transceiver https://a.co/d/75fQKz0 and finally an SD card reader https://a.co/d/af7i9F2 like that one.

Now, you can google to find out how to hook all those items together and get the basics of the programming figured out. The challenging part was then getting the data into a tool that would help reverse engineer. For that I used Home which is a great tool but it took some work to figure out how to get the data into that tool. It is designed to work with specific devices and there are some firmware options out there too. I finally figured out that the following log format would work.

CSV File with the following fields:
  • Time Stamp
  • ID (CAN Frame Message ID)
  • Extended (0 or 1 indicating whether the frame is an extended frame or not)
  • Dir (Tx or Rx indicating whether the message is a transmit or a receive)
  • Bus (Numeric value indicating the bus, R7 you can just use 1)
  • LEN (Numeric value indicating the length of bytes being sent in the CAN message)
  • D1 - D8 (Individual comma separated values containing the HEX values for each of the CAN data frames)
From there I simply used the online Arduino libraries to capture the CAN data and put it into this format. I started off sending this data over serial and capturing it on my computer using another app I wrote. However, this isn't usable for when you want to ride and capture data to analyze later. So I changed the Arduino code to simply log this to a unique file on the SD card with a .csv extension and the fields as indicated above.

With all of that out of the way it was time to start trying to figure out what all these messages meant. That is where SavvyCAN is helpful. It provides tools to visualize the data and help identify what all these messages mean. It is still early but so far I have the following:

  • Throttle position. This comes through with MsgID = 0x216 or decimal value 534. In this message byte 2 will contain a decimal value of the throttle position. The range is 33 - 208. I'm not sure why these values but they work. From there you can calculate throttle position as a percentage. Math formula's for this are online.
  • RPM's. This comes through with MsgID = 0x20A or decimal value 534. In this message byte 0 will contain a 2 digit representation of the RPM's. Simply multiply that by 100 and you have your numeric representation of the RPM's.
That's it for now, I need to work on some more items so that I can mount the logger and ride the motorcycle. Hopefully that will help reveal some of the other values I'm looking for. I'd like to get brake application, wheel speed, engine temp, gear, and a few others. Hopefully this helps someone else if they decide to take on a project like this. Warning, it is tedious and a lot of time. However, when you start seeing meaningful values it really does bring a sense of satisfaction.

Font Electronic device Display device Multimedia Machine


Circuit component Passive circuit component Breadboard Hardware programmer Electrical wiring
 

· Registered
Joined
·
67 Posts
Thank you very much for sharing, @kdemotorsports . For what it is worth, it appears that the FTECU race license for the R7, plus one of a few Aim data logger models, will allow recording of ecu data along the lines you're exploring. I use an aRacer RC Super 2 ecu and it logs ecu data as well, and is cheaper than the FTECU race license plus Aim data logger combo. Neither is as inexpensive as what you're doing, of course, unless you include a reasonable "cost" for your labor in figuring it all out. Once you end up with something that works, I think there will be a market for it among racers running the Yamaha ecu.
 

· Registered
Joined
·
149 Posts
Discussion Starter · #4 ·
Thank you very much for sharing, @kdemotorsports . For what it is worth, it appears that the FTECU race license for the R7, plus one of a few Aim data logger models, will allow recording of ecu data along the lines you're exploring. I use an aRacer RC Super 2 ecu and it logs ecu data as well, and is cheaper than the FTECU race license plus Aim data logger combo. Neither is as inexpensive as what you're doing, of course, unless you include a reasonable "cost" for your labor in figuring it all out. Once you end up with something that works, I think there will be a market for it among racers running the Yamaha ecu.
I'm well aware of the options that are available on the market and certainly if I was "paying" myself it wouldn't be worth it. However, that's not really the point for me. It is an interesting learning exercise and I get to assemble the solution exactly how I want it.
 
1 - 5 of 5 Posts
Top