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
    397
    59
    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
    395
    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
    397
    59
    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
    395
    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.