Jump to content

CAN data to external data logger, via OBD2 BT adapter


Justin01

Recommended Posts

Hello. I am trying to get data from my LinkECU into a RaceChrono data logger app, using an OBDLink MX BT adapter (connected via OBD2 obviously).

Short version: I need to find out what the PID's and equations are for the various sensors and things, in my LinkECU, so I can configure the RaceChrono app with them.

Longer version: I have wired an OBD2 adapter to my CAN1 port on the LinkECU and configured it in PCLink, all per the "ECU to OBD-II Port Wiring" and "OBD" help guides. The configuration seemed to be successful. The OBDLink powers up just fine and connects to my RaceChrono app via bluetooth.

I am stuck on the part where I need to configure the CAN streams/data that get sent to the OBDLink MX adapter, so I can then configure the RaceChrono app with the proper PID's and equations to convert the data stream to usable data in the logger (I'm assuming I need to configure the CAN streams/setup in PCLink?)

Is there any help documentation on that part? I read about the CAN test calculator, but it is a bit over my head at the moment, I'm not completely sure where to start.

The data I want to get from LinkECU to my RaceChrono app is:

  • Throttle position
  • Engine speed/RPM
  • Oil temp - configured on AN TEMP3
  • Oil pressure - configured on AN VOLT4
  • Fuel pressure - configured on AN VOLT5
  • A/F ratio - I have AEM CAN Lambda
  • I would like the below data as well, but I don't think my BMW has it built-in (I can't find it in a normal log)
    • Brake pressure
    • Steering angle

Pictures of what RaceChrono configuration looks like are below. I have this all setup for my other car (a 2022 Toyota GR86) but the CAN values were provided by people that already discovered what the OEM CAN parameters were in the ECU, I just input them into the app. Map file attached as well.

Fixed images...

20230719-Metz-e36.pclx

Screenshot_20230719-213949_RaceChrono Pro.jpg

Screenshot_20230719-213957_RaceChrono Pro.jpg

Edited by Justin01
fixed racechrono can channel setup images
Link to comment
Share on other sites

You are pretty much limited to the standard OBD2 PIDs and you cannot customize & add to it.
The following are not included (and thus cannot be viewed via OBD2):
Oil pressure
Brake pressure
Steering angle

Those data can be sent via custom CAN streams, but the receiving device should be CAN - not CAN to OBD2.

Link to comment
Share on other sites

2 hours ago, essb00 said:

You are pretty much limited to the standard OBD2 PIDs and you cannot customize & add to it.
The following are not included (and thus cannot be viewed via OBD2):
Oil pressure
Brake pressure
Steering angle

Those data can be sent via custom CAN streams, but the receiving device should be CAN - not CAN to OBD2.

Hmm, interesting. The receiving device (RaceChrono) is CAN (see images above), it is just using the OBD2 adapter to connect via bluetooth to the app. Sorry if my post was confusing in that regard.

I have all 3 of those things (oil/brake pressure, steering, etc) working with my GR86, which uses the same OBDLink MX adapter, connected to RaceChrono via bluetooth. The PID's and equations I use for that are here : GJP IO Box setting for RaceChrono - Google Docs

Just trying to figure out how to replicate that with Link.

Link to comment
Share on other sites

I think this is using raw CAN, not OBD2 PID's so PID is really the wrong term that is confusing the question.  Message ID or CAN ID would be more appropriate.  Maybe their app was originally only designed for OBD2 commands.  

What ecu CAN port is the RC device wired to?

Link to comment
Share on other sites

1 hour ago, Adamw said:

I think this is using raw CAN, not OBD2 PID's so PID is really the wrong term that is confusing the question.  Message ID or CAN ID would be more appropriate.  Maybe their app was originally only designed for OBD2 commands.  

What ecu CAN port is the RC device wired to?

You might be right on the raw CAN, sorry for confusing the terminology.

The OBDLink MX adapter is wired into the CAN1 port on my LinkECU.

