My first build: CAN-Bus and GPS through Bluetooth LE

124»

Comments

  • @jgunny for steering angle on F/G series...

    PID 0x301
    endian: little (intel)
    type: unsigned
    factor: 0.04395
    offset: -1440.11
    unit: degrees
    start byte: 2
    start bit: 0
    length (bits): 16 (2 bytes)
    range: -1440.11 to 1440.11
    rate: 5hz

    i will note that PID 0x302 has very similar (not exact) data and comes in at 25hz, but in my testing steering at 5hz is plenty for video syncing.

    that PID is coming directly from the appendices of the official m motorsports docs for m235iR :smile:



    Here are all the pids i have figured out for F/G series:
    https://docs.google.com/spreadsheets/d/1O491j8jlEOYR6voFPAYZ2NpbNyCKAgqbxt4HVw0bSDA/edit?usp=sharing
  • @aol_of_RaceChrono @dirtyfreebooter With this list of PIDs, can I use the OBD MX+ instead of building a device
  • @PDOT88 not exactly sure. The CAN-bus pins on the OBD-II are not true CAN-bus, they are filtered and still use a request/reply protocol, though you theoretically have access to more data than standard OBD-II with the CAN-bus pins on the OBD-II port. it would be much slower than tapping the CAN-bus wires. i was never able to figure out how to get any real data via OBD-II port via the CAN-bus pins, but once i discovered it was still request/reply protocol, i just didn't bother anymore with it.

    i would imagine its very similar to this product, since it uses the OBD-II but seems to offer more track data then standard OBD-II signals

    https://www.getbmwparts.com/oem-parts/bmw-m-performance-drive-analyser-ios-and-android-61432450841

    tho they dont ever publish the data rate information, etc, so my guess is it can't be great, given the limited speed of OBD-II port/protocol, and if it was, why wouldn't they advertise it.

    at the end of the day, the ESP32 solution is quite good, fast, reliable, but has a steep curve for anyone not really into computer programming and access to soldering tools. @aol_of_RaceChrono did an amazing enabling a DIY api for RaceChrono. this really is a game changer, there just really isn't a lot of room for anyone to productize the DIY devices: low volume, CAN-bus decoding car specific and difficult to figure out, etc.
  • @PDOT88 @dirtyfreebooter There's a similar challenge with 2022+ GR86/BRZ, and one interesting solution is to tap a second OBD-II port into the real CAN bus :smiley:
    That allows you to use OBDLink MX+ in "CAN bus" mode, unlocking fast data (... if you know the encoding).

    Example product: https://ansixauto.com/2022-brz-gt86-can-adapter/
  • @dirtyfreebooter was looking at your project and was wondering if you have ever seen the RejsaCAN board: https://github.com/MagnusThome/RejsaCAN-ESP32. Looks like your code could be adapted to his design which has some nifty auto off features (but lacks battery support).
  • @dustinsterk yea, i have seen that, the RejsaCAN. i dont really see why it wouldn't work. having tried a few different ESP32-S3 boards, seems like the only thing that ever needs changing in the code is which GPIO pins are mapped to the CAN RX/TX pins, otherwise things should just work, on an ESP32-S3 board.

    i do not know where any good 12v + ground wires are on my car where my powertrain CAN bus connection is (in BMW M3 G8x CAN bus connection is in the passenger footwell), so i just went the battery route. a simple 800mAh LiPo battery lasts literally days, so for my purpose, 6 hours at the track once every other month, i just found it easier then messing with the complex BMW wiring harness without any documentation as to what wire is what.

    i really like that the RejsaCAN has the CAN bus piece built in, but without a battery setup, its more hassle to me than the extra feather wing adapter :neutral:

    i am going to try and design and 3d print an enclosure for my setup, Adafruit ESP32-S3 feather + feather wing CAN bus transceiver + LiPo battery something this spring.
  • @dirtyfreebooter makes sense....that is where I am as well, do I want the battery option or go for 12v+ hardwired with the RejsaCAN. Both options are nice to have.

    Please do keep your progress updated related to updates and 3D printed enclosures. I will be following this closely for the spring track season! :smiley:
Sign In or Register to comment.