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
CanBus reading
Re: CanBus reading
The word value is 0x18F or 399. The conversion is voltage = value/819.2 = 0.49V
Hondata
Re: CanBus reading
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
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
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 ?
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
Raw voltage for all of them.
Close enough...
Code: Select all
int otV = otInt/819.2;
Hondata
Re: CanBus reading
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?
-
- Posts: 4
- Joined: Thu May 21, 2020 6:26 pm
Re: CanBus reading
Hey would you be willing to share your arduino code? I have been trying to build a custom dash but i am a little stuck with the canbus communication.barrym wrote: ↑Sat Jan 12, 2019 9:20 pm 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 ?