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

ScanGuage AE Pig-tail, code flasher, and TechStream

Discussion in 'Generation 1 Prius Discussion' started by bwilson4web, Jun 11, 2010.

  1. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,123
    15,389
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    Thanks to w2co and friends, my new OBD pig-tail adapter works:
    [​IMG]
    Features

    • Passes only ISO 9141 signals K and L, ground and B+ to scanner
    • Connects Ts, Tc and chassis ground to miniature audio plug to trigger two-code flash or error code clearing
    ISO 9141 Signals

    The pig-tail keeps any extra signals from the NHW11 diagnostic plug from the OBD scanner. This reduces noise to the OBD scanner and protects the NHW11 from OBD signals that might spike or confuse the vehicle. The following table shows the signals passed:
    Column 1 Column 2 Column 3 Column 4
    0 pin signal
    1 4 chassis ground
    2 5 signal ground
    3 7 ISO 9141 K-line data signal
    4 15 ISO 9141 L-line data is active signal
    5 16 battery voltage 12 V
    No other signals pass between the scanner and vehicle.

    This pig-tail solves the problem of Auto Enginuity inducing false codes. It also stopped the mystery hangs.

    Since the ZVW30 uses a different pair of signals, I'm planning to add a 4-pole, double throw, slide switch so it can work with both the NHW11 and ZVW30. It is very likely that the ZVW30 and NHW20 are using the same signals.

    Code Flash and Clear

    There are two signals used to trigger flash of the two-digit error codes; Tc, triggers flashing the error codes, and; Ts clears the code when tied to chassis ground. The mini audio jack connects to a momentary toggle switch, (on) off (on). This allows reading major error codes went an OBD scanner is not available or does not have enough support to read all codes:
    Column 1 Column 2
    0 pin signal
    1 4 chassis ground
    2 13 Tc tied to ground causes ECUs to flash two digit codes
    3 14 Ts tied to ground causes ECUs to clear codes
    These two signals are documented for the ZVW30 and probably work on the NHW20. This may be a universal code reader for all North American Prius.

    PARTS

    • Cable, J1962M to 2-J1962F, Splitter Cable, 1ft (145802) - I cut off and used the second J1962F as the female, pig tail. Estimated cost, $13 w/o shipping.
    • J1962 Male Connector - bought on Ebay. Estimated cost, $2 w/o shipping.
    • mini stereo audio connector - junk box. Estimated cost, $2 (option 1)
    • mini stereo audio jack - junk box. Estimated cost, $2 (option 1)
    • momentary toggle (on) off (on) - Estimated cost, $5 (option 1)
    • 4 ft., three conductor wire - Estimated cost, $0.40 (option 1)
    • housing for switch - Estimated cost, $5.00 (option 1)
    • multi-pole, double throw switch - Estimated cost, $5.00 (option 2, untested)
    I've listed the parts with two options:

    1. Tested, this option brings Tc and Ts to a switch so the connector can use the built-in, code flash and reset function.
    2. Untested, this second option allows Tc and Ts to be flipped back as well as any other signals that might be needed for other cars (aka., ZVW30).
    I built the prototype from junk box parts but if anyone would like one, send me a PM and based upon current parts costs, I'll work up the price. Currently, these look to be ~$50-75 or just 'roll your own.'

    Bob Wilson
     
  2. hobbit

    hobbit Senior Member

    Joined:
    Mar 23, 2005
    4,089
    468
    0
    Location:
    Bahstahn
    Vehicle:
    2004 Prius
    Model:
    N/A
    I think you've got the functionality of Tc and Ts flipped around,
    but yes, this seems like a useful thing. Tc/Ts are also definitely
    utilized in the NHW20, particularly for brake diagnosis. Do you
    know exactly which extra signal was screwing up your interaction
    with the NHW11? I've used my AE on it and didn't have any issues
    other than the previously mentioned byte-ordering screwups..
    .
    _H*
     
  3. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,123
    15,389
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    Thanks! It was very early in the morning when I got back from the first test run.
    I'm not sure. Out of 16 pins, now there are just 5 pass through. But having Ts and Tc exposed to an OBD scanner that might consider them 'fair game,' these would be my leading suspects.

    Since it looks like the ZVW30 uses OBD bus signals, I'm thinking of adding a 4-pole, double-throw slide switch so it can be either an NHW11 or ZVW30 pig-tail. I suspect the NHW20 and ZVW30 use the same set of pins.

    Bob Wilson
     
  4. hobbit

    hobbit Senior Member

    Joined:
    Mar 23, 2005
    4,089
    468
    0
    Location:
    Bahstahn
    Vehicle:
    2004 Prius
    Model:
    N/A
    Nemmine, I found that other thread where someone explained that
    the CAN communication attempt down 6 and 14 confused the NHW11.
    Not entirely a surprise, but what did Toyota hang off those pins
    that basically violates the standard? CAN and the spec on what
    pins it uses was out by that point, they should have known better.
    .
    Locking to the right protocol in AE *should* prevent that, but
    ya never know. The interface is probably still going to bring
    some sort of voltage onto those pins at some point.
    .
    _H*
     
  5. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,123
    15,389
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    Ts is on pin 14 and pin 6 is tied to the air bag ECU:
    [​IMG]

    Bob Wilson
     
  6. w2co

    w2co Member

    Joined:
    Dec 11, 2009
    366
    81
    0
    Location:
    Longmont, CO.
    Vehicle:
    2006 Prius
    Model:
    N/A
    Great job Bob! So the cable solves the AE spiking problems for you that's great! And what hobbit says I also agree with "Locking to the right protocol in AE *should* prevent that" as I have not had
    any problems with AE on either the gen2 or gen1 yet, however I always initialize the interface before connecting to the car. Actually guys the reason we found this "can" pin conflict in gen1's was from trying to make a scangaugeII work reliably on the gen1 - a problem I've been hunting for some time now, but with the help of a few others here on pc we found it. Thanks pc
     
  7. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,123
    15,389
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus


    I just passed through "Prius Electrical Wiring Diagram 2003 Model", EWD493U, to find all signals connected to the 'Data Link Connector', which we've been calling the OBD connector:
    Column 1 Column 2 Column 3 Column 4 Column 5 Column 6 Column 7 Column 8 Column 9
    0 pin label ECU(s) Comments
    1 4 CG J11 chassis ground
    2 5 SG EB signal ground
    3 6 AB Airbag
    4 7 SIL HV Engine EMPS Airbag Brake K-line ISO 9141[/B]
    5 8 OP3 HV
    6 11 OP1 Transponder
    7 12 OP2 HV
    8 13 TC HV Engine EMPS Airbag Brake flashes two-digit codes
    9 14 TS EMPS Brake clears codes
    10 15 WFSE HV L-line ISO 9141[/B]
    11 16 BAT OBDI 7.5A fuse
    The bold text are passed by the pig-tail. The blue text are accessed via the audio connector.

    The pig-tail does not pass four signals but apparently the Auto Enginuity doesn't care. What these four signals do is not yet documented.

    What is interesting is pin 15, WFSE or L-line ISO 9141, was necessary to get Auto Enginuity to work. Yet this signal connects only to the HV ECU. In contrast, the K-line signal connects to five ECUs. The battery ECU communicates only via the HV ECU.

    Bob Wilson
     
  8. hobbit

    hobbit Senior Member

    Joined:
    Mar 23, 2005
    4,089
    468
    0
    Location:
    Bahstahn
    Vehicle:
    2004 Prius
    Model:
    N/A
    Okay, yeah, I found the same diagram and obviously when you fire
    random stuff down pins 6 and 14 thinking it's the CAN bus, a
    car that uses those pins for something else goes "huh??"
    .
    See, this is why the whole OBD-II thing is such a standards,
    or lack of standards, nightmare. If the internet had developed
    the same way this crap has we would not even be close to being
    able to toss this stuff around on Priuschat.
    .
    _H*
     
  9. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,123
    15,389
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    As I look at the signals, I'm wondering if 'OP2' and 'OP3' might be CAN? Since these are open in the pig-tail, it might be worth while to experiment and jumper them to:

    • pin 6 - CAN high - pin 8 - OP2
    • pin 14 - CAN low - pin 12 - OP3 (or reverse)
    In a world of GOOD, FAST, or CHEAP, pick two, FAST and CHEAP win often enough to keep me busy.

    Bob Wilson
     
  10. w2co

    w2co Member

    Joined:
    Dec 11, 2009
    366
    81
    0
    Location:
    Longmont, CO.
    Vehicle:
    2006 Prius
    Model:
    N/A
    It's no wonder the airbag didn't pop out with all the commotion, and that probably explains the ABS warnings on p14. I don't think CAN is available in this or earlier models, not until 04 on..but not positive of this yet. I was thinking of building a switchbox where one could switch any pins to any other pins, in this way one could try the HV pins like 8 & 12. Still have to characterise all sigs w/O-scope. Of course one would have to set the switch settings before connecting to the sys. Just an idea.
     
  11. jk450

    jk450 New Member

    Joined:
    May 11, 2005
    596
    54
    0
    They didn't violate the standard. The Gen 1 Prius ceased production in 2003; the CAN standard was mandated for North American market light-duty vehicles beginning with model year 2008, a full five years later.

    No. See above.

    Properly designed and built scan tools do not have such issues.
     
  12. w2co

    w2co Member

    Joined:
    Dec 11, 2009
    366
    81
    0
    Location:
    Longmont, CO.
    Vehicle:
    2006 Prius
    Model:
    N/A
    "They didn't violate the standard. The Gen 1 Prius ceased production in 2003; the CAN standard was mandated for North American market light-duty vehicles beginning with model year 2008, a full five years later." Thanks for that info jk450, but my 06 is definitely in can bus mode, however you are correct in that all north american vehicles had to meet those requirements by 2008. Some did earlier than others I guess.
    On another note, Bob I bet pin 11 is how the dealer programs a new key fob for gen1's.. something they charge bucu-bucks to do.
     
  13. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,123
    15,389
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    Very likely. I'd sure like to find out if OP2 and OP3 are CAN. Of course they could be a second ISO 9141, K and L lines:

    • CAN - 120 ohm termination resistors
    • ISO 9141 (?) - need to check
    I wired jumpers from the HV OP2 and OP3 signals out to the AE CANHi and CANLo lines. Before 'wrap' splicing, I measured the vehicle and ProLine on voltages and saw a wandering, ~30 mv. on each. So I powered down the car and tested:

    • OP2-CANHi and OP3-CANLo :: "Auto detect" called it ISO-9141 and connected.
    • OP3-CANHi and OP2-CANLo :: "Auto detect" called it ISO-9141 and connected.
    I'll fold the jumper lines inside the hood in case someone has another test they'd like to see. Right now, OP2 and OP3 remain undefined.

    Bob Wilson
     
  14. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,123
    15,389
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus


    I have 'lessons learned' to share:

    1. Mac polling is fast enough - it samples at 44.1 kHz and the data bits are 10.4 kbs
    More details. Found this:
    Second article for Evaluation Engineering

    Both the K and L lines were captured. Only the K-line, pin 7, provides data. Operation requires the ProLine side to assert the L line:
    [​IMG]
    It looks like a request and response takes about 300-350 milliseconds.

    What we appear to see are individual bytes with a considerable amount of dead-space between. We can see six bytes followed by a ten byte response:
    [​IMG]

    Here is the last byte followed by the first byte of the response. Now the first series of bytes probably came from Auto Enginuity and I have no interest in these values. I am perfectly content to let Auto Enginuity trigger the Prius response. However, the Prius response is interesting:
    [​IMG]

    So when we expand the Prius response, we find multiple sample points:
    [​IMG]

    By laying this over a graph showing the Mac sampling points and Prius data points, it becomes entirely possible to use the Mac audio recording to extract the bytes:
    [​IMG]
    Based upon the earlier URL: 0001 0110 or 0x16:
    xxxx xxxx START - first line
    xxxx xxx0 START - Bit 0
    xxxx xx10 START - Bit 1
    xxxx x110 START - Bit 2
    xxxx 0110 START - Bit 3
    xxx1 0110 START - Bit 4
    . . .
    0001 0110 START - Bit 7
    So it looks entirely feasible to decode the Prius responses and see if we can figure out the disconnect between the Prius response and the Auto Enginuity text values reported. Hopefully, we can send them an exact description of the problem.

    Bob Wilson
     
  15. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,123
    15,389
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    I'm still not happy with this result:
    Column 1 Column 2 Column 3 Column 4 Column 5 Column 6 Column 7 Column 8 Column 9 Column 10 Column 11
    0 time d7 d6 d5 d4 d3 d2 d1 d0 func
    1 0.032539683 1 0 0 0 0 1 0 0 format 0x84
    2 0.043219955 1 1 1 0 0 0 1 0 dest 0xE2
    3 0.053469388 1 1 1 1 1 1 0 0 source 0xFC
    4 0.063809524 1 1 0 0 0 0 0 0 cmd 1 0xC0
    5 0.074331066 1 1 1 1 1 1 0 0 cmd 2 0xFC
    6 0.084580499 1 1 1 0 1 0 0 1 crc? 0xE9
    7
    8 0.127210884 1 1 0 0 0 0 1 0 format 0xC2
    9 0.132494331 1 1 1 1 1 1 0 0 dest 0xFC
    10 0.137777778 1 1 1 0 0 0 1 0 source 0xE2
    11 0.14276644 1 1 0 1 0 0 0 0 cmd 1 0xD0
    12 0.148049887 1 1 1 1 1 1 0 0 cmd 2 0xFC
    13 0.153809524 1 1 1 1 1 1 1 1 0xFF
    14 0.158888889 1 1 1 1 1 1 1 1 0xFF
    15 0.163968254 1 1 1 1 1 1 1 1 0xFF
    16 0.169160998 1 1 1 1 1 1 1 1 0xFF
    17 0.173582766 1 1 1 1 0 0 1 0 0xF2
    Audio recorded, software and spreadsheet decoded.

    The first byte of the first command looks OK. The 0x84 corresponds to the correct format and byte length. But the response looks more like an error being returned. The 0xC2 is is a functional response. Off hand, it looks like an error response more than anything else.

    Bob Wilson
     
  16. oldnoah

    oldnoah Member

    Joined:
    Aug 21, 2010
    187
    53
    0
    Location:
    New York
    Vehicle:
    2001 Prius
    Model:
    N/A
    I'm not sure where to start here. I've found a lot of discussion of scanners in various threads, but the discussion always seems to assume previous knowledge of what is being discussed.

    I bought a scangauge II, but it hasn't arrived yet. Am I going to be able to use it when it arrives? Do I need to order parts for this pigtail? What information can I expect to be able to get out of it? Is there a thread that starts at the beginning?
     
  17. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,123
    15,389
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    We don't yet know all of the answers and in many respects you are reading our 'lab notes.' But I'll try to help:
    You'll be able to use it but the Scangauge works a lot better with just four of the eight, RJ-45 signals:
    1 - ground
    6 - K-line, the command and data bus line
    7 - L-line, status from Scangauge to vehicle
    8 - B+, 12 V
    I took an old ethernet cable and cut it in half. Then using an RJ-45 female, punched down just four wires, verified continuity, and used JB Weld to anchor the cable in the connector:
    [​IMG]
    Thanks to w2co and vincent1449p who provided initial data.

    Right off the bat, you'll be able to read the error codes but to get detailed data about your traction battery, you'll need to program some XGAUGE values using vincent's table:
    http://priuschat.com/forums/generat...-classic-prius-scanguageii-4.html#post1161266

    Don't let the table intimidate you. The programming is fairly straight forward but a pain in the nice person because it has to be done in the car . . . unless you add a trick vincent came up with.

    The Scangauge has to initialize the ISO-9141 bus before it supports programming. What vincent did was put a blocking diode on a 9 volt battery tied to the B+, pin 8. He can go to the car, plug in and start the car. The Scangauge initializes the ISO-9141 and then he connects the 9 V battery. At that point he can remove the scangauge powered by the 9 V battery and take it into the house to program up as many XGAUGEs as he needs.

    I've got the parts to make another one. If you'd like, send me a PM with an address and I'll fabricate, test and mail one to you. Once you're sure it works, send me $10 or the part and we're even. I can get it in the Saturday mail so it should be there early next week.

    The fancy box I described in the "Scangauge" thread is designed to let me use my laptop as an ISO-9141 analyzer and investigation tool.

    Bob Wilson
     
  18. oldnoah

    oldnoah Member

    Joined:
    Aug 21, 2010
    187
    53
    0
    Location:
    New York
    Vehicle:
    2001 Prius
    Model:
    N/A
    Wow. Are you Santa Claus?
     
  19. w2co

    w2co Member

    Joined:
    Dec 11, 2009
    366
    81
    0
    Location:
    Longmont, CO.
    Vehicle:
    2006 Prius
    Model:
    N/A
    Bob,
    Concerning the one zoomed in pic of three transitions (2bit,1bit,3bits),
    it looks to me that if there were any jitter (as little as .00005s) it would cause a sample error on the shortest transition. The 44.1khz sample rate needs to be faster in order to consistently have at least one "1" logic sample/transition even with the shortest (1 bit) transitions. Perhaps a 96khz sample rate on the audio in would help. I have an A/D sampling card that goes up to 500khz sample rate, but it only runs in WIN2K. This may be why your data is behaving strangely. BTW great job helping oldnoah -thanks

    [​IMG]
     
  20. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,123
    15,389
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    Just a well stocked junk box. <grins>

    I've got to run an errand but let me know. I have one already and I can add the diode and 9 V connector. But if you are interested, I'll make another and photograph the assembly. You could then round-up the parts and make a functionally identical part.

    Bob Wilson