Below is RaceChrono help documentation on setting it up CAN bus logging, maybe this will help. As mentioned, I use the OBDLink MX bluetooth reader. Task #1 below is what I am trying to find out. With my GR86, people already did the reverse engineering to find out the CAN details.

 

    • How do I log CAN-Bus?

    • Theres two ways. Either by building a DIY device or with an OBDLink LX/MX/MX+ Bluetooth OBD-II reader. Notice if you’re on iOS, you’ll need the MX+ Bluetooth model.

      1. Find out the packet IDs (PIDs) and packet structure of the CAN-Bus messages on your vehicle’s bus. This is different on each vehicle, and will vary even between different models of the same manufacturer. You can either reverse engineer your bus using some dedicated tools/apps or find them already reverse engineered by others. This is a mandatory step before moving forwards.
      2. Enable “RaceChrono > Settings > Expert settings > Experimental devices”
      3. Add a CAN-Bus recording device “RaceChrono > Settings > Add other device > OBDLink LX/MX/MX+ Bluetooth (CAN-Bus)”, and then select your OBDLink device. Notice this will NOT work on any other reader. Also it will NOT work if you add the OBDLink with “Add OBD-II reader”, you need to use the “Add other device” to add the reader specifically as a CAN-Bus device.
      4. You can now add CAN-Bus channels to the vehicle profile in “RaceChrono > Settings > Vehicle profile”.
      5. When editing channels, Channel and Channel postfix field defines how the channel shows up in your RaceChrono sessions.
      6. Source data field is data for testing your equations.
      7. PID field defines which CAN-Bus message has the information.
      8. The equation field defines where the channel data is located in the message, and how it is translated to actual channel values.The equations are explained here
  •  

Screenshot_20230720_181134.jpg

Link to comment
Share on other sites

Ok, attached is a copy of your map with CAN setup to hopefully duplicate the GJP IO device so you shouldnt need to mess with the existing Racechrono setup too much.  There are a few mistakes in that GJP documentation so let me know if something doesnt look right.  I didnt set up steering angle or brake press since you dont have these sensors.

In Racechrono you will just have to add the lambda channel since the GJP device didnt have lambda. 

Lambda channel details:

PID 1803

Equation: bytesToUint(raw, 3, 2) * 0.001

Metz-e36 GJP CAN.pclx

Link to comment
Share on other sites

1 hour ago, Adamw said:

Ok, attached is a copy of your map with CAN setup to hopefully duplicate the GJP IO device so you shouldnt need to mess with the existing Racechrono setup too much.  There are a few mistakes in that GJP documentation so let me know if something doesnt look right.  I didnt set up steering angle or brake press since you dont have these sensors.

In Racechrono you will just have to add the lambda channel since the GJP device didnt have lambda. 

Lambda channel details:

PID 1803

Equation: bytesToUint(raw, 3, 2) * 0.001

 

Thanks! Made some progress with that, but I cannot seem to get a steady flow of data from the ECU/OBD adapter. OBD BT adapter stays connected, but data is not updating live.

