LiBSU - Redesigning the "Battery Support Unit" to Support Lithium

Discussion in 'Gen 3 Prius Technical Discussion' started by mudder, Jun 7, 2024.

  1. mudder

    mudder Active Member

    Joined:
    Mar 13, 2024
    258
    332
    0
    Location:
    Chattanooga, TN
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    It's crazy that TE makes "wire-to-board" connector housings (1473143-1) that they don't also sell mating headers for. In other words, a company that solely manufactures mechanical connector systems expects me to design my own header to mate with their connector housing. OK, seriously?

    Looks like I'll end up cutting off the OEM temp sensor terminals (1123343-1) and replacing them with another connector system. Another thought is to kludge a 0.100" 2p shrouded header to work with their 1473143-1 connector housing.
     
  2. mudder

    mudder Active Member

    Joined:
    Mar 13, 2024
    258
    332
    0
    Location:
    Chattanooga, TN
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Daily PCB layout update:
    Screenshot 2025-11-14 at 1.57.46 AM.png
    Notes:
    -HVDC section 100% placed.
    -Connectors 100% placed.
    -Should have all remaining parts placed tomorrow.
    -Almost certainly a 2 layer board... almost every signal routes on bottom layer.
    -Planning to order PCB Monday.
     
    Mr. F and mjoo like this.
  3. ChapmanF

    ChapmanF Senior Member

    Joined:
    Mar 30, 2008
    27,541
    18,136
    0
    Location:
    Indiana, USA
    Vehicle:
    2010 Prius
    Model:
    IV
    Woo hoo!

    How will the owner access diagnostic information on what condition at what cell has bricked the car?
     
    #63 ChapmanF, Nov 14, 2025
    Last edited: Nov 14, 2025
  4. mudder

    mudder Active Member

    Joined:
    Mar 13, 2024
    258
    332
    0
    Location:
    Chattanooga, TN
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    There are several ways to retrieve debug info from LiBSU:
    1: The most verbose output is via USB. Here's the existing method for my Honda Insight product. Note that while I'm using Arduino's IDE in the video, any standard serial putty terminal will work... LiBSU isn't running Arduino code, but that platform is the easiest for computer novices to use.
    2: LiBSU will report all OEM parameters to the hybrid computer, which are readable via OBDII. This will only narrow the failing cell down to QTY4 cell segments. You would need to use USB to narrow down to a single cell.
    3: The (optional) 4x20 LCD displays the following parameters:
    KEYON_SECONDS
    VPACK_ACTUAL
    VPACK_SPOOFED
    BMS_ERROR_FLAG
    CELL_VOLTAGE_HI
    CELL_VOLTAGE_LO
    CELL_DELTA
    POWER_kW
    CELL_MAX_SINCE_KEYON
    CELL_MIN_SINCE_KEYON
    SoC
    PACK_CURRENT
    TEMP_BATTERY
    FAN_STATUS
    CHARGER_STATUS
    HEATER_STATUS
    CELL_BALANCE_STATUS
    WATT_HOURS_SINCE_KEYON_ASSIST
    WATT_HOURS_SINCE_KEYON_REGEN

    As I mentioned previously, no wireless options are available. The FCC certification is expensive and annoying, and I just don't plan to do it. If someone wants wireless, they'll need to develop an expansion module that plugs into LiBSU. Some of my Honda Insight customers use an Android phone with USB OTG for wireless comms.
     
  5. ChapmanF

    ChapmanF Senior Member

    Joined:
    Mar 30, 2008
    27,541
    18,136
    0
    Location:
    Indiana, USA
    Vehicle:
    2010 Prius
    Model:
    IV
    What USB vendor/product and device class IDs will it present? Will an OS-supplied USB-to-serial device driver attach it upon presentation and work, or will further driver loading or USB ID configuration be needed first?
     
  6. mudder

    mudder Active Member

    Joined:
    Mar 13, 2024
    258
    332
    0
    Location:
    Chattanooga, TN
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    0x04D8

    0x00DF

    0x0002

    Native support all the way back to Windows 7, and MacOS 10.7. Any machine made in the past fifteen years will see it.

    No additional drivers required.
     
    amarino likes this.
  7. mudder

    mudder Active Member

    Joined:
    Mar 13, 2024
    258
    332
    0
    Location:
    Chattanooga, TN
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Should have the board finished later today:
    Screenshot 2025-11-17 at 1.53.20 PM.png
     
  8. abubin

    abubin Member

    Joined:
    Dec 7, 2019
    193
    92
    0
    Location:
    Malaysia
    Vehicle:
    2012 Prius
    Model:
    N/A
    Do you already know which Li-Ion battery to use? Currently there are 3 big manufacturer for Li-Ion battery designed for Toyota Hybrid. Such a good timing as they are promoting this like crazy on social media. I have already contact 2 of them. Pricing is also very affordable. Less than USD 150 /pcs if get from China direct.

    [​IMG]

    update:
    Here is the other supplier. With details of the specs. This version of the li-ion is more expensive. Around USD200 per piece.
    Toyota Hybrid – BMW i3 Battery Replacement & Upgrade | Volkswagen E-glof/Renult Zoe/Nissan Leaf |MTG
     
    #68 abubin, Nov 18, 2025
    Last edited: Nov 18, 2025
  9. mudder

    mudder Active Member

    Joined:
    Mar 13, 2024
    258
    332
    0
    Location:
    Chattanooga, TN
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Yes.
    More info to follow later.

    I'm willing to work with almost all existing manufacturers who wants to add LiBSU to their product. Send me a PM and we can talk.

    ...

    PCB is finished. Happy to route it on just two layers:
    Screenshot 2025-11-18 at 2.19.34 AM.png
    I'll order it tomorrow morning, after giving it one final look over.

    FYI: I ended up axing the backup isoSPI port (which isn't required for safety). There wasn't enough room on the board, and also there wasn't enough room for the second 2p connector.
     
  10. mudder

    mudder Active Member

    Joined:
    Mar 13, 2024
    258
    332
    0
    Location:
    Chattanooga, TN
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Was up late talking with a supplier... just ordered PCB now:
    Screenshot 2025-11-18 at 6.38.45 PM.png

    Screenshot 2025-11-18 at 6.39.42 PM.png
     
  11. mudder

    mudder Active Member

    Joined:
    Mar 13, 2024
    258
    332
    0
    Location:
    Chattanooga, TN
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    in.jpg
    out.jpg

    Uneventful hardware build. All the ports line up where they should (which was my biggest concern).
    My only footprint issue was accidentally ordering 249k resistors with 0805 footprint; will replace with correct 1206 part on next build.

    Maybe this RevA will ship? Too soon to tell... still need to test all the functionality.
     
    #71 mudder, Nov 26, 2025
    Last edited: Nov 26, 2025
    Brian1954 likes this.
  12. rjparker

    rjparker Tu Humilde Sirviente

    Joined:
    Jun 6, 2008
    10,126
    6,290
    7
    Location:
    Texas Hill Country
    Vehicle:
    2012 Prius v wagon
    Model:
    Three
    Nice!
     
    mudder likes this.
  13. mudder

    mudder Active Member

    Joined:
    Mar 13, 2024
    258
    332
    0
    Location:
    Chattanooga, TN
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Sorry for the delay... getting the PCB right before the Thanksgiving holiday didn't help.
    dl;dw: Got the toolchain set up and programmed the MCU to blink an LED.
     
    #73 mudder, Dec 1, 2025 at 3:16 PM
    Last edited: Dec 1, 2025 at 3:24 PM
  14. mudder

    mudder Active Member

    Joined:
    Mar 13, 2024
    258
    332
    0
    Location:
    Chattanooga, TN
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Alright, I got the code to build on the new MCU... haven't tested anything yet, but there aren't any compilation errors so that's a start.

    For those unfamiliar, I just migrated the proof-of-concept firmware (running on a MEGA2560) over to a completely different processor (AT64DB48). In the process, I also deleted/disabled numerous features present in the existing LiBCM codebase (my Honda Insight product), which are not present on LiBSU.

    I've left hooks into the grid charger logic, since I do plan to release that add-on option. The heater will stay, too, since every LiBSU pack will contain a heater capable of heating each cell at ~4 watts (~240 watts for the entire pack). I can't wait to talk more about it; it's pretty clever and only costs a few cents extra per cell.

    The most difficult section of code to rewrite is the low level power saving features, which are fundamentally different between MCUs. The alpha LiBSU product probably won't support low power sleep states. However, the "turn off because battery is below 10% SoC" feature remains present, so we're not going to over-discharge packs during the alpha period. Until I write this firmware, alpha testers should expect SoC to drop ~1% per day. After that, keyOff standby time should increase to around four years with a full pack, or around one year with an empty pack.

    I suppose now begins integration hell ;). Shouldn't be too bad.

    My favorite part of this rewrite was finding the header file "dirty_tricks.h", which begins with the comment:
    //Okay... This was getting f@#$ing absurd.
    //We (those who speak fluent avr asm) all knew we needed unholy tricks like this.
    ///We wish we didn't. But while the GCC part of avr-gcc does a pretty thorough and consistent job optimizing...
    //The AVR part is piss-poor. It's f@#$ing awful.

    ...this goes on for another few dozen lines. Top quality commentary.
     
    #74 mudder, Dec 3, 2025 at 2:19 AM
    Last edited: Dec 3, 2025 at 2:39 AM
    rjparker likes this.