Suzuki SDS and Kawasaki KDS bus (was: Newbie question regarding bike OBD)

edited February 27 in General
Just purchased race Chrono and am reading post saying about syncing with the OBD.
I know what an OBD is but can anyone tell me how I can connect one to my GSXR 1000 k5 and sync it to race chrono? Do I need to buy a bluetooth OBD module and connect it to the bikes ECU? Then sync it to my phone.

Comments

  • aolaol
    edited March 2019
    This is a question that cannot be answered completely without knowing the bike. OBD-II is required by law on cars, but not on bikes. This means there's no guarantee a bike will support OBD-II. Some do some don not. Best way to find out is to ask from brand specific bike forums.

    But for example, on my 2018 KTM 790, which supports OBD-II as standard, it works like this. Connect an OBD-II adapter cable to the 6-pin KTM diagnostic port. And then connect a OBD-II reader to end of that cable. Then you can just add the OBD-II reader in RaceChrono settings, and use as you'd use it with a car. There's a list of recommended readers in the Support > FAQ on this web site.
  • This can be answered completely ;)
    No, the bike does not support OBD II. OBD was just a standard for trucks in 1996, then cars ~2005 and introduced for bikes not before 2018.

    But yes, you can build a custom device with an Arduino (or similar) and translate the values into OBD compatible values. Or use the upcoming feature to use custom PID´s in RaceChrono.
    I did that for my Kawasaki and enhanced it to Suzuki (but not yet published, due to some reliability issues)
    https://github.com/HerrRiebmann/KDS2Bluetooth
    as you can see here

    And there are several other solutions, which are made open source!
  • Thanks guys.
    I`ve done a search and found this.

    https://www.amazon.co.uk/HanrainTool-Motorcycle-Adapter-motorbike-6-Pin/dp/B079CHRKKH/ref=asc_df_B079CHRKKH/?tag=googshopuk-21&linkCode=df0&hvadid=309775958298&hvpos=1o3&hvnetw=g&hvrand=278029392888143178&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=1007092&hvtargid=pla-454577022636&psc=1

    I`ll check out the recommended CAN bus readers in the forum.

    I take it once it`s mated to the app, you can download the revs to the app and then sync it with a vid.

    That vid above is good! How did you get your BPM reading?
  • This cable is for OBD II. As I wrote: Your Bike has no OBD II, neither it has CAN Bus.
    You bike uses K-Line communication KWP2000 (ISO-14230).

    It could be possible to connect an ELM327 device (for which this cable was designed) with that cable to you bike. But you need a custom initialization process.
    And you need a custom PID. One!
    Because the bike gives you all information in a single response. I don´t expect @aol to design the custom PID functionality in this way.

    You will not get around a custom solution with a microcontroller...
    Please find anything needed here:
    https://forum.arduino.cc/index.php?topic=236092.0

    PS: I recorded the video with a Garmin Virb XE camera. It is compatible with a HRM-strap.
  • @TriB that's interesting information! I could support multiple data channels per PID. Do you have more info? I'd be interested seeing whole terminal session, starting from initialisation to requesting the PID couple of times. You can also email that info to tracks(at)racechrono.com
  • After some further research (together with aol), we got some new findings.

    The adapter cable from the link above won´t work! It´s connectors are wrong and maybe the plug also won´t fit. SDS has (with the clip on the top, bikes perspective):
    __--__
    | + 0 0 |
    | 0 K - |
    ----------

    It is possible to reconfigure the ELM327, to "speak" SDS. This means, the communication would be possible. But that does not mean, the values can be understood by any application (They must be converted: separated & recalculated).
    aol is working on that and he´s aware about how it must be done, theoretically.

    I just messed around with some cables, plugs and adapters. More or less connected a cheap ELM327 china clone to the bike with three cable lugs.
    It doesn´t work! The ELM got power and responded to some commands. But the reconfiguration didn´t work. Most AT-commands were answered with a "?" command unknown. I guess it is due to the clone version of the adapter...

    So I cannot create test data, aol could work with. An original ELM327 might work, I don´t know. What I´ll do is to create some data with my very own adapter, so at least aol can check the new custom PID functionality.
  • @TriB, thank you for testing! Let's continue our email exchange, maybe we can figure something out eventually.
  • @TriB is KDS/SDS still limited to 10 or less updates per second? When I looked into this it seemed to be the update rate was not very fast.

    Jeff
  • Hi Jeff, yes it is. You can ignore more or less the timing on your side, the ECU will just answer delayed. So every ~120 - 140ms you can receive a dataset.

    But as you will receive all values at once, you can temporary store them and speed the communication up a lot.
    If RaceChrono questions for RPM, Temperature, Speed and TPS, you can theoretically get 4 values per 140ms, which leads you to an impressive update rate.
    This only works for SDS. On KDS you only get a single value per request and cannot optimize this.
  • Hi TriB,

    Any progress on this topic? I have a OBDLINK LX and the racechrono beta version on my Suzuki gsxr750 k5, so I could test some things. Basically I am at the same level of being able to send some commands, but not getting any data. Just need to know what commands to give to racechrono. Maybe you can help out?
  • Hello @Pilz
    aol already introduced this feature in the latest beta. As I understand, it is not completely capable of processing/converting all data at once, but this will be available, soon.

    Until then, you can test it yourself with a Notebook or Smartphone (App: Serial Bluetooth Terminal).
    You have to reconfigure the initialization process, keepalive-message and the format. Then you can test receiving the dataset.
    Here is an explanation, how to do this:
    https://ecuhacking.activeboard.com/t22573776/sds-protocol/?page=5#comment-49610241

    These commands also can be added to the custom init process in RaceChrono.
    Good luck :)
  • aolaol
    edited June 2019
    @TriB I think you're referring to our pre-beta discussions. I did change the data handling before the release. Now RaceChrono should be able handle these long responses. So you can do equations with bytesToUint etc. functions over all the response bytes.

    I haven't tested any of this, but in theory you should be able to set the correct initialisation string, and then just create channels with that one PID 2108 and appropriate equations.
  • @TriB @aol thanks for the replies and tips. I tried some other things, but I still don't get any data. By using a bluetooth terminal i was able to discover that my bike ECU did not respond to the ATFI command nor the 2108 command which should give the data. For ATFI it gives ? And for 2108 it says unable to connect. So I first need to solve this I guess before trying things in Racechrono. I will try ATSI and perhaps some other codes I found online. I am also planning to use a sniffer program on my laptop to see what initialisation command the SDS monitor program sends to the ELM327/ECU. If anyone has some other suggestions, please let me know. Will continue with it next week. I'm still convinced it can be done, just need to figure out all the required codes and commands step by step :)


  • aolaol
    edited June 2019
    Just guessing here, try
    > ATWM8012F1013E
    > ATSH8112F1
    > 2108
    > ATSH8012F1
    > 2108

    It should initialise the bus on the first PID request. Also consider that the wires might not be correctly connected, as it says "Unable to connect".
  • edited July 2019

    In the past weeks I made a little bit progress. I managed to read data with the terminal, but have not yet succeeded to read the data in racechrono. It turned out i had to manually set the protocol to 5, see pictures below, and the I can read data.


    The top right datapoint is for throttle position, it shows different numbers for closed and fully open. So I still think it can work and that it now is just a matter of putting the right codes on the right place in racechrono.


    Unfortunately, I will not be able to do any further research as I totalled my bike a few weeks ago and and lost my odblink during the crash. Maybe in the future I will try to get it to work on my streetbike (R1 '07) with the carista that i still have.

    @aol thanks for the support and all the good work!


  • Oh, what a mess that you totaled your ride :(
    Hope you are fine!
    Thanks that you shared your findings, anyway!
  • aolaol
    edited July 2019
    @Pilz Sorry to hear about the crash!

    Looks like you managed to access the data successfully.

    Way to add it to RaceChrono would be to create a vehicle profile with special init string and custom channels.

    OBD-II init string: ATWM8012F1013E\nATSH8112F1\ATFI\nATSH8012F1
    OBD-II protocol: 5

    And then add all channels with PID 0x2108 and equations to parse the channels from the byte array. The Suzuki's SDS protocol has been reverse engineered (Google gives many sources), so I'm thinking at least some data should be easily extracted.
  • Hello!

    I'm been reading around and managed to get the same results as Pilz. So I'm now at the point that I need to finish mapping out which bytes represent Speed, RPM, Coolant Temp and Gear. For this, it shouldn't be too hard to do some investigations to locate each of these. The formulas I'm finding on the internet all vary so that will probably require some trial and error, however, what I am hoping to determine from here is how to I enter this in Racechrono to obtain the speed as I'm riding around the track.

    Obviously (as stated above) I need to enter the Init String:

    ATWM8012F1013E\nATSH8112F1\nATFI\nATSH8012F1

    I propose to enter it as such (for protocol 5)

    ATSP5\nATWM8012F1013E\nATSH8112F1\nATFI\nATSH8012F1

    following this, I need to enter 2108.

    For the purpose of discussion. Let's say it returns the following:

    61 08 01 17 69 A2 00 96 00 FF FF FF 00 00 00 39
    BA 36 38 BB 00 FF 00 FF 7C 35 FF 00 00 00 00 00
    00 00 00 FF FF 40 40 40 40 FF FF 00 74 15 30 04
    05 28 FF FF

    With that result. Let’s say that the 8th digit (96) is HEX for speed and the formula for speed is 2x Value (in kph). This means that the speed of the bike is 300 km/h at that point in time. (HEX 96 = 150 decimal)

    How do I program 2108 in racechrono after the init. String and have it pull out the value and perform the calculation and loop to continue doing it as fast as possible to provide the data to Racechono?

    Any assistance is appreciated!

    Thanks,

    Michael



  • Hello again.

    So I’ve done some more digging on this site and found the “equations reference”. (Thanks aol!)

    Anyways. Based on what I see there. This is what I imagine the bytesToUInt formula would be for my case.

    2013 Suzuki GSXR-1000 Speed
    SDS PID: 2108
    Source data: 0x61 08 01 17 69 A2 00 96 00 FF FF FF 00 00 00 39 BA 36 38 BB 00 FF 00 FF 7C 35 FF 00 00 00 00 00 00 00 00 FF FF 40 40 40 40 FF FF 00 74 15 30 04 05 28 FF FF
    Equation: bytesToUInt(raw, 7, 1)*2 = 0x96 * 2 = 150 * 2 = 300 km/h

    I am hoping for someone to confirm this.

    I based my above example off of the equation sheet and here is my interpretation:
    bytesToUint(source, byteOffset, byteLength)
    Returns unsigned integer value, extracted from the source value. Byte offset 0 is the byte with highest significance (big-endian).
    raw = 0x0011223344556677
    bytesToUint(raw, 3, 2) = 0x3344 = 13124

    2 = how many bytes to take after offset (Bytes are 2 characters long)
    3 = offset. 00 = 0, 11 = 1, 22 = 2, 33 = 3, therefore starts extraction of 2 bytes at the 33 and result is “3344”

    As for the bitsToUint. I’m having trouble understanding how the “24” gets 3344. Can someone explain this further? I assume that I only really need the bytesToUint for my purposes, however, I’m curious.

    bitsToUint(source, bitOffset, bitLength)
    Returns unsigned integer value, extracted from the source value. Bit offset 0 is the bit with highest significance (big-endian).
    raw = 0x0011223344556677
    bitsToUint(raw, 24, 16) = 0x3344 = 13124

    (16 = length of number array which doesn’t include zeros)
    (24 = ????)

    Thank you!
  • aolaol
    edited February 21
    - The 0x2018 goes to the PID. Notice it's 0x2018, hexadecimal, not 2018, a decimal value. The values you enter in ELM327 are in hexadecimal, so if you use the same value as a PID, you need to use 0x prefix to tell it's hexdecimal.

    - "Equation: bytesToUInt(raw, 7, 1)*2 = 0x96 * 2 = 150 * 2 = 300 km/h" this is a correct equation to get the 7th byte from the source data (and multiply it with 2).

    - Seems like you understand how bytesToUint works. In order to understand bitsToUint you need to understand how every byte is formed by 8 bits. I guess it's not common knowledge outside of programmers. It's basically finer granularity of same data. Basically bytesToUint(raw, a, b) === bitsToUint(raw, a * 8, b * 8). Basically you'd use bitsToUint instead of bytesToUint, if a piece of data you want to extract, consists of partial bytes.
  • https://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html

    raw = 0x0011223344556677
    bitsToUint(raw, 24, 16) = 0x3344 = 13124

    So
    0x0011223344556677
    is
    0000 0000 0001 0001 0010 0010 0011 0011 0100 0100 0101 0101 0110 0110 0111 0111
    in binary. Notice how I grouped the bits in groups of four. Each four bytes represent a half byte, or a single hexadecimal digit.

    So quite simply:
    bitsToUint(raw, 24, 16) = 0011 0011 0100 0100 = 0x3344 = 13124

  • Perfect!!! Thanks so much aol. I didn't think to convert to binary... definitely not a programmer though I took a class once ...so I'm basically an expert hahahah. Anyways I'll be decoding my bike a bit in the coming weeks to determine which byte represents speed, rpm, gear, temp and whatever else I can find quickly and then start entering the custom formulas as best I can before I'm sure posting again for more assistance. Keep up the great work!

  • @Michael86 @Pilz What kind of cable does one need for this, and where do I connect? I'm tempted to try this one one side project I have.
  • edited February 29
    Hey aol,

    For a suzuki (at least my MY and most that I've heard) you need to make an SDS to OBD cable. An image of that is on this forum page (Post 188):

    https://forum.arduino.cc/index.php?topic=236092.180

    Or here:

    http://kaele.com/~kashima/car/busa/cable-s.jpg

    The diagram is:
    http://kaele.com/~kashima/car/busa/SDS2OBD.pdf

    WARNING:
    That diagram INCORRECTLY lists:

    SDS MALE SUMITOMO SEALED MT 090 6P #6189-6171 (Male connector)

    The actual Suzuki connector to buy is:

    SDS MALE SUMITOMO SEALED MT 090 6P #6187-6561 (Male connector)

    This is true for at least my bike.

    Anyways, I ended up grabbing a car OBD connector from a junkyard (you can just buy the part) and making a wire harness so my OBD is up near my steering column in a 3-d printed part. And I purchased the SDS from AliExpress. The cable runs to the SDS connector which is under the seat near the battery. If you look under your seat it should have a plug covering it. Mine was white with some grey foam around it.

    I'd send pics but this message body doesn't seem to allow me to attach?

  • aolaol
    edited February 29
    @Michael86

    Thank you! I already got 6-pin Sumimoto connectors that I bought for data logging CAN-Bus on my KTM 790, but I think they are "the wrong ones". I'll order Suzuki ones just to be sure.

    Posting photos: You could post to somewhere and then share the image here. Or if it's just for me then email me tracks(at)racechrono.com
  • aolaol
    edited February 29
    @Michael86 Can you post (or email) a photo of the connector location on the bike, please?
  • edited February 29
    Took some images. That's the battery tray and the fuse box behind it. so the plug is on the wiring harness on the right hand side. As mentioned before, mine had a cap on it. It had some foam around it and was wedged in there.

    Overview: https://imgur.com/azxAllS

    connector: https://imgur.com/IWxu4Ds

    What kind of bike do you have?
  • aolaol
    edited February 29
    @Michael86 Thank you! I have a 2018 KTM 790 Duke, which I've already mastered, but now I'm trying to get data out of a new R1000R (not mine).
Sign In or Register to comment.