Budget Battery Capacity Readout

Discussion in 'Clarity' started by MrFixit, Feb 27, 2021.

To remove this ad click here.

  1. MrFixit

    MrFixit Well-Known Member

    A collaboration between @lincomatic and @MrFixit has resulted in a some success in capturing and deciphering the relevant CAN messages that are associated with the Clarity’s HV battery parametrics.

    Our hope was that we could extract this information using a low-cost and ubiquitous ELM327 OBD2 device. There are literally hundreds of these devices available (having so many choices is actually problematic).

    The most common way to do this is to install an OBD2 adapter on your diagnostic port, and then run an App on your phone to collect and format the data for display. The typical (and lowest cost) rendition of this is an ELM327 adapter and a phone App such as “Torque”. Generally, this part is ‘easy’. The hard part is knowing how to obtain the right messages, and how to decode the fire hose of binary data into meaningful parameters. The Clarity has a LOT of available CAN data.

    Although at the early stage of where this could go, we believe we have succeeded in deciphering the most important parameter (Battery Capacity). Other important battery information has been identified too.

    There were 2 major challenges with this effort:

    1. The Clarity produces large messages in response to CAN requests. These messages are on the order of 250 bytes, and almost ALL of the low-end ELM327 devices fail because their buffer size is too small resulting in overflows.​

    These ELM327 devices are like the Wild West. They appear everywhere. All are made in China, and almost all of them are “clones” which don’t use actual ELM327 devices inside. It is virtually impossible to judge whether a given adapter has any chance of working from the information provided in the advertisements. We tried maybe 10 adapters altogether, and almost all of them failed with buffer overflows.

    The more expensive ones are probably more likely to work, but our goal was to find a ‘good’ low cost device that others could purchase with confidence that it will be suitable.​

    2. The next major challenge was to find and decode the desired parameters. This is like finding a needle in a haystack. With many hours of sifting through hexadecimal data and trying to hunt for a few ‘known’ values, we were able to make some substantial progress. We are just scratching the surface of what is there, but some of the key battery numbers have been found…
    Here is a view of the custom PID setup, and the Battery Capacity being displayed in Torque :

    upload_2021-2-27_12-0-1.png

    upload_2021-2-27_12-0-14.png

    We do not intend for this to be a Torque tutorial, and therefore we assume a certain level of technical skill. If someone wants to create a step-by-step procedure, you are welcome to do that and post it.
    • We used the “Torque Pro” App (cost $4.95)
    • And, we used this Vgate BLE 4 OBD2 Adapter (cost $27):

    * Again – We can’t emphasize enough, the Wild Wild West nature of these ELM adapters. We know this one works, but we also know that MOST of the low cost ones do not. If you find other low-cost adapters that work, let us know. If you don’t want to experiment, then buy this exact one.

    The HV Battery Capacity comes in a message from the Clarity’s ‘PHVBAT1’ ECU (ID=DA01F1), and a PID of 22202A. We ultimately plan to build a custom list of Clarity PID’s that can be input to Torque Pro as a .csv file, but also will explore some kind of custom Clarity App as a possibility.

    More comprehensive lists of PID’s can be provided to any who are technically inclined and would like to participate in this effort. Feel free to provide any comments here, or via PM.

    @lincomatic and @MrFixit
     
    Last edited: Feb 27, 2021
    Awang, ClarityDoc, AlAl and 16 others like this.
  2. To remove this ad click here.

  3. JFon101231

    JFon101231 Active Member

    Nice job!
     
  4. JohnT

    JohnT Member

    Hi Mr Fixit...
    Well I have Torque Pro Plus; and BAFX reader and I added the PID; but get "ECU does not appear to support Mode $06"
    when I do a scan... I did have to enter a 'long name' to have the new pid accepted. Scan didn't work; but a lot of the rest did
    but didn't see the new pid anywhere,
    Unfortunately 'Car Scanner' by 0vZ doesn't offer adding pids Cash Traylor had info on it Aug 2020
    and it works with ecu error. If I have done something wrong; would love to know John
     
  5. MrFixit

    MrFixit Well-Known Member

    I do have a 'Long Name:, it is just dark grey and hard to read.
    While you are in the PID editor mode, there is a "Test" button at the bottom. What do you get when you hit that?
    One other thing that I did was turn off headers. I did that with an entry in the vehicle profile under "Very Advanced - ELM custom configuration string..." by entering ATH0 there. Show us what appears in your Test mode after doing this...

    You can tell immediately while still in the PID editor if it is working with this Test function. It is a lot easier than going back to the dashboard and trying to hunt down a PID among all the others. This presumes a live connection while working on the PID.
     
    Last edited: Feb 27, 2021
  6. MrFixit

    MrFixit Well-Known Member

    You want to see something like this in "Test" mode:

    upload_2021-2-27_14-52-44.png

    If you see this, then your ELM isn't cutting it:

    upload_2021-2-27_14-54-20.png

    Note: The Header is off in the 1st picture, and on in the second, but it illustrates the point about the BUFFER FULL from a "Bad" ELM...
     
    Last edited: Feb 27, 2021
    sabasc likes this.
  7. To remove this ad click here.

  8. JohnT

    JohnT Member

    Well that is/was very frustrating... tests ok, ecu connected still has the ecu does not appear to support mode $06
    so if do vehicle test results it goes up and then error msg and then it refreshes continuously
    the only place to find the battery is in the graphs and it says -2.57 ah and I certainly don't see a nice Batt Cap anywhere :-( from the image
    I have (be*256+bf)/100 possible a wrong char? thanks again
     
  9. JohnT

    JohnT Member


    sorry - missed your images above... yes I get 'buffer full' so I guess I am beat with this.. will just wait for the autel
     
  10. MrFixit

    MrFixit Well-Known Member

    Yes. You are screwed with your BAFX device... It will not work.
    Wait for the Beta and/or get a new interface.
     
  11. JohnT

    JohnT Member

    Wonderful :-( and I got the BAFX specifically for the Clarity per Cash... oh well.... Would the Autel work for this? - or does it need its own app?
     
  12. To remove this ad click here.

  13. MrFixit

    MrFixit Well-Known Member

    No, the Autel is not an "ELM" compatible device. Read my first post carefully. If you want to try this route, buy the proven adapter that we have already demonstrated. As I said, we must have tried 10 different 'low cost' adapters and most couldn't keep up with the Clarity.
     
    JFon101231 likes this.
  14. JohnT

    JohnT Member

    Ah - that's what I thought ... missed the 'ELM' is not Autel.. This is, of course, of very low concern... temps been about 34F for the past while and my range is about 48 miles (-4 and 80km metric) so my battery is still alive :) so this is all for frustrating 'fun'... the BAFX works fine - just not for this.. will see if any of the 'recommended' ones is cheap enough as I have 3 of the darn things now. I appreciate your helping me out..
     
  15. JohnT

    JohnT Member


    and being a continual 'pest' - is this the one:
    https://www.amazon.ca/Vgate-Bluetooth-Scanner-Android-Compatible/dp/B06XGB4873/ref=sr_1_1_sspa?dchild=1&keywords=vgate+iCar+Pro+BLE+4.0+OBD2

    the link you have at the beginning on amazon.com has 'currently unavailable'
     
  16. MrFixit

    MrFixit Well-Known Member

    @JohnT:
    Yes... That looks like the one.
    Your link also shows a lower cost Bluetooth 3.0 version. I think there is a very good chance that one would work too but we didn't test it. We might have tried the lower cost one but it seemed to be unavailable here so we didn't.
     
  17. Theoburns

    Theoburns Member

    I think that's the least that we can do considering the time that you have put into this. It takes exactly two minutes to read your first post, and I encourage anyone interested in this to invest the full two minutes and read it carefully. I estimate that you spent at least an hour just composing that one message alone, my estimate is based on the content and how easy it is to read. Lots of technical information that is easy (and quick) to read is hard to write and takes time, I know that from experience.

    And this doesn't count the multiple hours that I am sure you spent doing all of the research just on this solution alone, not counting the Autel project. I suspect that you enjoyed doing it, but at the same time you could have easily said "I got my Autel unit working and I'm good", but instead you pursued a solution(s) that would open it up for anyone who is interested in monitoring the health of their Clarity battery.

    Battery capacity for the Clarity is an extremely critical piece of information, which until now has been like pulling teeth to get out of dealer service departments, which for most people has been the only source. Now the Clarity community can finally start collecting data and comparing notes, and watch the trends (hopefully relatively flat) as we add miles to our Clarities over the coming years.

    My hat is off to you sir. The significance of this cannot be overestimated. I will let you credit lincomatic since I don't know the contribution.
     
  18. lincomatic

    lincomatic Member

    Since you have buffer overflow, your ELM isn't going to cut it, but just an FYI, the PIDs are all mode 22, so the error message is incorrect
     
    Last edited: Feb 27, 2021
  19. lincomatic

    lincomatic Member

    Car Scanner is a cross platform iOS/Android alternative that works better than Torque Pro. I just discovered it today. Torque Pro has a bug, in the way it handles the large messages that the Clarity outputs, and wraps the data. So it can't extract all of the the other info out of the PID that we're using to get the battery capacity.

    https://www.carscanner.info/

    Another thing that's nice is that even the free version works to get the battery capacity.

    Here is a screen shot of it displaying the battery capacity:

    upload_2021-2-27_20-17-4.png

    Here's how to input the PID into Car Scanner:

    upload_2021-2-27_20-21-24.png
     
    West1, sabasc, JFon101231 and 7 others like this.
  20. lincomatic

    lincomatic Member

    BTW, though we haven't tried them, if you have an OBDLink SX/MX/MX+ they should all work, since they're based on the STN1110 chip, which is more powerful than even a real ELM327 chip.
     
    sabasc likes this.
  21. lincomatic

    lincomatic Member

    Everyone who gets this working, pls post or private message me with your actual values, so that we can verify that we decoded the data properly.
     
  22. Hoon

    Hoon Member

    Awesome. Is this really the true actual battery capacity the car is thinking it has?

    I've been using Viecar BT 4.0 adapter but when testing this custom PID, it failed with buffer running out. I switched to a Vgate BT 4.0 adapter I had, this one works fine.

    Mine is reading 54.6 Ah. This is a 2019 model (bought July 2019), with about 12500 miles. I saw about 50 miles actually driven during a recent battery full charge with temperatures around 50F and no AC & heater.
    I usually keep my battery levels between 40%-70% as my commute is pretty much fixed (11 miles one way, have access to EVSE at work and home).

    What other custom PIDs are available?

    IMG_6218.PNG
     
    Last edited: Feb 28, 2021
    Jennifer B and lincomatic like this.
  23. MrFixit

    MrFixit Well-Known Member

    @Hoon:
    Yes !

    You are the first one in the forum (aside from @lincomatic and me) who have put this into practice and gotten an output.
    Yes - we believe this is the actual number that Honda would read out from your vehicle. The more people who do this and yield plausible numbers, the more confidence we gain !

    A highlight of more PID's to come include SOC, all the individual battery cell voltages (168 of them), battery line voltages from each bank, battery capacity from Bank B, and min & max individual cell SOC's from each bank. Since Car scanner is working the best, we will get this list organized and formatted in a way that is compatible.

    You are a living example of how these adapters can be good or bad (mostly bad) !
     
    JFon101231 likes this.

Share This Page