BMW M3 Forum
BMW M3 Forum BMW M3 Gallery BMW M3 Reviews BMW M3 Social Groups BMW M3 Chat M3Forum Sponsors >>
Loading


Mobile M3forum
Go Back   BMW M3 Forum.com (E30 M3 | E36 M3 | E46 M3 | E92 M3 | F80/X) > BMW M3 Discussions > E46 M3 (2001-2006) > Coding and Tuning
Tire Rack Buy Winter Tires Now!
Not a member? Register Now!
Register Gallery All Albums Garage Search Today's Posts Mark Forums Read Calendar FAQ

Coding and Tuning Discuss all avenues of coding and tuning here!


Reply
 
Thread Tools Display Modes
Old Sat, Mar-31-2018, 07:11:30 PM   #91
e36 323ti
Registered User
 
e36 323ti's Avatar
 
Join Date: Sep 2011
Posts: 254
In the garage:
Reputation: 0 e36 323ti is on a distinguished road

Norway




Default Re: Visualization of CAN data related to the e46 M3

Optimized KBUS communication for the airVentDisplay:

While the airVentDisplay HMI get all its data from the CAN bus, some of the displayed data is taken from the KBUS and streamed to the CAN bus by the KBUS2CAN hardware. With its communication speed limited to 9600 baud, the KBUS is not well suited for high data streaming rates.

The low bus speed is not the only constraint. The KBUS limits also how quick one can switch from one device to another, as well as the minimum time between each request to the same device. Further, the real life shows that there is a response time attached to a request. E.g. the response time (the time from the request is transmitted until the device starts to respond) for an MSS54 request is typically ~100ms, while it for the MK60 is ~25ms. Taking into account the time to transmit the request, the response time, the time to receive the data and finally the time before a new request can be transmitted, adds up to relatively high numbers. Requesting the IAT, EGT etc from the MSS54 takes ~150ms, and worse, requesting the Lambda Integrators takes ~260ms doing it the standard way. Requesting data from the MK60 takes ~130ms and from the LCM ~190ms. Put into perspective, the MK60 transmits its data onto the CAN bus each 7ms...

Based on these facts, effort have been made to make an adaptiv algorithm for how to extract data from the KBUS in order to get a as high data throughput as possible. E.g. when braking, the bandwith of the KBUS is prioritized to the MK60 (needed when not reading the brake pressures directly from the pressure sensors), and the extract of temperature data from the MSS54 and the data from the LCM is relaxed a bit. Further, the Lambda Integrators are read directly from its RAM addresses, reducing the request time from ~260ms to ~120ms.

Communicating over the KBUS does also have some other challenges in that there are no access control. The MK60 follows the KWP2000 protocol and have well defined to/from identifiers, but the MSS54 and the LCM does not. Hence, to automatically detect if an external tester is attached to the OBDII port is almost impossible. Due to that fact, a function to manually stop the KBUS communication is added. A custom CAN message is sent from the HMI controller to the KBUS2CAN hardware to signal start/stop KBUS communication...



Jump to top e36 323ti is offline   Reply With Quote
Sponsored Links
Register now and remove these ads
Old Fri, Apr-13-2018, 08:04:59 PM   #92
e36 323ti
Registered User
 
e36 323ti's Avatar
 
Join Date: Sep 2011
Posts: 254
In the garage:
Reputation: 0 e36 323ti is on a distinguished road

Norway




Default Re: Visualization of CAN data related to the e46 M3

Track day telemetry: Have started to look at how to stream the CAN data to the cloud.

Fed some of my logged data to the CAN bus on my bench to simulate the real CAN stuff, and wrote some SW for cloud streaming.

Seems to be quite easy to establish something... :-)




Last edited by e36 323ti; Fri, Apr-13-2018 at 08:42:25 PM.
Jump to top e36 323ti is offline   Reply With Quote
Old Fri, Apr-20-2018, 05:28:52 PM   #93
e36 323ti
Registered User
 
e36 323ti's Avatar
 
Join Date: Sep 2011
Posts: 254
In the garage:
Reputation: 0 e36 323ti is on a distinguished road

Norway




Default Re: Visualization of CAN data related to the e46 M3

Quite easy to stream the CAN data to the cloud. Not that easy to make a good and informative visualization of them...


Last edited by e36 323ti; Fri, Apr-20-2018 at 06:11:37 PM.
Jump to top e36 323ti is offline   Reply With Quote
Old Thu, May-17-2018, 04:25:45 PM   #94
e36 323ti
Registered User
 
e36 323ti's Avatar
 
Join Date: Sep 2011
Posts: 254
In the garage:
Reputation: 0 e36 323ti is on a distinguished road

Norway




Default Re: Visualization of CAN data related to the e46 M3

After testing different providers offering solutions for receiving my CAN data, I realized I had to make my own solution.

The solutions out there showed to be either too slow or too expensive (or both). In order to keep the costs at a minimum as well as to test a powerful solution, I decided to establish a web and database server to stream the CAN data to. In the car, a RaspberryPi 3 is attached to the CAN network and streams the data via 4G to the database server. A multi threaded C++ program is made for the RPi, which collect the CAN data at 100ms intervals as well as the GPS coordinates and streams the buffered data to the database server at 2s intervals. By this, the data (with 100ms resolution) is easily available. By also establishing a web server, the data is available by any web browser in near real time as well as available for analysis after each trackday heat. I'm now in the posistion to tailormade the storage of the data as well as make the web interface at my like. For the time being I'm in the middle of a POC, testing the product line from Highcharts. Looks promising so far...


Last edited by e36 323ti; Thu, May-17-2018 at 04:36:04 PM.
Jump to top e36 323ti is offline   Reply With Quote
Old Sat, May-19-2018, 04:09:51 PM   #95
e36 323ti
Registered User
 
e36 323ti's Avatar
 
Join Date: Sep 2011
Posts: 254
In the garage:
Reputation: 0 e36 323ti is on a distinguished road

Norway




Default Re: Visualization of CAN data related to the e46 M3

airVent Display: Got some help from a good and very skilled colleague to make the bezel perfect. I'm very pleased with the result...





Jump to top e36 323ti is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT. The time now is 09:47:08 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
M3Forum.com and M3forum.net is in no way sponsored, endorsed or affiliated by or with BMW NA / BMW AG or any of it's subsidiaries or vendors.
BMW and M3 (E90 M3 | E92 M3 | E93 M3 | E46 M3 | E36 M3 | E30 M3) are registered trademarks of BMW AG.
M3Forum Terms of Service
Copyright 1999-2017 M3Forum.com
Discussing Visualization of CAN data related to the e46 M3 in the Coding and Tuning Forum - Discuss all avenues of coding and tuning here! at BMW M3 Forum.com (E30 M3 | E36 M3 | E46 M3 | E92 M3 | F80/X)