Page 1 of 1

CanBus reading

Posted: Sat Dec 29, 2018 1:23 pm
by barrym
Hopefully this is the right sub forum to ask this - I emailed support over 2 weeks ago but no reply yet...

i'm looking for some help with the canbus output I am sending to a custom dash ...

background data:
kPro4 on a Honda k20a2

sensor is a digital pressure sensor and displays correctly in kmanager.

reference data:
custom sensor configured in kmanager as pressure in psi
0.47v = 0 Bar
4.95v = 10.3Bar
sensor reads 0.6psi (0.04 bar) or 0.49v and is connected to analog 2 input

canbus:
Canbus is configured as hondata protocol @ 500 kbit.
connected on the canbus is an arduino uno with seedstudio canbus shield.


canbus sniffing results in 0x667 frameid, position byte 4 & 5 (analog 2) give me an integer of 1 and 143 respectively.

I am confused with the notes in help that report "Analog (16 bits) - voltage (volts) x 819.2"

taking the canbus values of (1+143) * 819.2 = 117964.8 - what does this number represent ?

the help notes don't speak of any offset values or any other math to reach 0.6 psi value or in bar???

OR does the kpro take the voltage of 0.49v then multiply by 819.2 and send 401.408 over the canbus in bytes 4 & 5?
but how would this translate to 0.6 psi ???

please could you provide more info / help ???

many thanks, Barry
Sydney, Australia

Re: CanBus reading

Posted: Wed Jan 02, 2019 11:49 am
by Hondata
The word value is 0x18F or 399. The conversion is voltage = value/819.2 = 0.49V

Re: CanBus reading

Posted: Wed Jan 09, 2019 2:43 am
by barrym
Ahhhh


Thanks, that makes more sense - I was treating 1+143 but understand now they are individual values .... for my own sanity and others....

1 int = 1 hex
143 int = 8F hex
18F hex to int = 399 then / by 819.2 = 0.49
Then need to convert to psi (using the map function : ) map(value, fromLow, fromHigh, toLow, toHigh) so:
map(0.49, 0.00, 5.00, 0, 200)

Cheers

Re: CanBus reading

Posted: Sat Jan 12, 2019 9:20 pm
by barrym
so, now that's all worked out - using arduino code as following gives me the relevant info ..

unsigned otInt = (rxBuf[4] << 8) | rxBuf[5];
int otV = otInt/819.2;
int otAct = map(otV, 0, 5, 0, 200);

where rxBuf[x] is the canbus place for oil temp - mash them together, get 399 & divide by 819.2 then map into, well that's the next question - what value does the hondata use to send info ..
for oil pressure, does it send bar ? for temp does it send in deg F or C ?

Re: CanBus reading

Posted: Sun Jan 13, 2019 8:04 pm
by Hondata
Raw voltage for all of them.

Code: Select all

int otV = otInt/819.2;
Close enough...

Re: CanBus reading

Posted: Wed Jan 23, 2019 10:37 am
by Kr4nG
Can the output of the can message id's be changed? I have a swapped 06 mini cooper k24 kpro4 and wanted to know if I could get my cluster to display the RPM. The cluster has can - and can + wires but I think the message ID for the RPM is 0x316 Byte 3. Any way to modify it?