Prius Plug In P1A00, P1A61, P1A64, P1A67, P301A, P314A, P31AB

Discussion in 'Gen 1 Prius Plug-in 2012-2015' started by James Analytic, Oct 27, 2025.

  1. James Analytic

    Joined:
    Jun 14, 2019
    399
    60
    3
    Location:
    Michigan
    Vehicle:
    2006 Prius
    Model:
    N/A
    @mudder Well, I started playing around with a little research for a plug and play replacement for the "glass unit."

    Seems like need two CAN lines, one for HV battery ECU plug spoofed multiframe data and one for the drivetrain Hybrid/ECO mode override since say if wanting to use a NiMH battery one will need to help preserve that battery life compared to what I and Gemini AI assume PHV Prius does to the Lithium HV pack (seem like ClaudeAI would be better guessing for coding). Mainly, not using EV mode other than first few seconds of driving up to something like 5-10mph, albeit this can be determined maybe and adjustable based on HV battery performance. I also wonder if there is an area of opportunity for better fuel efficiency performance if used in the Gen 2, since seems like the gen 2 doesn't like to use EV mode to get up to speed.

    Take everything with a grain of salt, as I am no way knowing what I am doing critically thinking wise.

    Basically, I'm getting feedback for chips required as (would need to look at best practices from the datasheets for implementing):
    • Master Microcontroller: STM32G474RET6. This automotive-grade MCU features three independent hardware CAN-FD/CAN controllers and high processing speeds to run real-time UDS injection loops without latency.
    • Analog Front-End (AFE): Analog Devices AD7280A or LTC6804-1. These integrated circuits handle up to 12V inputs per channel (perfect for the 14.4V nominal tracking curves of paired NiMH modules) and incorporate specialized internal cell balancing and diagnostic self-tests.
    • Dual CAN Transceivers: Two NXP TJA1051T/3 modules to simultaneously isolate communication blocks between the battery sensor socket and the engine computer.

    To prevent the custom board from suffering the same burnout fate as the original 89892-47011 "glass unit", incorporate three critical hardware design protections:
    • Over-Current Fusible Links: Place an inline 250mA fast-acting, high-voltage ceramic fuse (rated for at least 300V DC) on every single voltage sense lead before it reaches the AFE input pins. If a wiring fault shorts out, the fuse blows instantly instead of cooking the silicon layout.
    • Transient Voltage Suppressor (TVS) Diodes: Connect high-voltage TVS clamping diodes (such as the SMBJ18A) between each adjacent channel tap. This clamps high-frequency electrical switching noise generated by the hybrid inverter during regenerative braking.
    • Conformal Coating: Coat the fully assembled circuit board with a military-spec silicone conformal coating (e.g., MG Chemicals 422B). This safeguards your custom design from moisture condensation and dust inside the trunk's battery enclosure.

    @jacktheripper Does the PHV Pip actually read 28 blocks and Dr Prius app only shows 8?

    If 28, then the replacement sense battery voltage computer firmware needs to act as an automated data proxy. Translating 14 analog block inputs from a NiMH chemistry pack into a virtual 28-block lithium structure. It maps out the exact layout below:

    cpp

    #include <stdint.h>
    #include <string.h>

    #define NIMH_BLOCKS 14
    #define SPOOFED_LI_BLOCKS 28
    #define BATTERY_RESP_ID 0x7EB

    uint16_t physical_nimh_mv[NIMH_BLOCKS]; // Populated by AFE hardware reads
    uint8_t uds_tx_buffer[64]; // Full assembly buffer for ISO-TP multi-frame

    // Multi-functional Translation Matrix
    void Build_Spoofed_UDS_Matrix(void) {
    // Step 1: Map 14 NiMH readings across 28 virtual lithium tracking blocks
    for (int i = 0; i < SPOOFED_LI_BLOCKS; i++) {
    int nimh_index = i / 2; // Maps two virtual frames to every one physical block

    // Split the 14.4V NiMH block into two 7.2V individual virtual readings
    uint16_t virtual_cell_pair_mv = physical_nimh_mv[nimh_index] / 2;

    // Inject into Big-Endian UDS Array layout (offset dynamically per layout spec)
    int byte_offset = 20 + (i * 2); // Structural placeholder matching factory firmware offset
    uds_tx_buffer[byte_offset] = (uint8_t)(virtual_cell_pair_mv >> 8);
    uds_tx_buffer[byte_offset + 1] = (uint8_t)(virtual_cell_pair_mv & 0xFF);
    }

    // Step 2: Enforce strict hybrid safety clamping to disable pure EV driving modes
    uds_tx_buffer[10] = 0x2E; // Force State of Charge (SoC) byte to a permanent ~23%

    // Inject 48°C values onto all thermistor banks to trigger cooling fans and clip power draw
    uds_tx_buffer[15] = 0x58;
    uds_tx_buffer[16] = 0x58;
    uds_tx_buffer[17] = 0x58;
    uds_tx_buffer[18] = 0x58;

    // Hard clamp WOUT (Max allowed battery discharge output) to 10kW to protect NiMH cells
    uint16_t restricted_wout_watts = 10000;
    uds_tx_buffer[8] = (uint8_t)(restricted_wout_watts >> 8);
    uds_tx_buffer[9] = (uint8_t)(restricted_wout_watts & 0xFF);
    }


    To complete the multi-functional feature set, configure your board's secondary CAN channel (CAN-2) to monitor the car's primary drivetrain network. Every time the car turns on, your module will actively inject driving configuration tokens over the network to enforce your preferred background mode:

    cpp

    // Called in the background execution loop every 100 milliseconds
    void Enforce_Default_Eco_Power_Modes(bool select_power_mode) {
    uint8_t mode_frame[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

    if (select_power_mode) {
    mode_frame[1] = 0x04; // Hex byte mask to force PWR MODE engagement on dash
    } else {
    mode_frame[1] = 0x02; // Hex byte mask to force ECO MODE engagement on dash
    }

    // Broadcast frame over the primary drivetrain line
    CAN2_Transmit(0x520, mode_frame);
    }

    Kind of neat the idea of a TFT or OLED display as well with a momentary contact switch on the display unit to toggle through different metrics real time and potentially use for changing settings

    Would be interesting to confirm everything using Claude AI and a OBD2 sniffer of some sort like SavvyCAN with a USB to CAN adapter plugged into the laptop. DSD Tech SH-C31A or maybe the RHO2 adapter?
     
  2. mudder

    mudder Active Member

    Joined:
    Mar 13, 2024
    289
    396
    0
    Location:
    Chattanooga, TN
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    It's my primary project right now.
    See my thread for (infrequent) public updates.

    Should work fine in all Gen3-series NiMH vehicles.

    Let me know if you have specific questions and I will provide very brief responses. Sorry, not going to put your entire project into my brain slots right now.
     
    James Analytic likes this.
  3. James Analytic

    Joined:
    Jun 14, 2019
    399
    60
    3
    Location:
    Michigan
    Vehicle:
    2006 Prius
    Model:
    N/A
    Such a tease. Though take your time. Guessing will be popular if you can get to that $300 or something great price point I thought I heard you mention. Guessing I heard wrong, or you're anticipating high enough volume to bring down so low. Either way, I drive a gen 2 prius daily and have the gen 3 that I can. Actually, a 07 camry hybrid now registered, plated and insured to study and work on.

    Awesome. Will be looking forward for a gen 2 version as well. I probably can drive a gen 2 down for you if you needed one to prototype with.

    Just great to know you're still out there somewhere moving forward, thanks for the reply. Did surprise me the regenerative braking wasn't integrated from what I saw regarding the Insight. Seems like I don't understand something, maybe charge method isn't optimal I'm guessing or am I missing something BMS related?

    I'm still need to read into the reasons for Passive vs Active balancing methods and the logic behind the designs, since seems like might be useful or maybe not.
     
  4. mudder

    mudder Active Member

    Joined:
    Mar 13, 2024
    289
    396
    0
    Location:
    Chattanooga, TN
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    I can't wait to show the product I've designed this year.

    $300 was the target price I proposed for the replacement LiBSU circuit board I proposed last year.
    Since then I've broadened the product into a complete lithium battery replacement (with BMS), which will cost more.
    I might eventually sell the circuit board as a standalone product, but my initial focus is the complete drop-in battery replacement.

    Thanks for the offer, but I'll just buy a gen2 Prius when I need it.

    Last year I added a second driveway behind my house so I can stash half a dozen Toyotas in the woods.
    Cutting the driveway was difficult because I live on a 35% slope on Lookout Mountain. The new parking spots are actually at a higher elevation than my roof (several hundred feet horizontally away from the house).

    Yeah I'm working on it when I'm working.
    On the other hand, I'm 'retired', so I typically don't work more than 30 hours/week.

    I don't follow what you're asking.
    Are you referring to the manual assist/regen device I designed (a.k.a. 'manual IMA controller')?
    If so, that's just a device that lets you override the OEM assist/regen signals. It itsn't required, but it's a LOT of fun. I routinely achieve over 200 mpg(gas), as my driving is mostly electric on trips less than 50 miles between charges.

    Active balancing isn't necessary in automotive hybrid traction battery applications. A well designed pack in good health doesn't require constant balancing. C/100 is sufficient for hybrid packs; 60 mA passive balancing is sufficient. My 47000 mAh Honda Insight product doesn't have any issues keeping the pack balancing with 52 mA passive circuitry.

    ~20 years ago I designed a really cool active balancing circuit for A123's (then) cutting edge cylindrical cell. It could actively balance a 2 Ah cell at around 1 amp. It was complete overkill, majorly expensive (compared to passive FET+resistor), and took up lots (more) space on the PCB. I haven't used an active balancing circuit on lithium cells since, and have never once regretted that decision.
     
    James Analytic likes this.
  5. James Analytic

    Joined:
    Jun 14, 2019
    399
    60
    3
    Location:
    Michigan
    Vehicle:
    2006 Prius
    Model:
    N/A
    Ah, yes, the manual IMA Controller. I see now and now see the complexity being more with a Prius since is a Series-Parallel Hybrid (Engine + MG1 & MG2) and Torque Balance is calculated dynamically across the engine plus MG1 & MG2.

    A Glide Mode state is something I manually do already by shifting into Neutral, say like when driving in the mountain's so to not overcharge the HV battery and in Priuses with bad HV batteries that are overcharging to prevent erratic engine revving from the Prius trying to discharge the overcharged state. Might be interesting to have control with a steering wheel or arm rest switch.

    EV mode is a known hack that might be interesting to use accelerating from a stop or slow speed as an Assist Mode, I guess from a controller selected mode so not having to press the EV button every time you want to use. Make the EV mode like the PHV, so is default, seeming more beneficial when using a lithium pack.

    Not certain how to perform a Regen mode other than maybe affecting the brake pedal sensor signal and logic going to the Skid Control ECU for optimal regenerative MG1 & MG2 generator effect before apply brakes, unless controlled only using MG2 which seems is. This later seems more complex, so to not damage anything or make the vehicle unsafe braking, unless I am overthinking being cautious which I am.

    Will read into some more. Totally understand being retired, same here, albeit way poorer budget guessing. Thanks for all the details and all you're doing. Looking forward to getting your LiBSU for the gen 2 & 3 as I have plenty of Lithium NMC prismatic cells from the four PHV packs. I probably should take a look at your GitHub files as reads like I might be able to determine how to modify for a Prius once I sniff and test out more.
     
    #25 James Analytic, Jun 9, 2026 at 5:34 PM
    Last edited: Jun 9, 2026 at 6:12 PM
  6. James Analytic

    Joined:
    Jun 14, 2019
    399
    60
    3
    Location:
    Michigan
    Vehicle:
    2006 Prius
    Model:
    N/A
    Yesterday spent the whole day, for the most part other than breaks, driving out to one of the closest sources with a warranty for a plug in Prius battery. 2014 and appeared to have 135k'ish miles on and reported as scanned good with a 90 day warranty. Supposidly had only been on the shelf for 50'ish days. Will see how works out in the next 90 days.

    FYI, a medical lift needs like an additional 1ft boom length added for the gen 2 Prius when using to pull and engine and thinking about the same for pulling and installing a PHV-Pip HV pack. Do able as is, though have to be super careful and really helps to have an assistant to guide and move in place. With an additional ft boom length, easy peasy. Need to do the math on that one to see how the load rating will change and if extensions to the base legs will be required too.

    Kind of a bummer as the pack received was loaded by one of the yard parts crew using the fan as a grip. I didn't see him break the fan when doing, though the fan already had some damage prior to me receiving. Otherwise, no big deal as I have like six of those along with the new to us pack two. Once all put together, fan worked fine, though performance being optimal is questionable. Though I definitely was instructing while loading to be careful since the man was gripping the fans to carry to load and that pack is heavy, of which all four of us had no issue confirming. Definitely not a NiMH pack.

    Interestingly, when I started the car after installing the HV pack, double and triple checking everything with no extra nuts or bolts, same christmas tree display on the dash display with the Check Hybrid System etc. Only codes found in Techstream were the P1A64, P1A67 and P314A. Wasn't sure if artifacts or the actual installed battery situation, though displayed as current. Bummer was thinking, however didn't see the open circuit codes, so made me think the "glass unit" wasn't broken so used Utility to cancel the Preventative ON Low Voltage. This enabled the car to be able to start. Cleared the codes and everything seemed fine until that lurking P314A appeared. Though in Autel MAXIAP200 I only saw that code saved in the History, Dr Prius however showed later when I went to review more of the metrics per Dr Prius app, P1A00, P301A, P314A U0100P314A which is weird being I didn't see in the Autel app. For the PHV-Pip Dr Prius displays codes oddly and not the same as Techstream or the Autel App., which is odd. Wondering why?

    06092026_1030PM.jpeg 06092026_1031PM.jpeg

    Well, those Dr Prius read P1A00, P301A, P314A U0100P314A kept coming back after clearing using Dr Prius app. Was nice to see the Prius dash display clear though in between not showing the haunting Check Hybrid System... ...Park in a Safe Place... or something like that Hybrid screen of doom.

    I also was going back and forth between Hybrid Assistant app and did see that the inverter temp was slowly rising to 152F only sitting in Park. Decided since dark, to drive somewhat, so I straightened the car up by moving forward and in reverse a couple times to confirm the temp increased and temp did increase to 170+F so I was like, no more driving to test the HV battery until the Inverter Temp situation is under control. Once in park the temp went back down, though still alarming to see Yellow and then Red lightning and Temp thermometer color displayed.

    06092026_1040PM.jpeg

    Any idea if the P314A alone, if that is all like if any code, would limit the in Park mode charging limit to ~20% SOC. I didn't take a photo of the MFD which appears to go down to maybe as low as two or three bars in like a blue purple color and then go up a couple bars like over half looking all green bars. Seems odd behavior to me and not sure if Hybrid Assistant is calculating like Dr Prius the SOC % valid for the PHV. Was reading, when looking into spoofing for a NiMH pack and read like the method was a different calculation between the chemistries. I do not know.

    Seemed like the Prius was charging the battery per Dr. Prius and Hybrid Assistant apps, though the MFD wasn't always showing that on the display other than bars going up or down. Thought that was different and alarming.

    Next up is to go through the P314A service manual steps and see what I find because the Inverter temp is definitely increasing when moving the car, so no driving the PHV until that's resolved. Hopefully the whatever I find resolution, clears everything else up as I didn't originally at least, see the P1A00 or P301A in Techstream or the Autel app. I did monitor temps and didn't drive the car other than to see what affect moving forward and back did, of which that definitely caused the inverter temp to increase alarmingly to me and since being dark outside and 11:30PM, I decide to call it a day.

    I next need to see if coolant is flowing in the inverter circuit, if I can feel the pump moving, IGCT No.3 fuse and Relay, wiring harness and Power Control ECU in some order like that from what I recall reading and quickly looking at the Diagnostic Doc. Thinking first I'll go back in and see if I can see the INF subcode, as the Autel app History is not that great in the storing History of DTC's for one (seems to miss DTC's cleared sometimes for some unknown reason I've yet to determine) and for storing the INF subcodes which is does not at all ever. I'm curious as well to see what Techstream and the Autel app show again in the morning when I go to check.

    I did quick check to see after clearing codes in the Dr Prius app, then powering down the car, if the car started and confirmed the car did start without any christmas tree of doom and other Check Hybrid da da da on the screen. Did start without any dash trouble lights, charged the battery, though kind of sucks defaults into EV mode as I am paranoid and prefer the vehicle to stay in ECO Mode as I always do, did and does with my 2013 for the ~265K miles I owned and drove it.
     
    #26 James Analytic, Jun 10, 2026 at 12:10 AM
    Last edited: Jun 10, 2026 at 12:52 AM