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. 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 am attaching Test.CSV file. Import all 40 of them. Go to the Edit PID screen and use the Test button.

    You can take screenshots that include Response, Command and OBD Header (Ex: 7E2 in my previous screenshot) or write them down. If you don't have Android 4.x, it won't be able to take a screenshot by using Vol down + Power button at the same time. Perhaps, use another phone to take a picture.

    Sorry, you'll have to do it 40 times. Logging will just record the result of the equation, not the Hex response.

    If you cannot do all of them, start with 7E2. That should have the PHV battery voltage and current.
     

    Attached Files:

    • Test.zip
      File size:
      539 bytes
      Views:
      532
    1 person likes this.
  2. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    Thanks! That is what I'm looking for.:)

    From your GenII's responses, 80018001h, it looks like there are PID at 21h, 30h & 31h.

    21h - MIL ON RUN DIST , A * 256 + B , km
    30h - DTC CLEAR WARM , A , number
    31h - DTC CLEAR RUN , A * 256 + B , km

    Vincent
     
    2 people like this.
  3. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    Yes, 7E2 contains the voltage and current PIDs.

    I 've attached another test1.zip file by splitting them up into 2 words. Hopefully this will save you the trouble of doing them one by one.

    Vincent
     

    Attached Files:

  4. Tracksyde

    Tracksyde Member

    Joined:
    Sep 21, 2011
    1,429
    761
    0
    Location:
    So Cal
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Thanks, Vincent. I've loaded your and USB's file. I'll try yours first. I will try them tonight after I get home and report back.
     
  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
    For Vincent's file, you can log the results so you won't need to write down or take screenshots.

    FYI, You don't need to do mine, if you do his.
     
    1 person likes this.
  6. Tracksyde

    Tracksyde Member

    Joined:
    Sep 21, 2011
    1,429
    761
    0
    Location:
    So Cal
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    I loaded Vincent's file and added a few PIDs at a time to log. I was getting responses when I did the Test so everything was looking good. I started with 4, then 6, then 8 PIDs at a time so I don't overload my $20 OBD2 adapter and my 4 year old Android phone :). I could even see the "last raw value" from PIDs I logged earlier.

    When I finished, I went to go look at the logs to make sure they were all there. For some reason, it only wrote 2 log files. I should've had like 6 or 7, maybe 8. I spent 45 minutes and I only got 2 logs :(. I'm guessing about 12 PIDs (I'm still in the car now, will check when I get to a computer).

    Almost there. I'll figure out the ones I'm missing and do those later/tomorrow. I'll post the log files here as soon as I get home.

    Thanks for your help, Vincent and USB

    Edit: actually, it looks like Torque may have consolidated my logs. Even though I did 8 separate logging sessions, I guess it may put them altogether. I just did another one with 8 PIDs and the log was 2k. When I logged them again, the same log file went up to 5k. The other two log files I have are like 12k and 20k.
     
  7. Tracksyde

    Tracksyde Member

    Joined:
    Sep 21, 2011
    1,429
    761
    0
    Location:
    So Cal
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    All the PIDs look like they logged something (there's some 7C4 ones that are blank on one log but appear on the 2nd log with values). Let me know if anything is incorrect or needs to be redone.

    Thanks again, guys

    http://www.tracksyde.com/forum/pip/torque_pip.zip
     
  8. vincent1449p

    vincent1449p Active Member

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

    I entered your logs into Test1 results. It seems that all the 21E0 did not capture anything, probably Excel treated it as an exponent. The 2160 & 2180 for 7E2 should have most of the PIDs for HV control & batteries but it show nothing.:confused: Could you help to redo these using USB's method?

    Thanks again,

    Vincent
     

    Attached Files:

  9. Tracksyde

    Tracksyde Member

    Joined:
    Sep 21, 2011
    1,429
    761
    0
    Location:
    So Cal
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Ok, it will follow USB's method tonight and record the results. Thanks
     
  10. Tracksyde

    Tracksyde Member

    Joined:
    Sep 21, 2011
    1,429
    761
    0
    Location:
    So Cal
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Vincent,

    Here is everything. I edited the Test1.csv file to fix those exponent issues. Then I just logged them all. It looks like there are values for everything..

    When you said the 2160 and 2180 for 7E2 didnt have any values, I edited those (the 7E2 was treated as exponent also) and logged them as well. But there was only 4 of them?

    Actually, I just logged them all (my wife thinks I am crazy, I've gone in and out of the house 3 times to finish the logging). Here they all are. Hopefully they all have the correct data.

    Thanks!

    http://www.tracksyde.com/forum/pip/torque_pip2.zip
     
  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
    Once we have the gauges working, you'll get to show the $20 hardware that was used to reverse engineer the Prius PHV CAN Bus.
     
  12. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    Thanks! I 've all the values now. It seems the PID map are similar to the Gen3.

    I do not have the Repair Manual so I 'm guessing the 56 cells are grouped into 4 cells per block with nominal voltage of 14.8V per block. So it has the same 14 blocks as Gen3?

    Anyway, I've added some more PIDs for other ECUs and I've also fixed my spreadsheet to prevent the same exponent issue. Do let me know if any of them are not working.

    Vincent
     
    1 person likes this.
  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
    What is the difference between these two? The top one is Power Resource IB in Gen III Prius.

    Column 1
    0 Batt Pack Current Val Batt Pack Current 2198 (A * 256 + B ) / 100 - 327.68 -160 160 Amperes 7E2
    1 Power Resource IB Batt Current 218A (A * 256 + B ) / 100 - 327.68 -200 200 Amperes 7E2
     
  14. Tracksyde

    Tracksyde Member

    Joined:
    Sep 21, 2011
    1,429
    761
    0
    Location:
    So Cal
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Thanks, Vincent.

    I will load it up and try a few on the way home today. I'll let you guys know how it goes.
     
  15. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    There is a HV Battery Current Sensor, which is built into the HV junction block assembly, is used to detect the HV battery charged and discharged amperage. The Battery Smart Unit monitors this sensor and reports the amperage as Batt Pack Current Val to HV CPU via serial link.

    There are Inverter Current Sensors in the Inverter with Converter Assembly that detect the amperage of the three-phase alternating current for MG1 and MG2. This actual amperage, Power Resource IB, is used as feedback by the MG ECU to HV CPU.

    When the shift position is in [N], the IGBTs are switched off so Power Resource IB will be 0 but Batt Pack Current Val will still show some current discharging to the DC-DC Converter for the 12V electrical load.

    All these PIDs are actually meant for Gen III. I changed the name to be in line with TS, not because PiP is different.

    Vincent
     
    1 person likes this.
  16. Tracksyde

    Tracksyde Member

    Joined:
    Sep 21, 2011
    1,429
    761
    0
    Location:
    So Cal
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Ok, when I left work, my G1's battery was almost dead. I got an Android tablet from work to play with, but that was dead too. However, I was able to log some data on a short trip out this evening. I didnt have any gauges up because I wanted to test the logging. I logged MG1 Torque, MG2 Torque, and Power Resource IB.

    I'll try logging with the Android tablet tomorrow. Any suggestions on what to log?

    Here's what USB suggested to me earlier:

    - State of Charge
    - MG1 torque
    - MG1 revolution
    - MG2 torque
    - MG2 revolution
    - Engine Speed (RPM)
    - Power Resource IB
    - Coolant Temperature
     

    Attached Files:

  17. Tracksyde

    Tracksyde Member

    Joined:
    Sep 21, 2011
    1,429
    761
    0
    Location:
    So Cal
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Vincent,

    You list and mentioned the configurable items (the ones highlighted in orange). Can I use these somehow in Torque? For example, if I wanted to turn off the seat belt reminders, how could I use Torque to do that?

    Thanks again for all your help
     
  18. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    You can use it just like other PIDs but I 'm not sure about the correct response from Torque. Please try it and tell me what is the reply from Torque. If it doesn't work, you can try USB's method in post #20.

    Edit: When Torque send the command, 3BA700, to the ECU, it will response with 7BA7 if successful. However, 7BA7 is the header bytes which cannot be displayed by my method.

    Let's take another e.g. 21A7 (SBB Query). The response will be 61A700 if the seat belt beep has been disabled. 61A7 is the header and 00 is the data byte A. It will be no problem by my method because there is at least a data byte.

    You can still use my method but you need to send another SBB Query to verify whether it is successful or not.

    Vincent
     
    1 person likes this.
  19. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    It appears that I was wrong on the grouping of cells. Could you help to test 2181 using USB's method, I need the header+data to decode the block voltages.

    Vincent
     
  20. Tracksyde

    Tracksyde Member

    Joined:
    Sep 21, 2011
    1,429
    761
    0
    Location:
    So Cal
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Ok, I will test it tomorrow and report back.