RaspberryPi based DYI feasability / brainstorming

Hello everyone, recently I started thinkering with a Raspberry Pi 3 and a PiCan2 board to reverse engineer some part of the CAN-Bus on my Mazda MX5, reading the broadcasted messages via the OBD port.

The original idea was to install RPI3 + a PICAN2 hat that includes a MCP2515 chipset for CAN, MTK33x9 chipset for 10 Hz GPS and MPU-6050 chipset gyroscope + accelerometer, maybe bolted in the cubby box below radio or in the tunnel, and log the following data:

GPS Position
Linear and angular acceleration
CAN: RPM
CAN: VEHICLE SPEED
CAN: ACCELERATOR POSITION
CAN: BRAKE PEDAL POSITION
CAN: CLUTCH SWITCH

Also recording a video using the Pi HQ camera module. All would be a sort of semi-permanent headless installation, the PiCAN2 as a SMPS that can power the RPI via the OBD 12V pin, I would then add a switch to cut the 12V to the board, and a couple of buttons to start/stop logging and video recording, and maybe a soft restart.

Then I discoverd that RaceChrono Pro can receive data from DIY device thanks to API using RC3/RC2 data format or the API for BLE.

Do you think it is feasable to send all those data to RaceChrono Pro via bluetooth on Android? Given the number of information i think the BLE is not a viable option, am I right?

This is the PiCan2 hat: https://buyzero.de/products/pican-with-gps-gyro-accelerometer-smps-can-bus-for-raspberry-pi-3

By the way: the real goal here is to have fun and learn something new :smile:

Comments

  • aolaol
    edited February 4
    The RC2/RC3 is an older API with hardcoded channel names and units. If you use the BLE "CAN-Bus" API you can define the channels. I may work on a new "RC4" protocol to address the channel configuration issue.

    It's true that the bandwidth _may_ be too restrictive on BLE to output high update rates, depending what your goals are.

    If you use the BLE API, your CAN-Bus channels could be encoded in 7 bytes, if that set is all you want. That would leave 9 bytes for the acceleration data, if you want to pack them in one single payload to maximize the update rate. The Bluetooth LE GPS protocol is defined in my GitHub.

    I don't have direct answers unfortunately...
  • Why do you need Raspberry Pi?
    Have you considered using an Arduino-compatible board instead?

    Here's an example https://github.com/timurrrr/RaceChronoDiyBleDevice
    As a teaser, I was planning to extend this project to support my gf's ND2 Miata :)
    But pull requests are very welcome if you beat me to it!

    For GPS, I just use an off-the-shelf device; IMO it's easier to just mount it on the dash and forget about the complexity of bundling everything into one device.
  • @aol @timurrrr thanks!

    Timurrrr: I think I really don't need the Raspberry, but I just have 3 or 4 laying around :D including a RPi Zero inside an Auto.pi dongle... I'm not really a skilled developer :smiley: but for sure I'll look into Arduino, as I said the real goal here is to learn something new

    For sure if you want I can contribute sharing a list of ID and equations for NC (not for ND2 sorry)
Sign In or Register to comment.