With the bit rate set to 500 kbit/s I could never see anything on the RaceChrono side. I dropped it down to 250 kbit/s and it worked momentarily, then stopped working again. See screenshot where I could see data coming from the sensors (I didn't have the car started when it worked, just key on). The oil and intake temps were accurate to what I saw in PCLink directly, but the fuel pressure should have shown around 42psi. A/F did not seem to register anything.

First, I need to find out why it is not maintaining a connection though...

 

 

Screenshot_20230720_224929_RaceChrono Pro.jpg

20230720_225359.jpg

Link to comment
Share on other sites

Dang, unfortunately that did not seem to work :( Same behavior, I can see data momentarily (sometimes) but no live data stream.

Just to double check, I put the OBDLink MX adapter back on my GR86 and it is working fine. I also updated the firmware on it, as it was way out of date, but still same behavior on my BMW LinkECU.

Could wiring be an issue? I have the OBD connector wired into the same switched 12v as my AEM wideband, both grounds are going to the engine ground on the front of the valve cover, CAN HI/LOW are wired per the Link documentation.

I've seen some other posts on the forums with similar weird connection issues to OBD devices, but nothing stands out as a resolution.

Screenshot_20230721_132414_RaceChrono Pro.jpg

Screenshot_20230721_133318_RaceChrono Pro.jpg

Link to comment
Share on other sites

3 hours ago, Adamw said:

Have you tried using the same settings/profile as the gt86 with the link?  Can you show us some pics of the wiring.  

Yea, I did try the GR86 profile as well, no data from that either.

The wiring is just mocked up right now, twisted together from the ECU CAN cable to the OBD adapter.

20230721_202759.jpg

20230721_202809.jpg

20230721_202857.jpg

Link to comment
Share on other sites

16 hours ago, Adamw said:

Are you sure it is wired to CAN1?  I notice you have the AEM device set up on both CAN1 and CAN2 in the ecu.

Port labeled CAN/RS232 --> OBDLink MX bluetooth adapter (one we're trying to setup)

Port labeled CAN2 OBD --> AEM CAN Lambda

Edit: I wonder if my tuner setup the AEM on both CAN ports for some reason...I don't remember doing that...

20230722_150428~3.jpg

20230722_150515~2.jpg

Link to comment
Share on other sites

Per a recommendation from the RaceChrono support forums, I ran a monitor on the OBD device to see what was being sent out. I'm not sure how helpful this is or if I had the right settings in the terminal app, but it looks very different from my BMW Link to my GR86.

 

 

Screenshot_20230722-161337~2.jpg

Screenshot_20230722-162000~2.jpg

Link to comment
Share on other sites

It still looks like a wiring issue to me.  Can you unplug the OBDlink from the OBD2 socket and measure the voltage between pin 5&6 and between pin 5&14 (with ECU on).  Then, with ecu off can you measure resistance between pin 6&14.  

Link to comment
Share on other sites

12 hours ago, Adamw said:

It still looks like a wiring issue to me.  Can you unplug the OBDlink from the OBD2 socket and measure the voltage between pin 5&6 and between pin 5&14 (with ECU on).  Then, with ecu off can you measure resistance between pin 6&14.  

Voltage for 5 & 6 = 3.39v

Voltage for 5 & 14 = 1.767v

Resistance 6 & 14 (hopefully I did this right?) = 122.9ohm

 

20230723_154016~2.jpg

20230723_154032~2.jpg

20230723_154405~2.jpg

Link to comment
Share on other sites

15 hours ago, Adamw said:

Can you load each of these 2 maps in and do a short PC log for each with just ignition on.  Also do the "ATMA" monitor all command with the OBD2 link when these are running.  

What parameters did you want to see? I'm not sure if my logging setup has what you want, but they are attached. Let me know if you want a redo. Terminal output of "ATMA" also attached, it looks like more data is coming across with these changes at least.

Screenshot_20230724-194618~2.jpg

Screenshot_20230724-194836~2.jpg

Test1-PC Datalog - 2023-07-24 7;45;33 pm.llgx Test2-PC Datalog - 2023-07-24 7;48;31 pm.llgx

Link to comment
Share on other sites

Ok, so test 1 shows the correct data there so your device should work with that file.  The only change I made in that file is I turned off the extra AEM lambda stream that you had set up on CAN 1.  The AEM stream uses extended ID's so I suspect that obdlink device may not be capable of working on a bus with both normal and extended ID's working at the same time.     

Link to comment
Share on other sites

On 7/25/2023 at 8:42 PM, Adamw said:

Ok, so test 1 shows the correct data there so your device should work with that file.  The only change I made in that file is I turned off the extra AEM lambda stream that you had set up on CAN 1.  The AEM stream uses extended ID's so I suspect that obdlink device may not be capable of working on a bus with both normal and extended ID's working at the same time.     

Ok, yea I noticed the CAN port changes. Thanks, I will try to test it out tomorrow and get back to you with the results. Might not be until Friday though, but excited to see if this gets things working.

Link to comment
Share on other sites

I got test with just the key on tonight and it seems to be connected, but not all the data is populating. I will test it with start up tomorrow to get a better idea.

Can you configure the CAN parameters to transmit the brake pressure? (or tell me how to do that) I forgot there is a brake position sensor up in the brake booster, I'm hoping the ECU actually see's that. Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

Well, I finally got to test it out while driving the car and I still am not getting anything on the RaceChrono side.

When I was troubleshooting my other car, we had similar issues and the guys said there was a bug with RaceChrono that did not send an "ack" message when it received a CAN message. Somehow this was overloading RaceChrono and they would then just stop responding. Not sure if that is the same thing going on there or not.

I'll take it up with RaceChrono support and see what they say.

Link to comment
Share on other sites

  • 3 weeks later...

So, after some back and forth with RaceChrono support, they are telling me that only 1802 is coming across from the LinkECU, not the other two ID's (1803 or 1837). Which, tracks with what I pasted above in the Test 1, only 1802 is there.

I still don't see any data in the app though, which it sounds like I should at least see 1802.

I'm not sure why ID's 1803 and 1837 are not being seen though?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...