Gen2 Prius: Custom PIDs for Torque (Android App) with formulas

Discussion in 'Gen 2 Prius Technical Discussion' started by usbseawolf2000, Jun 24, 2011.

  1. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    It depends on which ECU you 're talking about. HV ECU uses 100 / 255 whereas HV Battery ECU uses 0.5. Don't ask me why.

    Vincent
     
  2. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    It seems like this range is the normal operating range and not the min. & max. There is another range reported under DTC P0A9B.

    Column 1 Column 2
    0 Temperature Displayed Malfunction
    1 -45 ºC (-49 ºF) or less Open or +B short circuit
    2 95 ºC (203 ºF) or more GND short circuit


    If the car has been parked overnight, the Battery Temp. should be close to Ambient Temp.

    Vincent
     
  3. Agape

    Agape Member

    Joined:
    Nov 1, 2010
    378
    41
    0
    Location:
    Ireland/Eire
    Vehicle:
    2005 Prius
    Model:
    N/A
    Alternative... ?

    As corrected by usbseawolf2000 in the post 45 below the following apps (below) doesn't offer ability to add custom PIDs to show Hybrid specific information.

    Poorer and more expensive ''Android'' App's here: https://market.android.com/details?id=com.palmerperformance.DashCommand&feature=search_result

    Poorer and more expensive ''iPhone'' App here: Rev for iPhone, iPod touch, and iPad on the iTunes App Store

    Software above would still need one of the following hardware:



    1) Kiwi WiFi (USA) ($99)
    -or-
    2) OBDKey WLAN (EU/UK)
    -or-
    3) ElmCanII-WLAN (EU/Germany)

    Features (Rev App for iPhone):

    DevToaster - Rev - iPhone app development, Great iPhone apps, and more

    Some of these software can download 'lite' or trial version to test what features, functionalities works with your vehicles.

    I personally don't own any of these. These are just alternatives to ScanGauges offering visual display using your mobile phone handsets (either Android based i.e. samsung galaxy or iphone app using iphone's).
     
  4. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Car was parked in the garage for more than 10 hours. I started it up and MFD said outside temp was 82 deg F. HV Battery Temp 1 said 87 deg F. The difference is about 5 deg F.
     
  5. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    None of the alternatives has the ability (to my knowledge) to add custom PIDs to show hybrid specific information. The softwares are more expensive than Torque which is just $5. Kiwi Bluetooth is $100. So for $105, you'll be up and running assuming you have an Android phone.

    I have an iPhone 4 so believe me, I looked at every software available for iPhone. Torque was the only app that can do what I wanted to. The Wifi hardware to work with iPhone is more expensive too. So, I bit the bullet and got a used Android phone for $55. If you already have an Android phone or table, you'll only have to shell out $105.
     
    1 person likes this.
  6. Agape

    Agape Member

    Joined:
    Nov 1, 2010
    378
    41
    0
    Location:
    Ireland/Eire
    Vehicle:
    2005 Prius
    Model:
    N/A
    iPhone OS and Android running on IPhone: ‪Android running on iPhone‬‏ - YouTube

    cool
     
    1 person likes this.
  7. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Dual booting takes too long and seems impractical. It wouldn't solve the problem of carrying two phones for me.

    I checked the battery temp against outside temp today. It is 6 deg F higher than the air temp.

    2009Prius, did you compare the result of the new formula with the xGauges?
     
  8. 2009Prius

    2009Prius A Wimpy DIYer

    Joined:
    Mar 25, 2009
    2,705
    511
    63
    Location:
    USA
    Vehicle:
    2009 Prius
    I was waiting for you to do it. :D

    Last I checked the scaling factor seems to be at least 2. The new formula has a scaling factor of 256*234/65535 = 0.914, which is less than half of what I estimated from blC and buC. So I don't think it's going to work well for us unfortunately.
     
  9. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    If I have SGII, I would.

    Does the blC or buC match the outside temp that MFD display? If not, how many deg F is it off by?
     
  10. 2009Prius

    2009Prius A Wimpy DIYer

    Joined:
    Mar 25, 2009
    2,705
    511
    63
    Location:
    USA
    Vehicle:
    2009 Prius
    Are you saying Torque can not process passive messages? If so that is odd. Maybe you could convince the author to add that functionality - should be straightforward (more or less copy and paste).

    From this graph
    [​IMG]
    which I originally posted here:
    http://priuschat.com/forums/gen-ii-...lets-backside-engine-block-4.html#post1362739
    It looks like the blC and buC are 1C above the OAT after parking the car all day during work hours - close enough to being equilibrated.
     
  11. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    No, I was not implying that. I just didn't know blC and buC values are passive messages in SGII. I have never owned a SGII, just borrowed it from a friend for a week.

    I am sure Torque can process passive messages because the basic stuffs like engine RPM or coolant temp are built into the app.

    I believe all those PIDs in my spreadsheet are active messages. I have not explored how to add a custom CAN bus passive PID in Torque. I need to find out answers to questions like "would I need the right equation?", etc.. I am assuming I won't need to specify the header.
     
  12. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    If you 're consistently getting 5 ~ 6 ºF higher than OAT, we need to relook at the offset. The offset is determined by the min. Temp. During malfunction, the Temp. can be -49 ºF or less. We don't know how much lower than -49 ºF but usually for temp. measurement, -40 and -58 ºF are commonly used.

    In this case, we can try the range from -58 to 203 ºF:

    (261 * 256 / 65535 * K) + (261 / 65535 * L) - 58

    Vincent
     
  13. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Tried it today. It is 3 deg F higher than MFD reported number.
     
  14. frenchie

    frenchie Member

    Joined:
    Oct 19, 2004
    150
    48
    0
    Location:
    France, not far from PARIS
    Vehicle:
    Other Hybrid
    Model:
    N/A
    bonjour,
    Regarding temperatures, the original values are in °C;
    to get the value in °F you convert easily with the formula :
    val°F= 1.8 * val°C + 32
    so for instance in line 17 from your spreadsheet
    you write: 1.8 * Y
    in fact the value in °C is : Y - 40
    so to get °F you should write:
    1.8 * (Y - 40) + 32
    1.8 * Y - 72 + 32
    1.8 * Y - 40
    this formula applies to lines 18 19 20 41
    for the lines 86 93 94 95 decimals are useless and you can use the same formula using A K M O (forgetting B L N P)

    I am curious to know if it solves your problem.

    Regarding passive PID, torque does not use them and will never use them because of the speed limit of the BT interface.
    it is necessary to use a fast link (500kbps) to scan the full trafic.
    (or use masks and filters and it is very tricky to manage and you get a very poor refresh rate).
     
    2 people like this.
  15. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base

    I just tested them from a cold start. MFD said 84 deg F. Line 17 to 20 and 41 read around 115 deg F. Those seem right.

    HV Intake Temp = 1.8 * A - 40

    I tried that and the result came back as 220 deg F. HV Battery Temp also read that high.
     
  16. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    OK, I found the min. & max. temp.

    http://share.qclt.com/%E4%B8%B0%E7%94%B0%E6%99%AE%E7%91%9E%E6%96%AF%E5%8E%9F%E5%8E%82%E8%8B%B1%E6%96%87%E6%89%8B%E5%86%8Cpdf%E6%A0%BC%E5%BC%8F/repair%20manual/04pruisr/05/20zmw/cidlitac.pdf

    Column 1 Column 2 Column 3 Column 4 Column 5
    0 Hand-held Tester Display Measurement Item/Range (Display) Reference Range Diagnostic Note
    1 BATT TEMP 1 to 3 Temperature of HV battery/ Min.:-327.68°C Max.:327.67°C Undisturbed for 1 day: Same as ambient air temperature -


    Batt Temp (°C) = (2.56 * K) + (0.01 * L) - 327.68

    Batt Temp (°F) = (256 * 9 / 500) * K + (9 / 500) * L - 557.824

    Vincent
     
    2 people like this.
  17. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Awesome Vincent! I will test it out during lunch.
     
  18. 2009Prius

    2009Prius A Wimpy DIYer

    Joined:
    Mar 25, 2009
    2,705
    511
    63
    Location:
    USA
    Vehicle:
    2009 Prius
    Thanks very much! I think this will work.

    :doh: This is the same formula as for the 14 module voltages. Why didn't I think of that! [​IMG]
     
  19. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Vincent, confirmed. I will continue to monitor to make sure.

    Regarding MG1 and MG2 torque, they are supposed to be in Nm. The numbers I am seeing for MG2 is quite low. The spec calls for max of 400 Nm at 0 rpm. I am not seeing above 200. I wonder if the formula is correct.
     
  20. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    If you shift to [N], do you get 0 Nm for both torque? Once you get the offset correct, you can then figure out the scaling.

    Vincent