Serial data?

General Q&A specific to RaceCapture/Pro. For app related questions post in the RaceCapture App forum. also see the <a href="http://www.autosportlabs.net/RaceCapture">RaceCapture Information Page</a>

Moderators: JeffC, rdoherty, stieg, brentp

0100
Posts: 2
Joined: Sat Mar 01, 2014 8:43 pm

Serial data?

Post by 0100 »

I plan on running a hondata kpro in my track car, and it looks like it can output a serial stream. http://www.hondata.com/help/kmanager/in ... output.htm

Can the race capture pro accept serial data from the kpro?

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi,

The firmware could be modified to read the serial data, but you would lose either GPS or telemetry / bluetooth capability in the process.

Is there a way for the hondata to output on the CAN bus?

Regards,
Brent
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

andylaurence
Posts: 43
Joined: Tue Apr 30, 2013 10:35 am

Post by andylaurence »

I, for one, would happily trade the telemetry/Bluetooth port for a serial input if it could be configured appropriately to read data from my Suzuki GSXR ECU. For those of us without the telemetry option, could serial data be enabled when logging starts and Bluetooth enabled when no longer logging? I'm guessing that this would allow logging of serial data on track and Bluetooth configuration/log download in the pits.
Sprinting an ADR Sport 2
www.endurancelay.co.uk

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

after reading this I had a tangential thought. We're working on a way to CAN-enable old style OBD2 (non CAN bus). The work in progress will be centered around a small microcontroller that can read serial data from an ELM327 compatible interface chip and present the information on the CAN bus.
https://github.com/autosportlabs/OBD2CAN

I was thinking, it would be neat if something similar could be made to "CAN enable" the Hondata ECU and the Suzuki GSXR ECU and others - by getting them onto the CAN bus you'll be able to integrate them with a variety of other devices in a much more standard way.

Just a thought.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

andylaurence
Posts: 43
Joined: Tue Apr 30, 2013 10:35 am

Post by andylaurence »

I'll order a CANx and a serial adapter if you can do it!
Sprinting an ADR Sport 2
www.endurancelay.co.uk

0100
Posts: 2
Joined: Sat Mar 01, 2014 8:43 pm

Post by 0100 »

Yeah if you guys can get this to work I think it would be huge.

I know AIM makes a Kpro hondata ecu interface. http://www.aim-sportline.com/download/e ... 02_eng.pdf (pdf install instructions of the AIM unit)

Race technology has also developed a serial interface for a bunch of stand alone ECUs. http://www.race-technology.com/ecu_inte ... _7550.html

These guys are also developing a Kpro transmitter and if you look on the 3rd page of the thread I think they plan on using the USB port of the Kpro ecu http://www.s2ki.com/s2000/topic/1065638 ... ems-k-pro/

So hopefully it's possible.

If the Race Capture Pro can get data from a Kpro this is perfect for me.

Keep up the good work guys!!

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Thank you! Is the hondata protocol well documented? If you have any links / info we'd love to see it.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

crxkswap
Posts: 1
Joined: Fri Jul 03, 2015 9:30 pm

Post by crxkswap »

The Kpro4 supports CAN and the protocol is well documented on the hondata website and kpro help file. Below is a script that implements logging of most of the KPro CAN output. I left a few out that i don't need, but it is trivial to add to the script. You can upgrade your older Kpro to the new Kpro4 for $250, well worth it. This works like a champ!

Code: Select all

--This example configured for E46 CAN, adopted to Hondata KPro4 CAN output

--how frequently we poll for CAN messages, 30Hz is the max
tickRate = 30
--the CAN baud rate
CAN_baud = 250000
--CAN channel to listen on. 0=first CAN channel, 1=second
CAN_chan = 0
--1 for Big Endian &#40;MSB&#41; mode; 0 for Little Endian mode &#40;LSB&#41;
be_mode = 1

--add your virtual channels here
rpmId = addChannel&#40;"RPM", 10, 0, 0, 9000, "RPM"&#41;
vltId = addChannel&#40;"VLT", 10, 1, 0, 20, "volts"&#41;
iatId = addChannel&#40;"IAT", 1, 0, 0, 100, "C"&#41;
ectId = addChannel&#40;"ECT", 1, 0, 0, 150, "C"&#41;
tpsId = addChannel&#40;"TPS", 10, 0, 0, 100, "%"&#41;
mapId = addChannel&#40;"MAP", 10, 1, 0, 15, "PSI"&#41;
injId = addChannel&#40;"INJ", 10, 3, 0, 100, "ms"&#41;
ignId = addChannel&#40;"IGN", 10, 0, -20, 20, "D"&#41;
lmdId = addChannel&#40;"LMD", 10, 3, 0, 2, "lambda"&#41;
knkId = addChannel&#40;"KNK", 1, 0, 0, 15, "count"&#41;
camId = addChannel&#40;"CAM", 10, 0, -20, 20, "D"&#41;

