Viaszx / Mazda-SkyActiv-EngineCoolantTemp

Show engine coolant temperature on OLED SSD1306
0 stars 0 forks source link

I need your help with Coolant temperature CAN data #1

Closed alpenraum closed 2 months ago

alpenraum commented 2 months ago

Hey, sorry I couldn't find any other way to get in touch with you 😄.

I have started to decode the CAN network on my Mazda MX-5 and I am now stuck on Coolant temp. Multiple sources (i.e. your project and one other resource) seem to point at CAN ID 0x420 and when sniffing the data it seems to correlate to the temperature. But I am stuck at figuring out which byte(s) are exactly the temperature and what conversion equation is needed.

I am not that familiar with C or microcontroller programming, but from your code it looks like you only take the first byte? https://github.com/Viaszx/Mazda-SkyActiv-EngineCoolantTemp/blob/d303e1a09e6352e337dc2b3bbd521f4797cf0c9c/can/can.c#L181

Could you, if you remember clarify (1) which bytes you are actually using, and (2) which conversion you use to get the temperature value?

Thank you very much in advance already!

Viaszx commented 1 month ago

Hi there! It's okay, no worries.

  1. Yes, it's first byte of 420 ID
  2. Example: b0=0x5A in dec=90; 90-40(is constant, where 0 corresponds to -40 °C, offset)=60℃