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

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

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

  1. 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
    mpg, km/l and l/100km are not custom PIDs. I believe they come with Torque software. I believe they are designed for regular cars that doesn't come with instant consumption display. I am not sure how the author coded it and I have never used them.
     
  2. 2009Prius

    2009Prius A Wimpy DIYer

    Joined:
    Mar 25, 2009
    2,705
    510
    63
    Location:
    USA
    Vehicle:
    2009 Prius
    Thanks! So I suppose you haven't added fuel consumption formulas to the Prius csv files yet?
     
  3. Jaquimo

    Jaquimo Paraglider, Prius glider...

    Joined:
    Jan 22, 2011
    96
    38
    0
    Location:
    Bloemfontein, South Africa
    Vehicle:
    2009 Prius
    Model:
    N/A
    Thanks USB. I believe you are quite right in that the Torque app uses the information obtained from different PIDs like vehicle speed and fuel flow rate to calculate the fuel consumption. What I think is that the Torque app uses mode 01 by default while most of the Prius PIDs needs to be sent with mode 21 and this may cause the app not to receive any information that it can use to calculate the fuel consumption.

    If there is anyone on this forum using Torque on a Gen2 Prius, I would appreciate if you could let me know if Torque can display the MPG, l/100km or km/l values from your Prius.

    2009Prius, thanks for the assistance. For interest's sake, do you use the mode 21 PIDs to collect the information needed to calculate the fuel consumption in PriiDash?
     
  4. Jaquimo

    Jaquimo Paraglider, Prius glider...

    Joined:
    Jan 22, 2011
    96
    38
    0
    Location:
    Bloemfontein, South Africa
    Vehicle:
    2009 Prius
    Model:
    N/A
    Something else that I just thought about that might tie on with my notion of Torque using the default mode is the fact that Torque never gets to the stage where it indicates "Connected to ECU" like when I connect to other vehicles. Instead it stops at "Checking model" when connecting to the Prius' ECU. I thought about setting the custom header in the vehicle profile to something that might enable mode 21 instead of mode 01. Any suggestions on how to do that will be welcome since I could not find anything on that on the Torque forum. I did find some info on setting custom headers for Japanese vehicles and I will try that to see if it makes any difference.
     
  5. 2009Prius

    2009Prius A Wimpy DIYer

    Joined:
    Mar 25, 2009
    2,705
    510
    63
    Location:
    USA
    Vehicle:
    2009 Prius
    OK I just checked how I did the fuel consumption in PriiDash and it is using one of the passive messages. Is Torque able to use passive messages? If not then I need to dig further - I think there is an active message for fuel consumption as well. By the way I did play with standard OBD estimation of fuel consumption and it worked reasonably well. Assuming Torque's built-in MPG function is doing the same thing, you ought to be able to just use it as is. Check if you can get the Torque to report standard OBD info such as engine load, RPM, and coolant temperature using Torque's built-in functions.
     
  6. 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
    That's strange. Do you have auto protocol detection (default)? If the auto detection gets stuck, try manually setting it to ISO 15765-4 CAN (11 bit, 500k). That's the one that works for US Prius.

    If that doesn't work, try 29 bit one and others.
     
  7. milleniaman

    milleniaman Junior Member

    Joined:
    Sep 20, 2011
    61
    5
    0
    Location:
    TN
    Vehicle:
    2005 Prius
    Jaquimo
    I tested my 2005 as you suggested and got no readings. I'm interested to see how this turns out
    JohnC


    S2
     
  8. Jaquimo

    Jaquimo Paraglider, Prius glider...

    Joined:
    Jan 22, 2011
    96
    38
    0
    Location:
    Bloemfontein, South Africa
    Vehicle:
    2009 Prius
    Model:
    N/A
    JohnC,

    I've sent an email to Ian the developer of Torque stating the following:
    "I am using Torque with my 2007 Prius and the extended PIDs with a request mode value of 21 works fine. Unfortunately the built-in PIDs using the default request mode (01 I think?) does not function with my vehicle. I would very much like to use the built-in fuel consumption and other gauges that you have already put in Torque in order to log these values as I drive."

    Ian then responded with:

    "You've touched on something I'm looking at for another user as well (older Fords that don't support mode 01) and some VW users (who don't have OBD2 at all) - I'm actively looking on this so you should see some movement in the next few updates"

    Hopefully it will be available soon:)(y)

    In the meantime I have played around a little bit and build my own fuel consumption PID by combining the Injector Period, Engine RPM and Vehicle Speed. It may not be 100% accurate but it gives a close approximation of the fuel consumption indicated on the MFD and I should be able to log it along with the other values that I want to use in order to assist me in creating (3D) graphs of the efficiency of the engine under various conditions.
    Name............ ECU. Mode. PID. Formula
    ----------------+----+-----+----+--------------------------------------------
    ICE RPM......... 7E0. 21... 0C.. ((A * 256) + B) / 4
    Vehicle speed... 7E0. 21... 0D.. A
    Liter per hour.. 7E0. 21... 13.. (((C*0.128*4)*VAL{ICE RPM})*60/1000000*1.5)
    Liter per 100 km 7E0. 21... 0D.. VAL{Liter per hour}*(100/A)

    While this may work there are a lot of the built-in PIDs like trip and average measurements that I really would like to use but for me to try and figure it all out may just be asking a little too much.
     
  9. 2009Prius

    2009Prius A Wimpy DIYer

    Joined:
    Mar 25, 2009
    2,705
    510
    63
    Location:
    USA
    Vehicle:
    2009 Prius
  10. 2009Prius

    2009Prius A Wimpy DIYer

    Joined:
    Mar 25, 2009
    2,705
    510
    63
    Location:
    USA
    Vehicle:
    2009 Prius
    Good work! :)

    Sorry for the double posting ... I was greeted with "Unspecified error" after the first click. After the same error message popped up again I refreshed the page and ended up with the double posts.
     
  11. KhaPhoRa

    KhaPhoRa Member

    Joined:
    Feb 7, 2013
    168
    37
    0
    Vehicle:
    2006 Prius
    Model:
    II
    USBSeaWolf2000: thank you for your work and time in getting all this working. I've been reading here and on Ian's board and can't wait for my elm327 to arrive! I have noticed one small typo in your csv for the gen2 prius (it may be just an old version I found). The Title for Internal Resistance 6 says 8, which causes Torque to skip the real Internal Resistance 8 when importing. No biggie, just thought I'd mention it. Thank you again for all your efforts (and Prius2009 and everyone else!)
     
  12. SteveWlf

    SteveWlf Old-on-Hold

    Joined:
    Oct 20, 2012
    262
    33
    0
    Location:
    Montesano, WA
    Vehicle:
    2007 Prius
    Model:
    II
    As I mentioned recently, I finally got Torque PO installed on my Levovo tablet. Really looking forward to getting it running in my '07 Prius.
    I had been 'threading' my way through these 19 pages (371 posts) trying to learn about how to make this all work. I guess I jumped too soon and ordered a ElM327 USB OBD adaptor before I read some uncomplimantary remarks about it. The in the APP store I find further unfavorable remarks as well, even another app just to help with the problems.
    Anyway, it arrived today and even though my Android says it is Paired "ELMo" just hangs there with only the red light on and won't respond to any attempts to communicate. Torque says it isn't communicating. I have tired fast or slow speed with not change. There is no documentation except for the CD and all it has is Windows drivers and stuff. Nothing for the Android.
    Never had any trouble with Blue Tooth devices before with my Android.
    Also, I am unhappy that it is TOO big and hangs down where my right leg might bump it while driving.

    I'm ready to call it a bad choice and wanted to ask about another make. Any recommendations??
    And if they all are as long as ELMo then maybe I should look for a OBDII extention cable to get it out of the way??

    Thanks,
    Steve
     
  13. KhaPhoRa

    KhaPhoRa Member

    Joined:
    Feb 7, 2013
    168
    37
    0
    Vehicle:
    2006 Prius
    Model:
    II
    I was surprised at the size of my wifi obd2 as well.. I have a smaller Bluetooth one on the way, hopefully it'll work with my android. Sadly the wifi/ios route is a waste imho unless you just want basic info as i have yet to find an app that supports custom pids, so to Android I go for my monitoring. I also ordered this: Extension Car Cable OBD II OBD2 16pin Male to Female Diagnostic Extender 100cm | eBay to get it out of the way as I really don't want to kick it and break something. The plug looks short enough that it shouldn't be in the way. Here is my screen I'll use for testing hv battery under load. I can't wait! I wish I could plot the min and max block voltage on one graph in app, but I'll just log the data and do it after. I've only had this car for a few weeks, but it is easily my favorite car I've owned (this coming from a 6'4" 300lb republican in Texas!)
     

    Attached Files:

    pascoprius likes this.
  14. Jaquimo

    Jaquimo Paraglider, Prius glider...

    Joined:
    Jan 22, 2011
    96
    38
    0
    Location:
    Bloemfontein, South Africa
    Vehicle:
    2009 Prius
    Model:
    N/A
    Steve,

    Did you see my post about the problems I had with my ELM327 adapter here? The way to check the plug for a similar problem is to take long-nose pliers and see if you can push or pull the metal pins of the OBD2 connector in or out. On the adapter that I am still using the pins could be pushed back into the adapter when pushed with the pliers. This problem caused all kinds of intermittent problems like not communication with the adaptor or ECU or not powering up.

    Once I pulled the connector pins into their proper place and permanently fixed them with super-glue I have not had any troubles since.

    Hope this helps
     
    SteveWlf likes this.
  15. SteveWlf

    SteveWlf Old-on-Hold

    Joined:
    Oct 20, 2012
    262
    33
    0
    Location:
    Montesano, WA
    Vehicle:
    2007 Prius
    Model:
    II
    Ye
    Yes, I got that far into this topic thread shortly after I had ordered OBDII to BlueTooth on ebay. That being the ELM 327.
    I just checked the pins with my needle nose pliers and found about 6 that moved about 1/16". Not sure if that is what you found but they certianly aren't making good contact on a circuit board inside. I'll file a complaint on Ebay and see where that goes. In the mean time I will look for a better one.

    Thanks
    Steve
     
  16. milleniaman

    milleniaman Junior Member

    Joined:
    Sep 20, 2011
    61
    5
    0
    Location:
    TN
    Vehicle:
    2005 Prius

    Congratulations on your prize. I have had a 250 kmile 05 for 8 months and am still thrilled.
    The battery is a big concern and I will be posting my data shortly. Regarding graphing; You can overlay gauges in torque so you can get a visual comparison of vBmax and vBmin. I found that mine were almost always within .2v but my battery seems weak just the same. My block voltages and resistances did not yield any clues. I have overlayed 3 or more graphs. Just edit the properties for range and titles to organize and reduce clutter. For battery load testing I used Bob Wilson's suggestion to reverse against a curb starting with a fully charged battery. There is a discussion on PC about this from last fall but I don't have the link. I would love to compare results with others. My battery only lasted for a minute or so under a load of 25 amps average. That seems to be the main problem I have. Capacity. I don't understand capacity very well as none of the pids address it directly.
    Luscious Garage | Blog | High Voltage Battery Test - Prius Hybrid et al.

    Good luck,
    John C
     
    KhaPhoRa likes this.
  17. SteveWlf

    SteveWlf Old-on-Hold

    Joined:
    Oct 20, 2012
    262
    33
    0
    Location:
    Montesano, WA
    Vehicle:
    2007 Prius
    Model:
    II
    First, let me say, as a total Newbie to Torque and Android, I really apprediate the App and the PIDs that are not only offered but supported here. Some of the discussions are, at present, beyond my comprehenion but I'm a fast learner. This thread has been an interesting and informative 'read'.

    I finally got my ELM 327 working and the basic Torque seems to be working fine. I then followed the OP instructions, finding the ".torque/extendedpids" folder already existed. I moved the Excel spreadsheed (saved using CSV) but, following the "Menu -> Settings -> Manage extra PIDs/Sensors -> Menu -> Add predefined set" steps, I don't get any display of the custom PIDs. I haven't figured out how to copy the Google (PDF) spreed sheet to that directory yet.
    I apologize again, being a Newbie in here. I have already gained some knowledge and if you all will be patient, I think I can get this all working.

    Thanks,
    Steve
     
  18. KhaPhoRa

    KhaPhoRa Member

    Joined:
    Feb 7, 2013
    168
    37
    0
    Vehicle:
    2006 Prius
    Model:
    II
    Try downloading the file again from http://priuschat.com/attachments/usbseawolf2000-gen2-prius-1-11-12-zip.41200/ I have read over on the torque forum of some people having issues if they open and resave the csv using excel, so if you did that it may be an issue. To edit the file (if you need to) I use ES File Explorer successfully (I also used that app to move the file to the appropriate directory). Your steps above to add thr custom pids are correct, so you should see "USBSeawolf2000 Gen2 Prius...." as a vehicle manufacturer/model as long as the file is present and formatted appropriately.
     
  19. milleniaman

    milleniaman Junior Member

    Joined:
    Sep 20, 2011
    61
    5
    0
    Location:
    TN
    Vehicle:
    2005 Prius
    [
    I finally got my ELM 327 working and the basic Torque seems to be working fine. I then followed the OP instructions, finding the ".torque/extendedpids" folder already existed. I moved the Excel spreadsheed (saved using CSV) but, following the "Menu -> Settings -> Manage extra PIDs/Sensors -> Menu -> Add predefined set" steps, I don't get any display of the custom PIDs. I haven't figured out how to copy the Google (PDF) spreed sheet to that directory yet.
    Thanks,
    Steve[/quote]

    I had the same problem and solved it eventually but now can't remember how. Some tweak that is not mentioned in the instructions pertaining to the save or import dialogue. You might try different options when you import the csv file and then resave it.
    John
     
  20. SteveWlf

    SteveWlf Old-on-Hold

    Joined:
    Oct 20, 2012
    262
    33
    0
    Location:
    Montesano, WA
    Vehicle:
    2007 Prius
    Model:
    II
    I had previously been working in Windows on my PC and was moving the unzipped file to the Android with the windows file manager. It easily showed the hiden .torgue files. Might be the problem. However, I am now trying ES File Explorer and can't see anyway to tell it to show hiden file folders. There for I can move the .CSV file to the .torque/extendedpids folder.
    What is the trick to show hidden files in ES File Explorer?

    Steve