PC-based Electric Powertrain Report (Battery Capacity)

Discussion in 'Clarity' started by MrFixit, Oct 13, 2021.

To remove this ad click here.

  1. MrFixit

    MrFixit Well-Known Member

    This thread has become cluttered
    Click HERE for simplified How-To instructions
    A new tool is now available for HV Battery Capacity readout. This tool utilizes the ELM327 Vgate iCar Pro BT4.0 adapter which many members already have. It is a web browser-based tool that allows your PC or Laptop to read the Clarity datastream and it generates a nicely formatted report containing many details about the Electric Powerttain including Battery Capacity and statictical information about the 168 individial battery cells. The reports, and underlying data logs can be easily saved on your machine for later reference.

    Since the Forum format is not especially good for hosting a software development project, I have created a github repository for this. This has been tested on Linux and Windows running Chrome, Firefox, and Edge browsers. It does not currently work on a smart phone, but this may be possible with some additional work.

    Please give this a try if you are interested. This is coded in JavaScript and I would welcome participation from other programmers to enhance / improve it in any way

    Here is a link that people can use to produce a report:

    The instructions are here:
    https://github.com/clarity-phev/powertrain_report/blob/main/How to Use.pdf

    Here is the repository itself:

    I have attached a sample report so you can see what the output looks like.

    Don't forget that we have a great effort underway to collect Battery Capacity from lots of users and look for trends. If you would like to participate in this characterization process (or just observe it), here is a link to this spreadsheet:

    Attached Files:

    Madmartigen, Mark W, vicw and 3 others like this.
  2. To remove this ad click here.

  3. petteyg359

    petteyg359 Well-Known Member

    Hmm. May take a shot at covering it to a Qt desktop app if I can borrow your code. I'm somewhat averse to apps that depend on a web browser.
    Last edited: Oct 13, 2021
  4. MrFixit

    MrFixit Well-Known Member

    Sure... In my mind, the advantge of this web-based approach is that users do not have to install anything to use it.
    There are pro's and con's to any approach. My code is readily accessible on the github repository.

    You may want to touch base with @lincomatic who did an earlier version of this in c++ to see if he is interested in collaborating and/or sharing his code.

    Everyone is very smart phone oriented, so it would be nice to eventially migrate this to Android / iOS. There is an effort underway to support the underlying web-based serial port drivers to the phones too, but it is not ready yet. It can be done with some Buetooth programming, but this could possibly port directly when the web serial drivers are ready.
    Madmartigen likes this.
  5. megreyhair

    megreyhair Active Member

    which adapter did you used? ELM327 Vgate iCar Pro BT4.0 was mentioned. but when I did a search in Amz, there were tons of different one. Some specifically said it doesnt support hybrid/electric.
  6. MrFixit

    MrFixit Well-Known Member

    These are generic when it comes to OBD support...
    If they say something about not supporting hybrid / electric, ignore it.

    I won't provide a link because links come and go...
    Here is what to look for:

  7. To remove this ad click here.

  8. MrFixit

    MrFixit Well-Known Member


    The report format has been enhanced to include a complete listing of cell voltages and also has improvements to the plot scaling.
    I have attached an example of this new report format...

    Remember, if you previously collected data with this tool, you can re-process that data and generate a newly formatted report.

    Attached Files:

    Hazem Abu Asab likes this.
  9. @MrFixit : Thank you for the software! I purchased the Vgate ICAR PRO BLE4.0. I followed your instructions and did not run into any issues. I have attached the report for my Clarity.
    MrFixit likes this.
  10. MrFixit

    MrFixit Well-Known Member

    Glad to hear it !
    People tend to be so phone-centric that this method doesn't have much of a following. There are some nice advantages however. The report format is a nice way to produce a permanent historical record of vehicle performance.
  11. megreyhair

    megreyhair Active Member

    Has anyone try using other obd ?
  12. To remove this ad click here.

  13. MrFixit

    MrFixit Well-Known Member

    Which other OBD did you have in mind?

    When we first went through this development, we learned that almost all of the cheap ELM327 OBD2 adapters did not have an adequate buffer size and that's the reason for the specific recommendation (iCar in post #5 above). It is possible that others would work, but most of the ones we tried did not, and I recommend not wasting your time trying.

    If you want to try a different one, feel free, but I would strongly recommend not just trying it with this tool (or any other) without first testing it to see if the buffer overflows. It is easy to verify whether the buffer is adequate as discussed in the other thread here:

  14. megreyhair

    megreyhair Active Member

    Thanks for the quick reply. I was just wondering because I already have a wired OBD that I bought a long time ago. Don't know what kind of chip is inside since the connector was modded. Here is the link in Amazon

    I gave it a try and guess what. IT WORKS!
    attaching the report
  15. MrFixit

    MrFixit Well-Known Member

  16. megreyhair

    megreyhair Active Member

    Info added.
  17. ClarityBill

    ClarityBill Active Member

    I am old guy, so I like the laptop solution.

    I did a report when I got home last night with a dead battery. The second report is this morning after charging.

    My 12v battery went dead, and I replaced it about 1700 miles ago. My battery capacity lost .04 amps overnight, so it may still be correcting to the real number after 12v reset.

    159,015 miles - 45.74 ah battery

    I had been charging with 240v 16 amp charger. I started remodeling a trailer park after work, so I installed a 32 amp charger. I arrive with a dead battery, get a full charge in about 2 hours. Then head home after 2-4 hours of work, and the battery is dead when I get home. Then charge again with 16 amp charger: This may be very hard on the battery. I have been doing this 3-4 times per week, for the last couple months.

    I hit a deer in January, and my car is considered totaled. I am planning to replace the headlight, and drive until it goes to the junkyard.
    MrFixit likes this.
  18. MrFixit

    MrFixit Well-Known Member

    Old is relative... You are a little younger than me, but yes - we are both old !!
    Thanks for the report. You have a lot more "experience" with the Clarity than most with ~160K miles !

    I wouldn't read anything into the .04 aH change. This is more of a longer term reading and a few hundredths of an amp-hour doesn't mean much at all. The fact that you still have almost 46 aH after 160K miles seems encouraging to me (of course, a lot of those miles must certainly be HV miles).

    I took the liberty of entering this measurement into the shared spreadsheet. Thanks for trying this method out.
    Madmartigen likes this.
  19. ClarityBill

    ClarityBill Active Member

    Looks like you were right. I was thinking the .04 might be part of the move to the 'real' number after the 12v battery reset.

    I ran the test this morning, after a couple hundred miles of driving. I wanted to see if the reading was still going down, but it appears to have stabilized. Today's reading is 45.78 aH
  20. MrFixit

    MrFixit Well-Known Member

    Also, we know that disconnecting the 12V battery does NOT reset the battery capacity,
    We also have a theory (unproven, but we have an anecdotal case) that a prolonged disconnection (maybe 24 hours +) might possibly reset the capacity number.

    Many have disconnected the battery for a short period (myself included) and a reset definitely does not occur.
  21. bpratt

    bpratt Active Member

    I wanted to try this report program but my desktop is too far away to get a good bluetooth signal and my older laptop does not have bluetooth. I found a tp-link USB bluetooth adapter on Amazon for about $10 which worked great. I purchased my 2018 Clarity in December of 2017 so it is now nearly 4 1/2 years old. You can see from my report I don't drive much (a lot because of covid) but my battery is still good at 51.5. Apparently age of the battery has less effect than miles driven.

    Attached Files:

    Madmartigen and MrFixit like this.
  22. NorCalPete

    NorCalPete Member

    Once again, thank you MrFixit! I was able to generate a report today, and then use it to update my numbers in the spreadsheet. Firefox kept giving me an error (see attached file), but Chrome worked.

    Attached Files:

  23. MrFixit

    MrFixit Well-Known Member

    Thanks for pointing this out. I thought I tested Firefox, but apparently not.
    The Web Serial API is not [yet] compatible with Firefox.

    You can use Firefox to read an existing log file and generate a report. It just can't Load 'Data from Clarity'

    Here is a table showing current browser compatibility of Web Serial:

    Bottom line is stick with Chrome, Edge, or Opera. I would really like to see this API grow to support cell phones, but right now it is only these three browsers on a PC.

    I have fixed the GitHub documentation to reflect this.
    Last edited: May 27, 2022
    Madmartigen likes this.

Share This Page