TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker and becoming a Supporting Member. For more info: Support TMC

OVMS issue: obdii on can3 crashes VMS

Discussion in 'Roadster 2008-2012' started by Peter.h, Jul 31, 2020 at 2:51 PM.

  1. Peter.h

    Peter.h Electric Newbie

    Joined:
    Dec 16, 2017
    Messages:
    78
    Location:
    Rancho Palos Verdes, CA
    I finally got around this week to installing my OVMS v3.1 unit (Firmware 3.2.013) in my roadster (1.5)

    Everything is working fine - except activating OBD2 on can3 crashes the VMS. Numerous warnings pop up around lost signal for switchpack, VMS, BMB etc and door handles etc stop working.

    Running OBD2 ecu on can1 and can2 works fine. After looking through the developer doc, maybe one of the MCP2515 controllers is shot? As a work around, I am considering cutting open my obd2 cable to rewire the obd connector to can2 on the DIAG port -- other suggestions?

    Separately,
    Code:
    charge cooldown
    is not working, the error is
    Code:
    Error: Could not start cooldown
    . Any ideas what I am missing?

    Thank you!
     
  2. gregd

    gregd Active Member

    Joined:
    Dec 31, 2014
    Messages:
    2,412
    Location:
    CM98
    Um, how are you connecting the OVMS to the car? The obd2ecu task is designed to provide a basic OBDII bus on the OVMS's accessory port, normally on can3. So, OVMS connects with a short cable from its 9-pin port to the car's diagnostic port under the passenger side foot well. There's a separate short cable that goes from the OVMS 26 pin port to an OBDII connector, and your OBDII device attaches to there.

    Nothing should connect to the Roadster's OBDII port (driver's side foot well). There's nothing there that we can use.

    Also, what vehicle model do you have the OVMS configured for?
     
    • Helpful x 1
    • Informative x 1
  3. gregd

    gregd Active Member

    Joined:
    Dec 31, 2014
    Messages:
    2,412
    Location:
    CM98
    Further, you really shouldn't be aiming the OBDII task at CAN1, since CAN1 is where the car (VMS) is. That would be bad...

    The way the obd2ecu task works is that it waits for a poll for data on CAN3 (how the connectors are currently wired) and then replies with whatever information the HUD requests. Stuff like vehicle speed, temps, etc. It gets the data for the response from the current metrics that the module already maintains.
     
    • Informative x 1
  4. slcasner

    slcasner Active Member

    Joined:
    Feb 20, 2011
    Messages:
    1,019
    Location:
    Sunnyvale, CA
    The three conditions leading to that error message are: the battery is already cool enough, or the car is ON, or the chargeport is shut.
     
    • Informative x 1
  5. Peter.h

    Peter.h Electric Newbie

    Joined:
    Dec 16, 2017
    Messages:
    78
    Location:
    Rancho Palos Verdes, CA
    Yep - that's how I have it set up. The crash happens independent of what I have connected to the 26 pin port (nothing / short cable / short cable + accessory)

    Correct - I don't think I have ever even touched that one

    Tesla Roadster :)

    Ah - that's good to know. I wish they mentioned that in the docs ...

    I understand that -- however as soon as I issue the command to start obd2ecu on can3 the VMS goes down.

    I am thinking I have a hardware issue here ...
     
  6. Peter.h

    Peter.h Electric Newbie

    Joined:
    Dec 16, 2017
    Messages:
    78
    Location:
    Rancho Palos Verdes, CA
    Thank you - that explains it. In my case the car was on (as I sat in the driver's seat experimenting) and my battery might have been cool enough. I'll try it again after I have taken a drive.

    Appreciate the quick response!
     
  7. Peter.h

    Peter.h Electric Newbie

    Joined:
    Dec 16, 2017
    Messages:
    78
    Location:
    Rancho Palos Verdes, CA
    ... and a quick update re my obd2ecu issue: I managed to cut open and resolder my OVMS-to-OBD2 cable so that the can bus pins map to can2 on the DIAG port (instead of can3) and it's working beautifully now.
     
  8. gregd

    gregd Active Member

    Joined:
    Dec 31, 2014
    Messages:
    2,412
    Location:
    CM98
    Yay!

    But, wow, bad cable! I bet Mark might be interested...

    BTW, I've found that the 2515 chip can lock up and not see traffic from the OBDII device, depending on the timing of when the task is started, vs what the device is doing. I configured a short script to restart things in the proper order whenever the car is turned on:

    OVMS# vfs cat /store/events/vehicle.on/myevent
    power ext12v off
    obdii ecu stop
    obdii ecu start can3
    power ext12v on

    and the corresponding...

    OVMS# vfs cat /store/events/vehicle.off/myevent
    power ext12v off

     
    • Informative x 1
  9. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    4,505
    Location:
    Hong Kong
    I assume you are using the standard OVT1 cable ($14.50 OVMS Data Cable for Early Teslas - official OVMS parts / Tesla Roadster v1.x/v2.x/v3.x & early Model S compatible at FastTech - Free Shipping), but am confused by your mention of an OVMS-to-OBD2 cable (which OVMS offers, but is intended for other car types).

    The OVT1 cable is specific to Tesla Roadster (and other early Tesla cars before they changed the connector). It is connected as follows:

    Code:
    Pinout: OVT1
    173851-2     DB9 -F       Signal
    -------------      ---------       --------
    1                      7                CAN0-H
    2                      8                CAN2-H
    3                      1                K-Line
    4                      5                CAN1-H
    6                      2                CAN0-L
    7                      6                CAN2-L
    9                      3                GND
    10                    9                +12V
    11                    4                CAN1-L
    Cable: 30cm in length, 9 core
    DB9-F: Moulded
    173851-2: Heat-shrink tubing to protect end of cable
    Label: "OVT1" in black-on-white lettering, shrink to cable
    You can't just run OBDII on top of the existing car CAN buses, as the baud rate may be different (particularly the first CAN bus which runs at 1Mhz) and the arbitration IDs will probably conflict. The result would be broken CAN communications (usually between the VMS and other vehicle modules on that bus).

    If you want to use an external HUD (using the obd2ecu code in OVMS), you will need a free CAN port to run the OBDII bus on. But that OVT1 cable does not have any (all three CAN buses are connected to the car). Simplest is to unplug/cut the DIAG side pins #2 and #7, then use CAN3 in the firmware. You might be able to re-wire to connect CAN3 to the car's own OBDII port, but we haven't tried that. Much safer to keep it separate.

    Regards, Mark.
     
  10. Peter.h

    Peter.h Electric Newbie

    Joined:
    Dec 16, 2017
    Messages:
    78
    Location:
    Rancho Palos Verdes, CA
    Mark -

    Thank you for the detailed note. I'm afraid I wasn't clear in my original post and have caused some confusion.

    Ultimately what I am trying to do is use the built in gauges function of my aftermarket radio head unit to display vehicle information provided by OVMS - I'll write this up separately once it's all done.

    Therefore here's what I am doing:

    (1) Roadster Diagnostic Port (Passenger footwell)
    . |
    (2) Roadster to ovms cable (like the one you linked, but I have an older version, ca 2018, from my prior roadster)
    . |
    (3) OVMS v3.1 (it says so on the PCB)
    . |
    (4) cable from OVMS DIAG port to an OBD type plug
    . |
    (5) iDatalink Maestro RR module (exposes can bus and other vehicle features to the radio - in my case just the can bus)
    . |
    (6) Radio (Pioneer DMH-WT7600NEX)

    (1)-(3) work perfectly - OVMS is running, connected to WiFi and 3G, I can SSH in, see metrics, run commands, the mobile app works, etc

    However, once i try to start the obdii ECU task on can3, both ovms and the entire VMS are shutting down (no door handles, numerous error messages on VDS, etc). Once I disconnect the ovms from the car the VMS comes back online. This happens even if I haven't connected (4). I have done a hard reset (holding S2 for 10 seconds), and redone the set up, to no avail. I'm running the latest firmware. Hence I believe I have a hardware issue in my ovms.

    Now, as a work around, I have found that starting obdii on can2 works fine.

    Therefore I modified the cable (4) to expose can2 rather than can3 to the OBD2 plug

    With that I actually managed to successfully connect (4) through (6) and I can actually get vehicle data into my radio screen, including the customizable home screen.

    So the take-aways for me are
    - OVMS (and the developer doc) are terrific
    - I actually got this set up working the way it would
    - thank you all for helping me dig in deeper again!
     
    • Helpful x 1
    • Informative x 1
  11. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    4,505
    Location:
    Hong Kong
    Sounds like a really cool integration. Would love to see some screenshots of how it turns out (especially give the custom metrics capability of the ovms obd2ecu system).

    Here are the Tesla Roadster CAN bus details:
    • Instrumentation: OVMS CAN1 (on OVT1): 1MHz, on DIAG pins 6/1. Contains VDS, TPMS, Instrumentation Display.
    • Powertrain: OVMS CAN2 (on OVT1): 500Kbps, on DIAG pins 7/2. Contains PEM, Switchpack, etc.
    • ESS: OVMS CAN3 (on OVT1): 125Kbps, on DIAG pins 11/4. Contains ESS and HVAC.
    The problem you had is the cable you have between OVMS and the car wires all three CAN buses. Then when you start up the obd2ecu on CAN3 at 500kbps that conflicts with the vehicle's own ESS CAN bus at 125Kbps you are running this on top of. You mess up the vehicle comms between the VMS, HVAC, and ESS. It would make no difference if the HUD cable was plugged in, or not.

    Switching to CAN2 solved the problem because that is the powertrain CAN bus also at 500Kbps. However, this is still possibly dangerous, because the message IDs on the bus may conflict. But probably ok.

    Given the limitations, and work we are doing with OVMS, it is probably best to keep CAN1 and CAN3 for OVMS-car comms (as those are the two most useful CAN buses and I plan to release some functionality on CAN3 ESS bus to show battery brick voltages and temperatures). If you are concerned with possible ID conflict, you can disconnect CAN2 at the DIAG connector (pins #4 and #11) to make sure you don't conflict.

    Regards, Mark.
     
    • Informative x 1

Share This Page

  • About Us

    Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.
  • Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


    SUPPORT TMC