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

Landspeed's HV battery + ECU teardown, analysis, experiment, upgrade thread

Discussion in 'Gen 2 Prius Technical Discussion' started by landspeed, Feb 20, 2019.

  1. DivideByZer0

    DivideByZer0 Member

    Joined:
    Sep 13, 2017
    67
    91
    0
    Location:
    San Francisco, CA
    Vehicle:
    2005 Prius
    Model:
    Touring
    This is awesome; I've done some reverse engineering myself when I can find an excuse to do it, on software applications and even a little on embedded firmware. The idea of reverse engineering the Prius ECUs has always been very interesting to me, but a bit out of reach. I'd love to help in any way I can, although I'd probably be most useful on the software or testing side of things; my EE experience is pretty shaky although I can solder up debug ports and interface with them (y)

    In particular, I'm very interested in being able to have a "performance mode" switch, by that I mean being able to charge the battery minimally so that you are able to put whatever power available into the wheels at that time. Maybe there's a better way to conceptualize such a mode, but this seems to be one of the main complaints and discouraging elements about possible Prius performance modifications: "any extra power you create is just going to to go charging the battery". Well, you will charge the battery faster and have more power available sooner, but it's not ideal for going fast when you want to go fast (or having a responsive car when the Prius has decided that it's charging time and you need to get caught up with traffic)

    The other possibility is tuning/fuel remapping, and also changing the RPM limit. I guess there are a few hacky ways to do this, typically by spoofing sensor readings, but being able to directly and reliably alter the fuel-air mixture opens the door to more performance oriented modifications. For one thing, putting a 1NZ-FE engine from an Echo or Yaris on the Prius very well may be feasible, and being able to run that within its normal fuel and RPM parameters would make it a lot more effective. Not to mention that there are 1NZ-FE turbochargers out there...

    I'm in the process myself of doing a head swap from an Echo engine onto my Prius, which will provide a 13:1 compression ratio using Echo cams in conjunction with Prius pistons. Here's the topic: 1nz-fe Cam Swap | PriusChat

    I'll be following the topic, and I'm very interested and would be glad to help test out or even develop any ECU modifications.

    By the way, one crazy thought I had recently, was modding the nav ECU, so that you could have many controls on the screen at the same time. So having the audio EQ controls, radio preset buttons, climate controls, etc, all clustered on one mega-page. Of course this may very well be a pipe dream and would depend on how the menu code is set up.
     
    #21 DivideByZer0, May 2, 2019
    Last edited: May 2, 2019
    SFO and landspeed like this.
  2. landspeed

    landspeed Active Member

    Joined:
    Feb 25, 2007
    351
    198
    0
    I've thought about modding the nav ECU also; would need to figure out how it works (to complicate things, mine is more 'digital' and has draw commands send over the CAN bus I think, but earlier Gen II use a more 'basic' one which is like a computer monitor. The earlier one is more hackable as you could likely connect an alternate hardware such as a Raspberry Pi to it and maybe have a switch which flicks over to a super display mode. Will need to do more research into the differences between them and when the changeover occurred. My knowledge around this is from years ago, before I owned a Prius, and may well be totally wrong. But either way the nav ECU will still be a CAN-BUS device and be hackable!

    I need to learn more about the HSD; as a 'thought experiment', around increasing performance, if there was a transaxle (and inverter etc), that was infinitely strong, could not overheat, but it still had the max power output of the motors in the Prius, then I do know that the engine is connected to the wheels via the transaxle, with no direct connection between engine and wheels. If one was to combine the 'infinitely strong' transaxle with a 2000BHP engine, then the engine would be able to overwhelm the motors, which would then charge the battery by generating power (in their attempt to provide resistance against the engine and turn the wheels).
    - There would eventually be a point where the transaxle could not provide enough torque to 'counter' the engine; in addition to charging the battery a lot, there would be a point (ignoring overheating etc), where the transaxle would end up 'overspeeding' when the engine is at full throttle.
    - The question is - at what point would this actually occur? I am sure there is a good amount of 'headroom' to make the car faster.
    - If not, I wonder if anyone has swapped the biggest hybrid Camry engine into the Prius?

    Regarding the ECU emulator, I have reached a milestone, and a challenge.....
    1. I have managed to get to a point where all the setup code completes successfully and the ECU enters 'standard' mode
    2. The standard mode consists of enabling interrupts, and going into a loop. Waiting for interrupts.
    - This means I now need to examine the final state of the interrupt registers, setup etc, and start simulating interrupts, otherwise I can't get much further!

    The standard Camry ECU ROM file I have also enters the same loop, right after enabling interrupts, so the setup is indeed very similar for quite different ECUs (HSD vs non-hybrid Camry).
     
    DivideByZer0 and SFO like this.
  3. DivideByZer0

    DivideByZer0 Member

    Joined:
    Sep 13, 2017
    67
    91
    0
    Location:
    San Francisco, CA
    Vehicle:
    2005 Prius
    Model:
    Touring
    That's a good point about the nav ECU -- I seem to recall later Priuses having a different looking nav display. Looking at videos it appears that the new nav style was introduced in 2006. I thought I had noticed this in Ubers before... So it seems that only the '04 and '05 Priuses have the old nav ECU.

    You mentioned whether anyone had tried swapping a hybrid Camry engine (i believe a 2AZ-FE) into a Prius; unfortunately I don't think this is very likely to have been tried. I've been doing quite a bit of reading about the Prius and engine swaps recently. There's precious little information about this out there, just a lot of speculation. I did find one user, with 3 posts, who claimed to have swapped an Echo engine in without issue. And of course there is the "Landspeed" Toyota-built Prius. Putting a hybrid Camry engine in -- it's an interesting thought, but the questions that come to mind are, would the Camry engine need a Camry engine ECU? Would that talk to the other Prius ECUs? Would it be compatible with the HSD ECU? Otherwise, would the engine have the right set of sensors to even attempt connecting it to the Prius engine ECU? If swapping out the engine-specific ECU were feasible, that could be pretty incredible and open up a lot of options for modding.

    I think that mainly there is a lot of uncertainty about how the ECUs control the engine, the HSD, and the battery power, and whether such a task would be worth the effort, or even destroy one's Prius. This is probably a large reason that this hasn't been attempted -- why put in some engine if the ECU can't run it properly/might blow it up/might fry your transmission/might release the magic dust from this Very Special Very Uniquely Engineered Vehicle That Will Blow Up If You Touch Anything Under The Hood (although I haven't seen many posts like that lately)

    But in fact, we're just at the point where the Gen 2 Prius is reaching prices where it's pretty affordable to tinker around on. There are a ton out there and by say swapping an engine into a Gen 2 you aren't risking ruining their $20,000 car, or their $10,000 car, or (likely, depending on year and mileage) your $8000 car.

    As for the operating limits of the transaxle, I've heard of transaxle failures but not a ton. My intuition is that it should be able to handle some extra power. User Toyota Jesus has gone 20k miles on true 13:1 compression ratio, which is something. User @Justdidit has done a bunch of intake and exhaust mods without issue, but yeah I don't think anyone has really, really pushed it that I know of.
     
    landspeed and SFO like this.
  4. landspeed

    landspeed Active Member

    Joined:
    Feb 25, 2007
    351
    198
    0
    I’ve got to the point where I have some text based tools to look at interrupts; also I can manually set an interrupt to ‘call’, then trigger the interrupt once the ECU is ‘ready’. Only 6 interrupts are initially enabled, 1.66 UARTs (UART one and 2/3 of UART 2) and another thing. However most interrupt handlers are in place in the jump table, so, it seems likely the ECU dynamically enables interrupts as needed. It takes about a second to get to the ready state (using non-optimised BASIC). The next step is to implement the ‘PREPARE instruction; I am definitely getting deeper into the code.

    It would be amazing to get the simulator running, but, worst case scenario would be reverse engineering and flash reprogramming. Best case would be a simulation of the computers with sensors etc, and a way to reprogram over CAN with manual flash programming as fall-back. the lack of info on the system makes this a challenge but I am further than I thought I would get so far!

    I still need to crack the bizarre encryption on the CUW files, as that could get me an engine computer ROM (I only have HSD so far). The battery ECU is the most challenging since it will require a manual flash read; there were never any updates for it, and hence no CUW files...
     
    donbright, DivideByZer0 and SFO like this.
  5. landspeed

    landspeed Active Member

    Joined:
    Feb 25, 2007
    351
    198
    0
    More instructions implemented (including PREPARE). Learning more about many things. Whatever happens with this code, even if it is impossible to get the info to fully emulate all the peripherals, it will be possible to make 'source code', particularly helpful when many jumps are calculated at run-time (jump to register), so the code isn't easy to understand with a simple debugger.

    Current status:
    V850_undef_inst.jpeg
    I am adding features as needed; the status flags are still poorly emulated (better than before), but I refine areas of the emulation when I get infinite loops, or loops that overflow, or other things. I am going to use this simple UI for now as it helps to see what is going on. Currently, key '1' shows the active and inactive interrupts, and key '2' fires off an interrupt as 'hard coded' into the code (can be changed in seconds). I let it run in fast mode until the CPU is 'ready' (now takes about 1/3 of a second), then fire off said interrupt.

    This undefined instruction is currently annoying; the opcode '110010' would be simple, but the '00000' on either side mean that the manuals I have so far don't yet define it, at all. On an alternate note, I found a full documentation for the floating point instruction set, which is a bit more difficult to find. I don't yet have the SIMD instructions and they are only released to automotive manufacturers... [EDIT - it is the 'DISPOSE" instruction (one form of it), the opposite to PREPARE - 11001x and listed elsewhere hence the confusion!]

    The SoC only has a small amount of RAM, and is interesting to see how the stack moves up, as stacks are inclined to do. As a simple embedded SoC, the stack shares the linear RAM space with the other RAM data. If the stack was to get too big, it wouldn't be too good.

    There are already professional, and also open source, V850 simulators. However I will work on this one as it will be open source when it is worth anything to anyone (you need a Raspberry Pi, or just an Acorn Risc PC emulator) to use it. Also it is tailored to ECUs, and will allow several simulations to run at once to simulate a 'CAN' network. Maybe. One day. :)
     
    #25 landspeed, May 4, 2019
    Last edited: May 4, 2019
  6. landspeed

    landspeed Active Member

    Joined:
    Feb 25, 2007
    351
    198
    0
    I have found out some interesting thing about interrupts. Basically, they can be referred to in hex code, from &80 upwards (hardware ones are below this).

    The V850 ROM has a jump table at the start; there are 4x 32-bit words for each interrupt; they are empty except for the first word (which branches to a 'handler'). I guess the 4 instructions allows for a super quick return in other applications?.

    So. The interrupts of interest go from &80 to &750, in steps of &10 (being 4 x 32-bit words each). Each jumps to a handler.

    The interrupt entry points in the ROM (from addresses to &750) all jump to one of only three handlers.....

    HANDLER ONE
    'Handler one' looks at a table stored at &9AC. This is a table of addresses. From here, it jumps directly to a routine.

    Looking at the table of addresses (which actually covers all interrupt addresses from &80-&750)...
    The addresses which are for interrupts for 'handler 2' branch to a series of unique addresses
    The single address for the interrupt for 'handler 3' also branches to a unique address
    All other addresses go to some code that is guaranteed to end in an infinite loop.

    Thus 'Handler one' jumps to alternate code for those interrupts usually governed by handler two and handler three.

    HANDLER TWO : This would appear to handle every interrupt that has a 'useful' function attached
    - An exception is &5E0, which is under 'handler 1' in the initial ROM jump table, but has a unique address in the second table.
    HANDLER THREE : This only hands a single interrupt, &6E0.

    This is all complicated by the fact that the code disables all interrupts except &540 to &5B0, before the CPU 'stabilises' after the setup routines. This means that, in theory, it can only jump to the code that 'guarantees' an infinite loop.

    Next steps:
    1. Examine the infinite loop code. In particular, do more fixing on the instructions that affect status flags (including shift instructions, which seem to be vital to avoid that infinite loop, maybe).
    2. Examine the startup code and see if it should be enabling other interrupts
    3. Examine &5E0 and &6E0 among others. &6E0 seems interesting, having a unique handler.
    4. Obtain battery ECU ROM (I am using the HSD ROM (Gen 2), which is probably one of the most complicated ROMs!).

    One good thing, is that, of about 104 possible software interrupts, only 22 actually have unique code from the 'second table'. This reduced the workload down the line, I hope!
     
    SFO and DivideByZer0 like this.
  7. landspeed

    landspeed Active Member

    Joined:
    Feb 25, 2007
    351
    198
    0
    Some ideas I had for the battery ECU (these might be controlled by the HV ECU but, if so, that could still be manipulated by the battery ECU)
    1. Big hill mode : you press a button, and the battery goes into assist mode; it will likely be at 60% SoC after driving around for a bit, but it drains down to 40% (the usual point when you go to two bars), and stays there. This then gives 40% to recharge down the hill to 80% SOC. This would be good for a few hills I do on my commute, which end up with >80% SoC and wasted energy each time. Technically this should cool the battery down compared to 'business as usual'. It would also ramp up the battery fan to '6' to make the battery cooler prior to the downhill charge mode.
    2. Camping mode : usually, when car-camping (which I haven't done but like the idea of - the Prius is an awesome tent so to speak), if people leave the air-con running in summer, the AC runs until the battery reaches 2-3 bars. Then the engine periodically restarts and charges the battery (a bit). Usually still only to 2-3 bars, then starts every few minutes. Camping mode would drain the battery down to, say, 45% SoC, then start the engine, charge it to 70% SoC. This would result in fewer engine starts, and probably also reduced fuel usage as the engine will be running at optimal temperatures for longer if doing fewer, longer runs.

    Both of these modes would come with no warranty of course!

    (Of note, I'm not sure if the battery ECU 'asks' the HV ECU for more charge, or whether the HV ECU just reads the status of the battery from the battery ECU and decides whether, or not, to send charge. Hopefully it is the former. If it is the latter, an easy way to get around that is e.g. in camping mode, the battery ECU would monitor the SoC internally, but tell the HSD that the battery is at a 39.9% SoC, then tell it it has a 70% SoC when it is ready to stop the engine charging the battery. Charge rate control can be done by spoofing the battery temperature readings if needed. Big hill mode could do the same thing (report a 90% SoC until a true 40% SoC is reached, then report a 65% SoC to have minimal charging, then report the true SoC once it detects the car going downhill (or when you press / release a button or switch) - to allow the battery to charge down the hill).
     
    SFO and DivideByZer0 like this.
  8. landspeed

    landspeed Active Member

    Joined:
    Feb 25, 2007
    351
    198
    0
    I do agree it may be easy to blow up the Prius if doing bad mods (to the ECUs); There is a document (I think it was called 'the little Prius that could' or something like that; kind of a biography from the designers during the early prototype days. The car featured aggressive electric mode with the petrol engine as a backup assist. The inverters kept blowing up due to excessive current for prolonged periods. I'm sure the inverters are stronger now, but it does provide a warning that the car is designed within certain limits, and exceeding those could cause major failures.

    I think an engine swap could be 'fairly' easy; if the engine ECU was of a similar vintage, all that is needed is for the engine swap ECU to talk to the HV ECU and not complain when it gets shut down etc. Admittedly no-one has yet modded an actual ECU as far as I know, on a Prius, but one day I might be able to!
     
    SFO and DivideByZer0 like this.
  9. DivideByZer0

    DivideByZer0 Member

    Joined:
    Sep 13, 2017
    67
    91
    0
    Location:
    San Francisco, CA
    Vehicle:
    2005 Prius
    Model:
    Touring
    An engine/ECU swap would be a pretty cool possibility. By the way, while I hadn't found anything about anyone putting hybrid Camry engines in Priuses, the user who has successfully swapped a Yaris engine into a Prius (sans ECU) got back to me and it sounds like the engines are a direct swap.

    Well, I guess what is considered the easiest and most popular engine swap on the Yaris is a 2ZR-FE as it's the closest thing to a bolt-on for a larger engine, although there are some issues to work around. But, there is a 2ZR-FXE... Here's the post I made about it:

    Also here's a 2ZZ-GE swap into a Scion xB which had a 1NZ-FE. They mention that the ECUs appear to be compatible: 2ZZ-GE Engine Swap in my 05 Scion xB - Scionlife.com

    In terms of inverter durability, yeah it's definitely something that seems risky to mess around with. If you look in the cam swap thread Toyota Jesus tried shunting current around the current sensors and caused some damage to the electronic components.

    I do think though that more subtle tweaks to vehicle behavior could go a long way, though. For instance, just being able to control the charging state of the battery. If someone wanted to, god forbid, drag race their Prius, they could say switch on the charging mode switch beforehand (maybe auto force charge), and then prevent charging and do the full possible discharge (within vehicle parameters) while blasting off. Or if I'm going to be merging onto the highway or something I could build up some extra charge while I'm making my way to the onramp at city speeds and then go into discharge mode when getting up to speed. Of course there are probably concerns with battery durability and temperature management here. My thought is that although the system would be driven in a pattern it normally wouldn't be based on full ECU control, this could still be done roughly within existing parameters.

    Another brainstorm I had:

    Switching the Prius into inspection mode is a huge pain. I know inspection mode has been used for racing/offroacing to disable traction control on the Prius

    (can't seem to post the direct link), and I think it's mentioned in one of the landspeed record Prius articles, but the "dance" needed every time you want to do this seems to be a common complaint with these kinds of hobby projects. The ability to easily enable this inspection mode could be a plus for these kinds of applications.
     
    #29 DivideByZer0, May 6, 2019
    Last edited: May 6, 2019
    SFO and landspeed like this.
  10. landspeed

    landspeed Active Member

    Joined:
    Feb 25, 2007
    351
    198
    0
    For what it is worth, from my experience, the stock Prius doesn't charge at all at full throttle - it puts MG1 and MG2 to max power output, so that side of things should work fine, even without modifications. For an engine swap, the main issue would be to modify the ECU for the new engine to talk nicely to the rest of the car.

    The SoCs used do not have any documentation available; they use a V850 processor, but all the add-on peripherals are unique to that SoC. The addresses will be different, as will protocols, and the on-chip peripheral IO maps are similar in some areas but totally different in others. The chip in the battery ECU has no mentions when you google it - it was obviously custom-made for Toyota so they never, ever released a data-sheet. I won't give up though :)
     
    prius_chatter likes this.
  11. DivideByZer0

    DivideByZer0 Member

    Joined:
    Sep 13, 2017
    67
    91
    0
    Location:
    San Francisco, CA
    Vehicle:
    2005 Prius
    Model:
    Touring
    You're probably right; to be honest this is something I don't have a deep understanding of myself, although I've been learning more about it through this crash course in engines. I think the experience of being "bogged down" that I'm thinking of is when the Prius is in EV mode and taking awhile to get the engine back on, like once I put my foot down it gets up to speed eventually but the delay there can be frustrating. It can be hard to anticipate though. I have had a couple instances on the highway where it's taken me much longer than I've expected to get up to speed, but who knows maybe I had already drained the battery or something. Regardless, I think there could be some potential in tweaking the battery charging state.

    By the way I came across this in the service manual for the ECM (Note that "transmit to" = "transmitted by" and "receive from" = "received by") that seems to cover most of the ECM communications; you've probably seen this but it was pretty informative:

    Screen Shot 2019-05-06 at 6.06.23 PM.png It seems that the manual talks about the main function of HV ECU and ECM communication being the HV ECU requesting a specified amount of RPM. There are a couple of signal cables outside the CAN bus directly linking the ECM to the HV ECU, called "NEO" and "GO":

    Screen Shot 2019-05-06 at 9.40.49 PM.png
    Since it's a revolution signal I wonder if they're just the requested and reported engine RPM. These signals aren't present on the 1NZ-FE ECM pinouts that I looked at.
     
    SFO and Landon51 like this.
  12. landspeed

    landspeed Active Member

    Joined:
    Feb 25, 2007
    351
    198
    0
    Thank you for posting this - I hadn't seen it (don't have the service manuals yet but have a techstream login for when I want to pay more money - I saved some other info last time and got all the CUW files for my car!). I agree the 'Transmit To' and 'Receive From' are essentially backwards!

    It doesn't cover all the signals but is definitely very helpful in understanding how they all talk to each-other!

    By the way way I have recently noted that the 2GR-FE engine is also available as the 2GR-FXE. In a few big hybrids (3.3-3.5l V6). Interestingly, this same engine does actually fit in a Corolla, renamed the 'Toyota Blade'. This could be interesting if one gets a crashed car with this hybrid system in (even then, things like the combo meter, smart key, and likely more, will still need some kind of mods, but it does give hope for other Prius mods!
     
    Landon51 likes this.
  13. landspeed

    landspeed Active Member

    Joined:
    Feb 25, 2007
    351
    198
    0
    In this thread:
    P0A2B Red Triangle of death after transaxle replacement | PriusChat
    Matt (@Texas Hybrid Batteries) posted photos including of the HV ECU, which is the ROM I am using for initial development of the emulator;

    HVECU_166546_upload_2019-5-6_19-8-22.png The V850 SoC will be the rectangular chip on the bottom of the board. While I can't read many details, it clearly says 'Toyota', as opposed to e.g. NEC, or having the usual codes. I can tell you it is a custom SoC with all the peripheral mappings, memory-mapped registers, and interrupts, in different places! This makes it tough to reverse engineer.

    Looking at the accessory chips, it explains a few things, and I have found that (logically, in retrospect), it is possible to figure out a lot of the mapping by looking at published specs for 'mass market' chips, because they tend to be in 'blocks'. Yesterday I figured out quite a bit doing this (before seeing this photo, but I found the links for the two chips on the right of the picture in the code - no idea what they are for yet of course!!)

    I have ordered a 'machine' that attaches to the JTAG port, which can be used to read the flash; I am going to use this on a battery ECU soon. The HV ECU really seems like something that shouldn't be messed with (that much), as it does so many unique things. The main changes I would make would really be if it is involved in the speed limit for the 'EV button' mode, and perhaps increasing the point when the engine spins up to protect MG1 from 65km/h to 71km/h (should still be safe, and would save a lot of fuel in my particular circumstances).

    An option to change between MPH and KM/H would also be nice; it is 'disabled' on my car. That is probably in the instrument cluster.
     
    SFO and Landon51 like this.
  14. landspeed

    landspeed Active Member

    Joined:
    Feb 25, 2007
    351
    198
    0
    I am rewriting my V850 emulator at this stage; it is being converted to a desktop GUI, but more importantly, the instructions are being converted into a microcode that I have created to reduce the risk of issues caused by coding each instruction manually (particularly with flags). This conversion will take a few weeks, as it is a hobby I do at home, rather than my day job.

    If anyone ever comes across any binary, CUW, rom dump, etc, for the battery ECU for any Prius, (Gen 2 especially, but any Prius), please PM me!. I will be away for a few weeks while working on the conversion to 'version 3' of my emulator.

    I will release my emulator when it is usable and doesnt crash all the time with errors reported in a format that only I understand! To use my emulator, you need to install an emulator, 'Risc PC Emulator', google 'RPCEmu Spoon Edition', which can be done on Linux, Windows, MacOS. Unlike most emulators, the operating system is RISC OS 5. this can be downloaded for free from http://www.riscosopen.org.

    Easier, and definitely simpler, is a Raspberry Pi credit-card computer - I am using one, running RISC OS 5, and a VNC server via an ethernet cable. It can be used via WiFi but it messes up my wife's WiFi for some reason, so I reverted to the cable!.

    (However, once the RPCEmu software is installed, and RISC OS is up and running, it is very simple from then on). I am happy to help anyone who wants to join in on this journey with either their Raspberry Pi, or RPCEmu install on any computer that supports it!

    I will post again in a few weeks; if anyone could contribute, the CPU is a V850 (lots of documentation available), and the ECUs are all connected via CANbus 'ethernet'. I don't actually have the battery ECU ROM / any dumps, but it doesn't actually matter, because I have a long way to go with my emulator (I am working from the ground-up, which is pretty tough!)
     
    #34 landspeed, May 11, 2019
    Last edited: May 11, 2019
    SFO and Landon51 like this.
  15. landspeed

    landspeed Active Member

    Joined:
    Feb 25, 2007
    351
    198
    0
    Edit
     
    #35 landspeed, May 11, 2019
    Last edited: May 11, 2019
  16. landspeed

    landspeed Active Member

    Joined:
    Feb 25, 2007
    351
    198
    0
    PS If anybody, at any stage, can get me a Prius Battery ECU ROM (any generation), or a Leaf ECU ROM (any generation), or any Tesla ROMs at all, I would love to hear from them!

    I have nearly cracked Toyota's ECU encryption so, the 'CUW' files will soon be 'open compiled' (not open source, but the raw machine code will soon be available. I will only release this far cars no longer under any warranty in California, or elsewhere worldwide; I respect Toyota for even making the Prius despite Caltex and their patent abuse, but want to help classic Prius owners keep their cars alive.
     
    SFO and Landon51 like this.
  17. Travis Sanders

    Travis Sanders Junior Member

    Joined:
    Feb 4, 2019
    63
    25
    0
    Location:
    Hawaii
    Vehicle:
    2005 Prius
    Model:
    Two
    Thank you for being awesome and all of the research and testing you've been doing. I have the burnt pins on a couple of my gen 2 which led me here.
    Reading your thread has me really curious any progress with it lately?
     
    landspeed and SFO like this.
  18. landspeed

    landspeed Active Member

    Joined:
    Feb 25, 2007
    351
    198
    0
    I hope you got it sorted! My Prius ran fine after the work I did, but I had a sudden hybrid system failure on a motorway! Triangle, 'Problem', and many other dashboard lights. I drove it another 60 miles with extreme caution, and in 2 weeks time it is booked into a Toyota garage for repair (and it is the hybrid / inverter cooling pump that failed, so literally i am getting it replaced with a new part for free, in 2021, despite it being a 2008 car).

    If you are still having issues with your car, please post photos of the burnt pins - or anything / everything that is important. However, it is usually very easy to fix the 'burnt pins on battery ECU' problem - my Prius still has the *same* High-voltage battery it had from brand-new; it still performs well. So, if you get burnt pins on the battery computer, you can replace it and your car should be fine. But you need to get a new battery 'loom' - my battery had sulphuric acid pour on it, and dry out, causing sulphuric acid fumes every day for 2+ years - causing the failure of the battery ECU.

    Please reply if you still have issues with your car! Otherwise I will keep working on the Gen2 Prius ECUs (to allow them to be re-used to reduce wastage in this throwaway society); this will extend to Gen3 Priuses very soon. Happy New Year 2021; keep safe!
     
    SFO likes this.
  19. landspeed

    landspeed Active Member

    Joined:
    Feb 25, 2007
    351
    198
    0
    Not really; I've been tinkering with emulation of systems with a view to return to this; reading through the datasheets for various V850 chips does show that the SoCs in the Prius, while custom, are probably designed (at a silicon level) in 'blocks' (e.g. 'bolt on x number of CAN controllers etc - for the SoC at hand).

    The issue I faced ages ago was getting the binary files for the ROMs. The CUW files are encrypted, and it seems to be a variant of ('blowfish' encryption if I recall correctly). However... the official update mechanism involves booting up the car, attaching a 12v battery tender to prevent 12v failure during reprogramming (which would be bad); and then TechStream feeds the new ROM data to the ECU, which reprograms itself, and it can take a number of hours.

    The ECU for the Gen 2 battery ECU (and probably the others) has a JTAG connector on it. This could be used for 'out-of-car' reprogramming. The barrier at the time was the expense of doing this 'the right way' (using a 'frame' type thing with pins that press onto the JTAG pins (which are flat bits of solder) on the ECU).

    The other issue was that the documentation for similar NEC / Renesas SoCs show that you can flash the chip directly - and also read the data off the chip directly. However, there is a 'bit' that you can set when writing, which means 'you can't read what is already on the flash'.

    I've heard that bit is set, but I've also seen ROM dumps for random Toyota cars, and today found one place that seems to have a binary dump of 'AN ECU' for the Prius PHEV, (which leads me to something that didn't exist earlier... time to investigate)...
     
    SFO and Travis Sanders like this.
  20. Jez_W

    Jez_W New Member

    Joined:
    Jul 24, 2021
    4
    1
    0
    Location:
    New Zealand
    Vehicle:
    2007 Prius
    Model:
    N/A
    Battery-volts3.png Burnt-out-ECU-plug.png Hi there. I had two pins (21, 22) blow-out on my battery ECU (picture attached), you could see from the loom plug that the green corroded residue of the pins was still in each hole. It was the battery voltages that alerted us to the problem (attached). Interesting that the ECU was seemingly still working (I got the battery voltages from it) after the blow-out.

    The issue seems to coincide with moisture (we live in Taranaki). The car hadn't been used for 10 days and was standing with friends who had reported regular condensation on the wind-screen. It also turned-out that the classic water collection points in the boot left and right had puddles in them. When I stripped the battery cover-off the modules all had condensation on them. At the last re-build I used a lithium electrical jointing compound and cleaned the bus-bars well, so all the contacts were good.

    It all started when we jumped in the car to go to the beach, 3 adults, 2 kids, we had the air con on full (no cloth handy - we'd only just got out of quarantine - so not well organised), and drove-away, the battery indicator dropped rapidly to one-bar, but I thought it would recover as we here heading down-hill, we had to pull-up a short rise, and near the top we lost power and the triangle of death came-on. Codes were: P3013 "Module 3 - Battery Block 3", P0A7F "pack A deterioration", P0AC0 sensor A "pack current/sensor range".

    The moisture and corrosion I understand, the arcing and burning seems odd, the local pin voltages aren't high enough - although if pins 10, 11 and 21, 22 carry the upper HV voltages relative to the vehicle frame, then you've got plenty of volts, and when damp, a shorting route. Perhaps there's a drip-point from the battery housing above the plug that causes excessive moisture on the orange plug and loom. We have had a lot of rain and many damp days in succession. Perhaps better ventilation of the air around the relay and ECU is required - although, moist air blown onto cold components will lead to more condensation (ideally you might want a silica gel moisture collector, but then you'd need to change it out every two weeks in winter).

    My sensor wiring still has good contact to the orange plug, and the wires to the plug zig-zag across the plug from the battery blocks. I'll measure the voltage to the frame from each sensor point (although my orange safety plug is with the car, the battery is at my house, so I might have to bridge the connection).

    I'm also wondering - if the ECU is intact, which it appears to be, and there are redundant pins on the connector, can I scavenge some good pins to replace the damaged ones? I'm trying to avoid getting the car towed again - and my friends have had enough of it sitting around!!
     
    Travis Sanders likes this.