1. Attachments are working again! Check out this thread for more details and to report any other bugs.

2012-2015 Prius PHV: Custom PIDs for Torque Android App

Discussion in 'OBDII Android App' started by usbseawolf2000, Mar 10, 2012.

  1. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c

    Hi Cave Arnold,

    I've checked your raw values, they do seem to flip between the min and max. I 've a log file captured by Techstream on a Gen3:

    Wheel Acceleration.jpg

    The correct range seems to be small and centre around zero. Therefore, I suspect all your max. values are negative values. Please help to test the formula as below:
    Column 1
    0 [TH]Name[/TH][TH]ShortName[/TH][TH]ModeAndPID[/TH][TH]Equation[/TH][TH]Min Value[/TH][TH]Max Value[/TH][TH]Units[/TH][TH]Header[/TH]
    1 [TR][TD]FR Wheel Acceleration[/TD][TD1]FR WA[/TD1][TD1]2142[/TD1][TD1]SIGNED( A ) * 199.27 / 127[/TD1][TD1]-10[/TD1][TD1]10[/TD1][TD1]m/s2[/TD1][TD1]7B0[/TD1][/TR]
    Vincent
     
  2. Cave Arnold

    Cave Arnold Member

    Joined:
    Apr 20, 2014
    64
    60
    0
    Location:
    Lehigh Valley, PA
    Vehicle:
    2017 Prius Prime
    Model:
    Prime Advanced
    I am attaching the results in a spreadsheet along with a screenshot to show the modified PID in Torque. This time it showed zeros and some weird characters occasionally. I also include FR Speed for reference. TorqueNewPID.png
     

    Attached Files:

  3. Cave Arnold

    Cave Arnold Member

    Joined:
    Apr 20, 2014
    64
    60
    0
    Location:
    Lehigh Valley, PA
    Vehicle:
    2017 Prius Prime
    Model:
    Prime Advanced
    Sorry, I just realized I left out the * 199.27 / 127. I will change for my drive in tomorrow. I do not think multiplying by ~1.6 will make a difference, but I will try anyway.
     
  4. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    It is likely the SIGNED() function is not working. If that is the case, try this:
    Column 1
    0 [TH]Name[/TH][TH]ShortName[/TH][TH]ModeAndPID[/TH][TH]Equation[/TH][TH]Min Value[/TH][TH]Max Value[/TH][TH]Units[/TH][TH]Header[/TH]
    1
    2 [TR][TD]FR Wheel Acceleration[/TD][TD1]FR WA[/TD1][TD1]2142[/TD1][TD1]( A - {A:7} * 256 ) * 199.27 / 127[/TD1][TD1]-10[/TD1][TD1]10[/TD1][TD1]m/s2[/TD1][TD1]7B0[/TD1][/TR]

    Vincent
     
  5. Cave Arnold

    Cave Arnold Member

    Joined:
    Apr 20, 2014
    64
    60
    0
    Location:
    Lehigh Valley, PA
    Vehicle:
    2017 Prius Prime
    Model:
    Prime Advanced
    I think we have a winner. I need to try and correct the sign. I tried -( A - {A:7} * 256 ) * 199.27 / 127 on the way home and that did not seem to work. I will try ( A - {A:7} * 256 ) * -199.27 / 127 tomorrow and see how that works out. Thanks for your help.

    Attached are the acceleration and speed of each wheel on my trip home. This will be helpful if I am ever in a situation where I need to accelerate or decelerate quickly otherwise it does not seem to tell me much as the small acceleration and speed changes don't seem to align well when I am cruising along.
     

    Attached Files:

  6. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    It is a two's complement number. It does not make sense to correct the sign. The formula may need to tweak further because the positive numbers are not showing up.

    Don't confuse vehicle acceleration and wheels acceleration. Some of the wheels may be decelerating even when the vehicle is accelerating, e.g. during cornering, driving over a surface with different surface friction characteristics, etc. It may not be helpful to you but the Skid Control ECU needs these info. to know whether the wheels are slipping and to effect VSC or TRC operation accordingly.

    Vincent
     
  7. Cave Arnold

    Cave Arnold Member

    Joined:
    Apr 20, 2014
    64
    60
    0
    Location:
    Lehigh Valley, PA
    Vehicle:
    2017 Prius Prime
    Model:
    Prime Advanced
    I was thinking about it incorrectly, thanks. The numbers were just not making sense in that context.

    The sign change does allow the numbers to make sense to me though as I think of + as forward and - as reverse. I intentionally accelerated in a right turn the other day and saw larger positive numbers which make sense to me. I was also seeing way to many negative accelerations during normal highway driving. It may not be technically correct, but this is the way my mind understands it best.
     
  8. Vostradamus

    Vostradamus Junior Member

    Joined:
    Dec 19, 2012
    1
    0
    0
    Vehicle:
    2005 Prius
    Model:
    N/A
    I'd like to test your app with my ELM327 device. Haven't been able to get Android Torque to work.
     
  9. Todor

    Todor Junior Member

    Joined:
    Feb 1, 2014
    85
    23
    0
    Vehicle:
    2013 Chevy Volt
    Model:
    N/A
    Well, the app doesn't need testing anymore because it's already released :) But you can definitely get it and use it. It's called "Carista OBD2" and you can find it on Google Play Store. More info at Carista OBD2 - Vehicle Diagnostics and Customization | brew your own car
    Also, see this thread: Carista OBD-II application rocks | PriusChat
     
  10. Squirt

    Squirt Member

    Joined:
    Jun 1, 2014
    204
    47
    0
    Location:
    Los Angeles
    Vehicle:
    2014 Prius Plug-in
    Model:
    Plug-in Base
    Sorry, I'm a bit of a Torque newb, but I haven't seen this issue addressed:

    Is there a PID that indicates a current "mi/Kw" reading? (sort of an instantaneous MPG reading for EV mode) I would find this incredibly helpful, as the MPG reading of 100(instant)/999(ave) is completely useless in EV mode, and I find it annoying that Toyota didn't come up with a better solution out of the box.
     
    markabele likes this.
  11. jprates

    jprates https://ecomove.pt

    Joined:
    Jan 30, 2008
    387
    42
    0
    Location:
    Moita, Portugal
    Vehicle:
    2017 Prius PHV
    Model:
    N/A
    Hi all,

    So, I finally decided to buy myself an OBD tool to use on my PiP, and ended up in this thread to get Torque's custom PIDs.

    I have two questions to you all, for starters regarding the battery voltage pids as stated in the first post:

    1st question: Where did these 14 tension values came from?
    I thought the PiP traction battery had 4 modules, each one with 14 cells, all connected in series. Is this not correct?
    If this is true, then how do the PIDs show only the voltage for one single module (14 cells values)? Are we missing the other module's PIDs?

    2nd question: Are the attached files updated?
    I downloaded the zip file, opened the 3 comma separated files inside, and found only battery PIDs for 8 cells, it starts at V1 and finishes at V08.
    Where are the rest of them from V09 to V14?

    Cheers,
     
  12. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    2,994
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    14 Blocks are from a regular NiMH Prius.

    For PiP with Lithium battery there are only 8 blocks. I never cleaned it up and removed V9-V14. I should update it.
     
    jprates likes this.
  13. jprates

    jprates https://ecomove.pt

    Joined:
    Jan 30, 2008
    387
    42
    0
    Location:
    Moita, Portugal
    Vehicle:
    2017 Prius PHV
    Model:
    N/A
    Hummm... most interesting, many thanks for that info/update USBseawolf2000!

    So we have 8 blocks of 7 cells each... with one voltage sensor and one internal resistance per block...

    Strange we only got 3 temp sensors... we are probably missing one... or am I missing yet another detail?
     
    #193 jprates, Apr 7, 2015
    Last edited: Apr 7, 2015
  14. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    2,994
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    8 blocks with 6 cells each.

    3.6v x 6 = 21.6v per module

    21.6v x 2 = 43.2v per block

    43.2v x 8 = 345.6v per pack

    There are three blower fans so I think it makes sense to have only 3 temp sensors.
     
  15. jprates

    jprates https://ecomove.pt

    Joined:
    Jan 30, 2008
    387
    42
    0
    Location:
    Moita, Portugal
    Vehicle:
    2017 Prius PHV
    Model:
    N/A
    Sorry, that can't be right.

    We have 3,7 V cells, not 3,6 volts, and we have 56 cells, not 96, for a total of 207,2 volts.

    The values you mention are consistent with the prototype/trial model, not the production model.

    Agree, never thought of that, it does make sense.
    I was looking at it on a different perspective: having 1 sensor for each pair of blocks.
     
  16. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    2,994
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    My bad, you are absolutely right. I was looking at the prototype spec to refresh my memory.

    This has the correct info: Prius PHV - Production battery cells | PriusChat

    So, 7 cells at 25.9v. I recall Torque shows about 28v when fully charged.
     
  17. jprates

    jprates https://ecomove.pt

    Joined:
    Jan 30, 2008
    387
    42
    0
    Location:
    Moita, Portugal
    Vehicle:
    2017 Prius PHV
    Model:
    N/A
    That's it, no worries, thank you for clarifying the number of modules, I was mistaken in that regard.

    Now my next task is to change all these formulas to metric units...
     
  18. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    2,994
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    There is a csv file with metric unit in the zip file.

    I think Japan uses metric so they are originally metric. I had to convert them to US and US formulas are more complicated due to that.
     
  19. jprates

    jprates https://ecomove.pt

    Joined:
    Jan 30, 2008
    387
    42
    0
    Location:
    Moita, Portugal
    Vehicle:
    2017 Prius PHV
    Model:
    N/A
    Can't find the metric file, but no worries, I am almost done reverting it back to scientific/metric units.

    There is only one unit that I can't understand what you did on the PIDs... the temperature ones...

    The conversion should be 1.8 ºF (9/5 in your formula) for each 1ºC delta, plus 32 ºF (0ºC = 32ºF) to get from ºC to ºF.

    I can see however that you used a basevalue of 40 instead of 32 for most formulas, and on some others you even went further and used 58 instead.

    Can you please let me know if these induced "errors" are there on purpose to correct something, or if they are just typos?

    Thanks once again, and sorry for so many questions in so little time ;)
     
  20. EVplus

    EVplus Junior Member

    Joined:
    Jun 10, 2012
    3
    7
    0
    Location:
    Germany, Rheinfelden
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base