S2000 Racing and Competition The S2000 on the track and Solo circuit. Some of the fastest S2000 drivers in the world call this forum home.

Reading from CAN bus with OBDLinx MX and RaceChrono

Thread Tools
 
Old 05-16-2022, 06:05 AM
  #11  

 
_valtsu_'s Avatar
 
Join Date: Nov 2016
Location: Finland
Posts: 191
Received 21 Likes on 19 Posts
Default

Glad you found the solution and thanks for sharing.

About the protocol settings:
Did have to specify the bus speed or does the software recognize it automatically?
Old 05-16-2022, 09:05 PM
  #12  

Thread Starter
 
Nate Tempest's Avatar
 
Join Date: Jun 2017
Posts: 524
Received 70 Likes on 55 Posts
Default

Originally Posted by _valtsu_
Glad you found the solution and thanks for sharing.

About the protocol settings:
Did have to specify the bus speed or does the software recognize it automatically?
The bus speed is included in the protocol. 6 and 7 are both 500kbaud. Interestingly, when I connect using the OBDLink MX app it claims it's using protocol 7, so 29-bit, but it definitely needs 6 (11-bit) in Racechrono, or when I try it manually in a terminal app. Not sure why that is, but at least it works!
Old 05-17-2022, 08:17 AM
  #13  

 
ncrx's Avatar
 
Join Date: Mar 2016
Posts: 311
Received 49 Likes on 42 Posts
Default

the two other things i tried to find were AFR and Knock count since the hondata flashpro app can pull those. i had no luck trying to figure those out.
Old 05-17-2022, 10:11 AM
  #14  

Thread Starter
 
Nate Tempest's Avatar
 
Join Date: Jun 2017
Posts: 524
Received 70 Likes on 55 Posts
Default

Updates:

Speed
Speed
PID: 448
Equation: bytestouint(raw,0,2)/65535.0*200*0.44704

imstimpy's description was close, but not quite right. The four two-byte pairs do each represent the speed, but they roll over at 200mph, 100mph, 50mph, and 25mph. (Or possibly 320kph, 160kph, 80kph, 40kph, which is almost the same thing - the scaling factor is slightly above 1.6. I think mph is more likely since it's round numbers though, and it's closer to the speed given by the speedometer.)

Edit: that's closer, but not quite right either. Per the post below, each couple of bytes is a speed at a different wheel, but they're each 15 bits instead of 16, so each one gets offset if you just take the bytes. The equation above does work fine for the LF wheel speed though. It converts to m/s, which RC will covert back to mph or km/h based on your units.


Lateral acceleration
I'm still not sure the scaling of this one, but I found the data traces extremely noisy in testing, so I don't expect it'll be useful.

Coolant temperature
PID: 300
Equation: A-40 (°C) or A*1.8-40 (°F)

So the first byte in PID 300 represents the temperature in °C, offset by 40°. That means when the register is 0, the temperature reading is -40, which was likely chosen because that's the crossover point of the F and C scales, so it makes conversions simple.

Intake temperature
PID: 300
Equation: B-40 (°C) or B*1.8-40 (°F)

Same as the coolant temp.
Old 07-02-2022, 06:53 AM
  #15  

 
10ks2kftw's Avatar
 
Join Date: Oct 2016
Posts: 11
Likes: 0
Received 3 Likes on 3 Posts
Default


This is the format for the individual wheel speeds coming from the 06+ abs unit.
The following users liked this post:
Nate Tempest (07-03-2022)
Old 07-02-2022, 11:41 AM
  #16  

Thread Starter
 
Nate Tempest's Avatar
 
Join Date: Jun 2017
Posts: 524
Received 70 Likes on 55 Posts
Default

Originally Posted by 10ks2kftw

This is the format for the individual wheel speeds coming from the 06+ abs unit.
Ahhh lol, that makes more sense. So it just looks like each 2-byte pair is getting increasingly precise because it's bit-shifted by 1. So my equation works because the least significant bit gets rounded off and doesn't make any difference, but it's just giving the LF speed. I'll have to see if I can se up multiple speed traces in RC, as it would definitely be interesting to compare wheel speeds at times.
Old 07-03-2022, 05:25 PM
  #17  

Thread Starter
 
Nate Tempest's Avatar
 
Join Date: Jun 2017
Posts: 524
Received 70 Likes on 55 Posts
Default

And it looks like you can track individual wheel speeds in RC, so these should be the equations unless I've made a mistake (haven't had a chance to test yet)

Wheel speeds
PID: 448
Equations:

LF: bitstouint(raw,0,15)/32767.0*200*0.44704
RF: bitstouint(raw,15,15)/32767.0*200*0.44704
LR: bitstouint(raw,30,15)/32767.0*200*0.44704
RR: bitstouint(raw,45,15)/32767.0*200*0.44704

To enter them, you pick Wheel Speed (kph) or (mph) (depending on your units setting) for channel, and then tap "Show More", and choose the specific wheel under Channel postfix.
Old 07-03-2022, 06:54 PM
  #18  

 
10ks2kftw's Avatar
 
Join Date: Oct 2016
Posts: 11
Likes: 0
Received 3 Likes on 3 Posts
Default

thats great that the software lets you specify exactly which bits to use in a simple format. Most things use a bit mask which can get quite complicated.
Old 07-11-2022, 04:38 PM
  #19  

Thread Starter
 
Nate Tempest's Avatar
 
Join Date: Jun 2017
Posts: 524
Received 70 Likes on 55 Posts
Default

Just confirmed the above works. And it's pretty cool looking at the different wheel speeds! You can watch one side going faster than the other on corners, see where you're starting to spin the rears, and, most interestingly, see whether the front or rears are starting to lock (antilock) first under braking.
Old 10-06-2022, 05:17 PM
  #20  

 
10ks2kftw's Avatar
 
Join Date: Oct 2016
Posts: 11
Likes: 0
Received 3 Likes on 3 Posts
Default

Whats the resolution you're seeing? Is it 0.1kmh or 1kmh?


Quick Reply: Reading from CAN bus with OBDLinx MX and RaceChrono



All times are GMT -8. The time now is 01:46 PM.