Torque Pro on the Kona - overview and setup for interested owners

Discussion in 'Hyundai Kona Electric' started by KiwiME, Sep 26, 2019.

To remove this ad click here.

  1. Francois

    Francois Active Member

    Hi KiwiMe,

    I've downloaded the following six files that were available from the GitHub link you had provided:
    1. 001_Kona&Niro_EV_Aux_Battery.csv
    2. 002_Kona&Niro_EV_HVAC.csv
    3. 003_Kona&Niro_EV_BMS.csv
    4. 004_Kona&Niro_EV_BMS_cell_data.csv
    5. 005_Kona&Niro_EV_Extra_gauges.csv
    6. ABRP_Kona&Niro_PIDs.csv

    Just curious on your recommandation to use just files 003 and 004.
    Why not merge all six of them into a single csv and upload that to the Torque Pro?
    Does that impact anything negatively (too many PIDS for some limitation in Torque Pro) with the software?
    Are some setting from those other files erroneous?

    Francois
     
  2. To remove this ad click here.

  3. The applications for TP I'll be discussing don't need those other smaller PID lists, in fact only 003 is needed. You're certainly free to add the whole lot together and I don't believe it would cause any problem.
     
  4. Francois

    Francois Active Member

    All right thanks. I will be receiving my odb2 dongle before end of the week, and my kona before the end of next week. Looking forward to capturing and crunching those data points. That's a benefit (the fun of numbers) that never crossed my mind when I initially decided to get an EV. It's almost like a game. :)
     
  5. It really is a game, at least since I'm retired now and don't rely on a car for reliable commuter transport. I actually only bought an EV to analyse the sh*t out of it and I haven't been disappointed. I now know the answer to many of these questions and all will be revealed here in due course.
    • how does the Kona (and all EVs) display an SoC reading that doesn't suffer from voltage sag and dither all over the place?
    • what is the potential benefit of regen?
    • is there a consistent relationship between charging energy and available battery energy for driving?
    • how much does battery temperature affect charging rate?
    • how does units + time-based fast-charger billing play out in practice?
    • what is the battery efficiency?
     
    TheHellYouSay and Francois like this.
  6. mikeselectricstuff

    mikeselectricstuff Active Member

    They don't call it a "guess-ometer" for nothing... Plenty of ways they can smooth, avarage and otherwise fudge a display to look plausible
    Very significant - in eco mode it actually shows you an estimate of distance gained on a period of regen. If you drill down in the EV menu you can get a realtime display of energy going in and out of the battery - I've seen up to 90kW going back in.
     
  7. To remove this ad click here.

  8. ericy

    ericy Well-Known Member

    Regarding the difference between the really cheap units and the more expensive ones, there is a long and sordid history here. At the heart is usually the ELM327 chip, and you can read about some of it here:

    https://en.wikipedia.org/wiki/ELM327#Other_Versions

    The chip itself isn't all that expensive - ELM wrote some firmware for OBDII, and when the made the 1.0 version, they forgot to set the copy-protect bit on the firmware. This made it possible for others to clone the firmware and sell them. In the meantime, ELM has made numerous bugfixes and enhancements - the cheap clones with the pirate firmware are still effectively shipping the version 1.0 even though some have been hacked to show a newer version number.

    The net result is that people may find that the cheap units just don't work very well as the genuine versions. I don't know if anyone has tried a pirate clone on the Kona or not, so YMMV.
     
  9. hobbit

    hobbit Well-Known Member

    " ... bought an EV to analyse the sh*t out of it and I haven't been disappointed."

    Ah, someone decidedly after my own heart. Although my first impulse is to
    go after the more analog side of things. With each iteration, though, that
    may yield less useful data. But somewhere, the rubber has to hit the road,
    tne voltage has to hit the stator windings, the hydraulic pressure has to
    hit the calipers, and ultimately it can all be measured.

    _H*
     
    TheHellYouSay likes this.
  10. Francois

    Francois Active Member

    I never had needed or tried to push files from my computer onto my Huawei Mate 20 Pro so it took me much longer than I had expected to perform step A from the instructions below for installing the PID files. I'll explain what I did as maybe it will help someone else someday.

    I had prepared the combined csv file on my computer and then plugged my phone to my PC (windows 10) using a USB cable. I thought doing so would trigger the old plain and boring File Explorer but no...... To access the phone, I was forced to install some "new and improved" software from Huawei. And the damn thing does not even have a setting to view hidden file.

    After some frustrating moments and more searches I came across a workaround. I uninstalled the software, unplugged the cable from my phone and connected my PC to my phone using bluetooth instead of a USB cable. Turns out that in the bluetooth section of windows 10 there is a feature named "Send or receive files via Bluetooth". That allowed me to finally get my files into the proper subfolder within the .Torque hidden folder.

    So if you are using Windows 10 and have Huawei phone, forget about the USB cable. Go straight to bluetooth. :)
     
    KiwiME likes this.
  11. The first Torque Pro application 'tutorial' we will cover is how to create a charging power profile. Although there is a DC 50/100kW one available from FastNed.nl, it's more fun to make your own, especially since there are variations based on temperature and SoC. For this we will need logging set up in Torque Pro and the output will be post-processed in Excel. You can do this for any type of charging but it's more useful for DC.

    In all charging events there are losses associated with the power conversion from AC to DC. Clearly with billable AC charging you are paying for the power on the AC side with yourself taking the hit for charger efficiency. The Kona's OBC (on-board charger) is specified as being maximum 91% efficient by Hyundai.

    With billable DC charging you get a better deal as you normally pay only for the DC output. 50kW DC chargers are quoted by their manufacturers as having approximately 94% maximum conversion efficiency, mentioned only for reference only as you are not directly paying for those losses.

    The charge 'power' profiles you can create with TP measure the DC at this point in the system, right after the conversion from AC. Past that, unaccounted losses are incurred from peripheral electronics, the climate system (if activated) and battery losses. What remains will add energy (SoC) to the battery. Those losses are not considered in the 'power' profile; I only mention them so you are aware of what the data does, and doesn't represent.

    Torque Pro has two 'Settings' menus reached by a gear icon, one at the top menu level and one in the 'Realtime Information' menu. Using the first, select 'Data Logging and Upload', 'Select what to log' and pick the following items at minimum, being sure to have added the additional decimal places to certain items in the gauges as previously covered.

    000_Battery Heater 1 Temperature (only if you have the heater)
    000_Battery Min Temperature
    000_Battery Power
    000_State of Charge Display

    Go back one step and select 'File Logging Interval' and set this to 5 seconds. You should plan on logging roughly 600 lines to make the data relevant, yet managable in Excel. At 5 seconds that gives you 50 minutes. If you are doing a shorter test, you can pick a faster rate.

    When you ready to start logging enter 'Realtime information', settings, 'Start Logging'. Start the charging session, terminate when done and select 'Stop Logging'.

    In the same menu select 'Email Logs', (select the log file), 'CSV' and send yourself the file by email or cloud sharing app.

    I won't go into detail about using Excel. It's too complicated, I'm no expert and it's not the intention of this thread. But, here are the very basics.
    In Excel, open the CSV file. Note each column represents the collected parameter with the first representing the timestamp. You will need to further process some columns to clean up the values, for example under Battery Power the values are negative because you are charging. You should create a new adacent column where each cell processes those to the left under the Battery Power to make the values positive. That formuala is =-(select cell to the left), enter and drag-copy that cell to all rows.

    I also factor all the data to fall within the range 0-100 so that all data can be displayed with a common Y-axis. It may be that there are ways around this in newer Excel versions, but in 2007 I'm not aware of how to have Y-axis scaling variations.

    There are many ways to plot the data but I mostly use scatter plots which require providing X-axis values, which is normally the timestamp data. A simple 2-D line plot will work as well simply by clicking the column you want first.

    For a scatter plot click away from the data and 'insert' a 'scatter' plot with the straight lines and no dots option. Right-click 'select data'.
    Pick 'add data', in the three boxes insert (1) the title cell of the data column, (2) the interval timing column A, and (3) the Y-axis data under the data title. Keep adding data for each additional column.

    Charge data, short DC.PNG

    As a note, it would be great if we could keep posts in this thread relevant to the use of Torque Pro as covered so far and questions pertaining to getting that working and displaying the data. If you want to discuss something peripheral, perhaps open a new thread.
     
    herode10 and Francois like this.
  12. To remove this ad click here.

  13. hobbit

    hobbit Well-Known Member

    I just started playing with some of this stuff tonight. It's a
    bit of a saga, which I will desperately try to shorten in the
    interest of getting pointers to where I can learn what I need to.

    Because of the aforementioned google play-store idiocy, I don't
    have Torque Pro handy. I've got Torque Lite which I found on
    several repositories and the OBDLink app which [mostly] came
    with the "green widget" I bought for the purpose, both sideloaded
    onto available android platforms. [*Don't* get me started on
    what a pack of idiots the scantool.net people are...] What gets
    interesting is that Torque Lite is apparently useless for handling
    custom PIDs, but the OBDLink app has a way to enter those and set
    them up for gauges. So far I was able to translate a couple of
    entries from the given Torque .csv files to OBDlink and display
    them in that. Thus, it was fun to drive around this evening
    with a display of actual pack voltage and current.

    Torque Lite does actually save its "dials" in a simple text file,
    so I tried crocking a couple of custom mode/PID entries into
    that and reloading Torque. That fails because the save file
    has no concept of which CAN ID you're querying, or the math to
    extract and process arbitrary bitfields. Unless there are
    some magic field-names that would add those, that I didn't
    find examples of in the original file??

    So I kind of understand what needs to be done, but don't yet
    understand *why*. Where is a good reference I can read on
    what the CAN IDs really do in terms of getting queries to the
    right ECUs, and what all the mode/PID mapping is? For example,
    it looks like a lot of good Kona info *ALL* comes from mode 22
    PID 0101, with the math parsing an entire alphabet's worth of
    variables to extract various stuff, and I am SO CONFUSED now.

    And what I really want to know is *how* anybody, JejuSoul or
    anyone else, originally got hold of all this info to create the
    files in the first place. It all feels like arbitrary magic
    passwords whose origins remain a deep secret, and in the Kona
    even passively snooping the traffic to get an idea of what's
    going on isn't a trivial prospect since there's that gateway
    module in the way.

    _H*
     
    herode10 likes this.
  14. hobbit

    hobbit Well-Known Member

    By now I've had a chance to play with some custom-PID stuff, swiping some
    parameters from the referenced .CSVs and adding user-defined PIDs to the
    OBDlink app. Immediate things to try were pack voltage and pack current,
    and that seems to come up nicely, update fast enough, and make for some
    nice run-graphing. Interesting to watch how the pack voltage sags a little
    on acceleration and bumps up on regen; you could almost calculate the
    internal resistance just by eyeballing the lines.

    The OBDlink folks seem to have swiped a lot of ideas from Torque, or
    vice-versa ... custom PID syntax is almost the same between them.
    I guess it's kind of an industry standard by now?

    Here's an interesting observation: in the "zero" regen setting, there is
    still nonetheless a little bit of negative power shown on no-pedal
    coasting, maybe -3 kW at highway speeds. OBD2 data shows just
    about zero battery current during that, maybe -1 amp now and again.
    Going to *neutral* in the same glide returns the "electricity use" yellow
    number to zero, but now battery current is +2 or 3 amps! Since these
    are very small thresholds on the scale of possible power and current
    measurements anyway, I'm not considering it super-accurate but it
    seems that during zero-regen coasting, a little bleed of regen power
    is being taken anyway and likely fed to the low-voltage converter.
    Carving regen out of the loop completely falls to a positive trickle
    from the main pack to run the 12V stuff, near as I can guess.

    Neither app seems capable of displaying little skinny bargraph
    meters, which I'd love to be able to line up 98 of across a hi-res
    screen for all the cell voltages and look for any out of sorts. I
    hope apps like this are smart enough to ask for a given mode/pid
    ONCE if a bunch of custom definitions are parsing data out of it,
    as opposed to making 98 separate queries...

    _H*
     
    electriceddy likes this.
  15. So if you wanted to be towed indefinitely, leave it in "run" mode, regen level zero.

    When in neutral "at speed" I have to wonder if there is any active protection of the drive electronics from potentially-high (no pun intended) back-EMF generated in the field windings? Same reason we're supposed to tow with at least the front wheels off the ground.
     
  16. I liked the Leafspy menu that showed the cell voltages in a bar graph format, pretty easy to tell with a glance:)
     
  17. hobbit

    hobbit Well-Known Member

    WRT back-emf ... people worried themselves sick over that in the Prius, too,
    and I had mine up over 70 mph in neutral with the engine off on a regular
    basis with no ill effects. While Neutral is nominally a "don't touch any
    motor control" state, it could be that a background amount of active
    field weakening happens regardless, for just such situations.

    _H*
     
  18. hobbit

    hobbit Well-Known Member

    Here's my ancient AutoEnginuity displaying the block voltages in a
    1st-generation Prius, sort of showing the bargraph format I'm thinking
    of but for a full EV pack, it would have to be much more compact.
    This allowed us to clearly spot block 10 as the weak one, anyway.

    _H*
     

    Attached Files:

  19. ericy

    ericy Well-Known Member

    I got it all working earlier today - it takes a while to sift through the sensors to find the ones that are of interest, but I got SOC to display properly so it is clear that the basic hardware is working. I will have to dig through and find the remaining sensors that seem interesting.

    I was watching TeslaBjorn earlier today using what looked like TorquePro to monitor the battery temperature while charging, and that's what reminded me that I hadn't actually tested the dongle yet. I expect that if I have a 30 minute break while waiting for charging that I can explore further. We are at the time of year when people become more interested in temperatures and how it changes battery behavior.
     
  20. hobbit

    hobbit Well-Known Member

    What is an "all data widget"? Is that a raw hex dump of an entire answer?
    Is that the kind of thing useful for reverse-engineering more PIDs?

    I'd love to have visibility into things like inverter and OBC temps...

    _H*
     
  21. hobbit

    hobbit Well-Known Member

    Knowing that "winter is coming" and having to live without the battery
    coolant heater, I added a couple more items to my still growing gauge
    set. Taking two key items from the JejuSoul set, in "Kona&Niro_EV_BMS.csv"
    we have available Charge [regen] and Discharge power, at bytes F/G and
    H/I respectively. With the car having just sat all night in the driveway and
    pack temp around 40F, these seem to resolve to 158 and 137 kilowatts
    respectively, i.e. discharge power is given as *lower* than charge power.

    This seems backwards to me, so I'm wondering if "Jeju" has them flipped...

    _H*
     
  22. ericy

    ericy Well-Known Member

    I found a different way of going about this. There is an Android app called "SoulEVSpy" (that is something like 15$), and a lite version "SoulEVSpy Lite" that is free. While it was first written for the Soul, it works with the Kona (there is a config option that lets you select among various Kia and Hyundai EVs).

    It is pretty fussy about the BT dongle - the guy who wrote the thing used a KW902, and that's really about the only dongle that he supports. Fortunately those are cheap - 15$ or so on Amazon.

    The BMS screen has a lot more data than is shown in the screenshot - you have to scroll down, and you get tons of info.

    Batteries.jpg BMS.jpg Charger.jpg Energy.jpg
     
    electriceddy, SkookumPete and Fastnf like this.
  23. I'd be interested to know if obc.pilot_duty_cycle works as it's not included in the TP Kona PIDs and, if added, the one from the Soul doesn't work.
    Could you check the next time you're AC charging?
     

Share This Page