--customize here for CAN channel mapping
--offset/length in bytes?
--format is&#58; &#91;CAN Id&#93; = function&#40;data&#41; map_chan&#40;<channel id>, data, <CAN offset>, <CAN length>, <multiplier>, <adder>&#41;
CAN_map = &#123;
--did not bother logging gear speed and target cam angle
&#91;1632&#93; = function&#40;data&#41; map_chan&#40;rpmId, data, 0, 2, 1, 0&#41; map_chan&#40;vltId, data, 5, 1, 0.1, 0&#41; end,
&#91;1633&#93; = function&#40;data&#41; map_chan&#40;iatId, data, 0, 2, 1, 0&#41; map_chan&#40;ectId, data, 2, 2, 1, 0&#41; end,
&#91;1634&#93; = function&#40;data&#41; map_chan&#40;tpsId, data, 0, 2, 1, 0&#41; map_chan&#40;mapId, data, 2, 2, 0.0145037738, 0&#41; end,
&#91;1635&#93; = function&#40;data&#41; map_chan&#40;injId, data, 0, 2, 0.001, 0&#41; map_chan&#40;ignId, data, 2, 2, 1, 0&#41; end,
&#91;1636&#93; = function&#40;data&#41; map_chan&#40;lmdId, data, 0, 2, 0.00003051757, 0&#41; end,
&#91;1637&#93; = function&#40;data&#41; map_chan&#40;knkId, data, 0, 2, 1, 0&#41; end,
&#91;1638&#93; = function&#40;data&#41; map_chan&#40;camId, data, 2, 2, 1, 0&#41; end
&#125;

function onTick&#40;&#41;
    processCAN&#40;CAN_chan&#41;
end

--===========do not edit below===========
function processCAN&#40;chan&#41;
    repeat
        local id, e, data = rxCAN&#40;chan&#41;
        if id ~= nil then
            local map = CAN_map&#91;id&#93;
            if map ~= nil then
                map&#40;data&#41;         
            end
        end
    until id == nil
end

--Map CAN channel, little endian format
function map_chan_le&#40;cid, data, offset, len, mult, add&#41;
    offset = offset + 1
    local value = 0
    local shift = 1
    while len > 0 do
        value = value + &#40;data&#91;offset&#93; * shift&#41;
        shift = shift * 256
        offset = offset + 1
        len = len - 1
    end
    setChannel&#40;cid, &#40;value * mult&#41; + add&#41;
end

--Map CAN channel, big endian format
function map_chan_be&#40;cid, data, offset, len, mult, add&#41;
    offset = offset + 1
    local value = 0
    while len > 0 do
        value = &#40;value * 256&#41; + data&#91;offset&#93;
        offset = offset + 1
        len = len - 1
    end
    setChannel&#40;cid, &#40;value * mult&#41; + add&#41;
end

map_chan = &#40;be_mode == 1&#41; and map_chan_be or map_chan_le
initCAN&#40;CAN_chan, CAN_baud&#41;
setTickRate&#40;tickRate&#41;
[/code]

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Wow, this is fantastic! So many people have been waiting for Hondata support; we'll get this in our wiki ASAP!

thank you for your help bringing this to life.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Thanks again!

Added to the wiki here: http://autosportlabs.net/Hondata_KPro4
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

PopKorn78
Posts: 62
Joined: Mon Mar 16, 2015 2:07 am

Post by PopKorn78 »

Hi guys, I'm building a new car with a older kpro. Can RCP work with the usb connection of the KPro? If not, if I upgrade to KPro4, will the bluetooth will work with the KPro and the tablet at the same time?

Thanks

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi - Sorry, your KPro won't won't work with the USB connction.

But, with some Lua scripting you can connect an RS232 serial device to the aux serial port of the MK2 (next to the bluetooth port) you would have to translate the KPro data format, extract data and map them to virtual channels like one would typically do with the CAN bus mapping.

This would be a project, but definitely doable. See the lua scripting examples in our wiki to see how that might work.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

stieg
Posts: 100
Joined: Fri Dec 20, 2013 1:37 am
Location: Madison, WI
Contact:

Post by stieg »

Can RCP work with the usb connection of the KPro?
Unfortunately no. RCP's USB is a client device, meaning it must be connected to an active host controller (like your computer) to work.
if I upgrade to KPro4, will the bluetooth will work with the KPro and the tablet at the same time
Also no I'm afraid. Our Bluetooth device is only capable of connecting to one device at a time, and our firmware expects it to be a device running RaceCapture app to work properly.
Andrew Stiegmann (Stieg)
Principal Engineer
Autosport Labs Inc.

PopKorn78
Posts: 62
Joined: Mon Mar 16, 2015 2:07 am

Post by PopKorn78 »

Restart old thread here. I just finished building a new car and it runs with a kpro v2. Can I get the data from the kpro to the rcp?

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »


Post Reply