BPS Leader Board
Status | Requirements Review |
Owner | @Craig Gleason |
|---|---|
Approver | @Ravi Shah @Kadhir Vivekanandan Kalavathy |
Due date | Oct 13, 2025 |
GitHub | |
BOM |
|
Due Dates:
Schematic - 9/27/25
Layout - 10/4/25
Rev. A Ordered - 10/13/25
Firmware/Testing - 11/1/25
Description/Purpose
The BPS Leader monitors the status of all 8 VoltTemp boards, the Amperes board, an on-board temperature/humidity sensor, and ESTOPs to determine whether the HV+ and HV- contactors are safe to close (to energize the high-voltage system). In addition, control battery fans and indication board.
Requirements
Uses an LSOM for MCU and CAN circuitry → connects to both CarCAN and BPS CAN
Control and sense status of 4 contactors: HV+, HV-, Array, and Array Precharge
Reads precharge resistor voltage into ADC from precharge board
Control 2 fans using fan control IC from pump board
Uses an ESP32 for debugging and remote flashing of STM32 on LSOM
Drive LEDs on indication board to display battery status
Read the status of 3 discrete emergency stop buttons - these should be in series with the contactor drive signal to open contactors when the button is pressed
CAN stub for both CarCAN and BPS CAN - to allow charger & rear boards to connect to CAN buses
Strobe light connector on board - normally this will just be a CAN message to the lighting board, but we need a way to show the strobe when the shell is off at scrutineering
Measure temperature/humidity inside battery box using SHT45 sensor
Application Note
Context
Location of the board: Battery Box
Connection List
# | Name | Type | Part Number |
|---|---|---|---|
J1 |
|
|
|
Main
Schematics
Circuit Components
Layout
Github link:
PCB:
3D Model
RevB Testing plan:
(Only move to next step if previous is completed successfully)
Hardware tests
Confirm continuity between each LSOM pad and its final location.
Confirm correct pull up and pull down values
Verify perfect solder joints for hand soldered components
Check for shorts between all power planes and between planes for hand-soldered components
Clean board
Apply 24V into LV IN, verify that RPP and overvoltage protection works. Measure voltage of 24V.
Insert LSOM (with power turned off)
Measure all voltage levels to confirm nominal values (+3.3V, +3.3V_ESP, GND, +5V, +24V, GNDA, +3.3VA, +3.3V_USB)
Software tests
All instructions for each test will be written in the top of the test file
Driver Tests
Blinky: Is blinkying?
LED Driver Test: Can shift register correctly produce correct LED outputs?
Contactor Driver Test: (setup: jump ESTOP connectors) Does control signal turn on the LED? is Control- pulled to ground when control signal is high? When sense pin is jumped, does the sense test-point read the correct voltage? Can the driver read these values? Does the driver successfully call the callback function? Can said function trigger a fault if we simulate a welded contactor?
ESTOP Driver Test: Can code detect if ESTOP Jumper is removed (and trigger a fault)? Do LEDs turn on when the jumpers are removed?
Watchdog Driver Test: Does watchdog not trigger a fault when kicked on-time? Does it trigger a fault when this does not occur?
I2C Driver Test: Can interrupts be triggered when the board sends or receives I2C messages?
SHT4x Driver Test: (setup: probably have to remove cover on sensor, connect logic analyzer) Can code successfully communicate over I2C with SHT4x? Can sensor read when temp gets unnaturally hot (use heat gun, do not hold too long the threshold is not that high)?
EMC2305 Driver Test: Can EMC2305 Driver control and read fan RPM? (PWM Mode , TACH has issues)
ADC Driver Test: Can driver functionally convert a 0-3.3V ADC signal into a precharge voltage?
CAN Driver Test: Can board successfully send and receive messages over CAN?
Tasks/Logic Tests
(Note: for each of these tasks tune stack size such that it won’t run out of memory)
Task Test: Can heartbeat LED be made to blink on a set interval with an RTOS test?
Precharge Task Test: Using simulated ADC voltage values, can precharge task open contactors at correct values and register a fault if unexpected values occur?
On-Board Temperature Task Test: Can On-board Temperature task read temp from the SHT4x and raise flags if it is not in range, then put itself to sleep?
Volt-Temp-Amp Task: Can board request and receive voltage, temperature, and amperage over can from the respective boards and raise a flag if any of these values are in range, then sleep?
Contactor Task Test: Can Contactor Task confirm contactors are not welded and are in their expected positions? Can it detect if estop is pressed (jumpers are removed) within a reasonable timeframe?
Watchdog Task Test: Can watchdog task successfully keep watchdog kicked under heavy taskload?
Firmware
Tasks:
Init task
Create every other task, watchdog last
kill self
Volt monitor task
Read CAN messages of voltages from volt-temp boards
Set mod fault bits to indicate which module failed
Set fault bits if volt out of range, or if can message is not responding
Sleep
Temp monitor task
Read CAN messages of temps from volt-temp boards
Set mod fault bits to indicate which module failed
Send data to fans task
Set fault bits if tempout of range, or if can message is not responding
Sleep
Amps monitor task
Read CAN messages of amps from amperes board
Set fault bits if amps out of range, or if can message is not responding
Sleep
Fan task
Make sure fan speed matches expended value
Receive data from onboard temp, volt-temp, humidity
any individual value is out of nominal range -> Fans to 100% set fault bits
If average is out of nominal range -> Fans to 100% set fault bits
Use lookup table to set fans rpm based on these values
Sleep
On-board temp monitor task
Request temp and (humidity?) from onboard temp sensor
Send data to fans task
Send temp/rh CAN msg
Set fault bits if temp or humidity is out of range
Sleep
Contactor monitor task
Check each contactor physical state matches expected state
Sleep
CAN task
Forward all BPS CAN messages to CAR CAN, when they come in (interrupt based waking)
Fulfill all CAN info requests
Watchdog task
Confirm every task (that should) has checked in, if so, pet watchdog
Sleep
Precharge driver/monitor task
Check ADC values to confirm they are in range. Make sure ArrV !> BattV
Switch case based on states:
If Initial, confirm arrayV at 0. wait for ignition bit -> switch to start. Sleep
If Start, close pcharge contactor, wait for sense -> switch to charging state. Sleep short time.
If Charging, check if ArrayV = 90% BattV -> switch to run. Sleep short time.
If Run, confirm ArrayV = 85% BattV. Sleep
Main Task
Check fault bits -> fault handler
Switch case based on state:
If initial, wait for CAN ignition message -> switch to start, sleep
If start, set ignition bit -> switch to running, sleep
If running, sleep
Drivers
High-Level (Block Diagram)