Chat


How can I help you?

Explain project
Write a project description
Find schematic issues

Design Notes
Ultrasonic subsystem integration
Date: 2026-04-17
Objective
Replace the provisional ultrasonic implementation with a PGA460 direct-drive half-bridge design for an external 2-wire waterproof automotive-style transducer.
Datasheet-driven corrections in progress
  • Remove the incorrect tie from IOREG toward the MCU 3.3 V rail.
  • Strap TEST low at power-up so the PGA460 digital outputs operate at 3.3 V.
  • Replace the prior transformer-drive-only receive resistor usage with the direct-drive half-bridge support network.
  • Add the required external high-side P-channel MOSFET used by the PGA460 direct-drive half-bridge method.
  • Add receive path capacitors C(INP) and C(INN).
  • Add DECPL support components.
Current architecture intent
  • U6 remains the ultrasonic front-end.
  • CN2 remains the 2-pin board-edge connector for the external transducer.
  • VPWR remains on VIN_12V.
  • UART control remains on U2 pins PB10 and PB11.
  • Direct-drive half-bridge implementation uses one PGA460 OUTx pin to drive the external P-channel MOSFET and the other OUTx pin to directly excite the transducer.
Connector note
  • CN2 is still the temporary in-library connector placeholder.
  • Intended production migration target remains a sealed automotive connector family such as Deutsch DT/DTM or TE AMPSEAL once a suitable PCB part is available in the library.
Arducam Mega 3MP NoIR camera integration
Date: 2026-04-17
Objective
Integrate the external Arducam Mega 3MP NoIR SPI camera and the external Dorhea 850 nm IR illuminator through one combined board-mounted JST XH 8-pin connector while preserving the existing modem, debug, and ultrasonic interfaces.
Camera interface summary
  • Camera module family: Arducam Mega 3MP NoIR SPI camera, external module with XH2.54-6P connector.
  • Interface: 4-wire SPI plus chip select, power, and ground.
  • Published supply options: 3.3 V or 5 V.
  • Published current / power: up to 317 mA working, up to 1.58 W.
Implemented board-side pinout
  • U7 pin 1 -> GND
  • U7 pin 2 -> 3V3_MCU
  • U7 pin 3 -> CAM_SCLK -> U2 PA5
  • U7 pin 4 -> CAM_MISO -> U2 PA6
  • U7 pin 5 -> CAM_MOSI -> U2 PA7
  • U7 pin 6 -> CAM_CS -> U2 PB0
  • U7 pin 7 -> IR_ILLUM_3V3_SW
  • U7 pin 8 -> GND
Design rationale
  • SPI1 pins PA5, PA6, and PA7 were unused and form a clean dedicated camera bus.
  • PB0 was chosen as a dedicated GPIO chip select because it was unused and avoids conflicts with SWD, USB, modem, and ultrasonic functions.
  • The camera is powered from 3V3_MCU because the module explicitly supports 3.3 V operation, which keeps all SPI signaling in the STM32L433 voltage domain without level shifting.
  • Connector pin order keeps GND first, camera power second, preserves the existing SPI signal order, and adds a dedicated switched IR power pin plus a second GND for cable return robustness.
Dorhea 850 nm IR illuminator integration
Date: 2026-04-26
Objective
Add support for an external Dorhea 850 nm IR illuminator module on the combined 8-pin external connector using an MCU-controlled switched 3.3 V high-side power path so the illuminator is off during reset and sleep.
Implemented interface and power path
  • U7 is the combined board-side 8-pin connector for the camera and IR illuminator.
  • Required IR-related connector pinout per module requirement:
    • U7 pin 7 -> IR_ILLUM_3V3_SW
    • U7 pin 8 -> GND
  • Q3 is a P-channel high-side MOSFET that switches 3V3_MCU onto IR_ILLUM_3V3_SW.
  • R23 is a 10 kΩ gate pull-up from Q3 source to gate so the switch defaults OFF.
  • R24 is a 100 Ω series gate resistor between the MCU control net and the MOSFET gate.
  • C30 is a 4.7 µF local bulk capacitor on the switched IR rail.
  • D9 is a 3.3 V TVS diode from the switched rail to ground at the external connector.
Control logic
  • U2 PB12 drives net IR_ILLUM_EN_L.
  • IR_ILLUM_EN_L passes through R24 into gate node IR_ILLUM_GATE.
  • Because Q3 is a P-channel high-side device, the control is active low:
    • PB12 = low -> Q3 ON -> IR_ILLUM_3V3_SW powered
    • PB12 = high or Hi-Z -> R23 pulls the gate up -> Q3 OFF
  • This default-off biasing ensures the IR illuminator remains off during MCU reset and sleep unless firmware intentionally asserts the control.
Connector and mating note
  • Board connector: U7 = JST XH series B8B-XH-A(LF)(SN).
  • Intended mating side: JST XH series 8-position housing with matching crimp terminals, or an equivalent pre-crimped 8-wire cable assembly.
Integration notes
  • The IR subsystem reuses only the existing 3V3_MCU and GND rails; it does not share camera control nets or modem control nets.
  • The switched rail is explicitly labeled IR_ILLUM_3V3_SW to keep the IR load separated from the always-on camera 3.3 V pin on the same external connector during schematic review and firmware bring-up.
  • The MCU-facing control net is explicitly labeled IR_ILLUM_EN_L to make the active-low behavior obvious in both firmware and hardware review.
Combined external camera + IR connector implementation
Date: 2026-04-26
Objective
Replace the separate external camera connector and IR illuminator connector with one combined external connector while preserving:
  • dedicated camera supply on 3V3_MCU
  • separate switched IR power on IR_ILLUM_3V3_SW
  • existing camera SPI signal net names CAM_SCLK, CAM_MISO, CAM_MOSI, and CAM_CS
  • at least two GND pins on the new connector for signal return and current sharing
Preferred combined pin budget
Preferred target is an 8-pin connector with this logical allocation:
  1. GND
  2. 3V3_MCU
  3. CAM_SCLK
  4. CAM_MISO
  5. CAM_MOSI
  6. CAM_CS
  7. IR_ILLUM_3V3_SW
  8. GND
Implemented result
  1. Selected a single JST XH 8-pin external connector family that is suitable for both the camera harness and the IR illuminator current path.
  2. Replaced the former separate camera and IR connectors with U7, one combined 8-pin connector.
  3. Assigned the new connector pins so the camera power and SPI nets remain unchanged, the IR power pin stays on IR_ILLUM_3V3_SW, and two pins are tied to GND.
  4. Kept the existing camera signal-conditioning and protection circuitry in circuit:
  5. Kept the existing IR switched-power path and connector-side protection in circuit:
  6. Updated connector Role / Role Details and documentation so the new combined interface clearly distinguishes always-on camera 3.3 V from switched IR 3.3 V.
  7. Verified there are no accidental net merges between 3V3_MCU and IR_ILLUM_3V3_SW, no camera SPI net renames, and no new conflicts with the existing camera ESD or IR switch circuitry.
  8. Confirmed the old dedicated IR connector is removed from the current schematic component set.
External illuminated pushbutton integration
Date: 2026-04-26
Objective
Integrate the user-specified FLM12-FJ-6-A10M4-BGXX012-24V momentary illuminated pushbutton into the STM32 subsystem through one dedicated 4-wire external connector, while avoiding conflicts with the current modem, camera, ultrasonic, USB, debug, and IR-control interfaces.
Part-level requirements verified so far
  • Family-level product information for the FILN FLM12-FJ series indicates a momentary OFF-(ON) / SPST / 1NO pushbutton architecture.
  • The illuminated variants in this family use separate switch and LED circuits, so the intended off-board wiring model is 4 conductors total:
    1. switch signal
    2. switch return
    3. LED supply
    4. LED return
  • The exact suffix -24V is treated as a 24 V LED option, so the LED path must be handled as a higher-voltage interface and must not be driven directly from an STM32 GPIO.
  • Public family references confirm the momentary switch behavior and separate LED concept, but the exact terminal numbering and LED polarity for this exact suffix-coded variant still need final confirmation from the vendor drawing / purchase documentation before release.
Implemented result
  • Added J7, a dedicated 4-wire JST XH connector for the external illuminated pushbutton.
  • Added R25, R26, C31, and D10 to create a protected, filtered active-low button input into U2 PC13.
  • Added Q4, R27, and R28 to create a board-side low-side LED driver from U2 PB13.
  • Added D12 from the connector LED supply pin to ground to clamp transients on the off-board LED supply lead.
  • Kept the new interface isolated from the existing camera SPI and IR illuminator assignments: camera remains on PA5 / PA6 / PA7 / PB0, and IR control remains on PB12.
Selected MCU GPIOs
  • PC13 on U2 is used for the pushbutton input.
    • Rationale: low-speed input use is appropriate, and the STM32L433 restriction on PC13-PC15 output-drive use is respected by keeping PC13 input-only.
  • PB13 on U2 is used for the pushbutton LED control output.
    • Rationale: PB13 was unused, general-purpose capable, and does not conflict with SWD, USB, modem, camera SPI, ultrasonic UART, I2C, crystal, or IR-illuminator control assignments.
Connector definition
The implemented dedicated 4-wire external connector is J7 with this board-side pinout:
  1. GND
  2. VIN_12V — LED supply line for the illuminated switch
  3. EXT_BTN_RAW — switch sense line from the off-board dry contact
  4. EXT_BTN_LED_RETURN_SW — switched LED return driven by the board-side LED driver stage
This keeps the switch-contact pair and LED pair electrically separate, which matches the expected FLM12-FJ illuminated-button wiring style and follows the preferred connector convention of ground first, power second.
Support circuitry implementation
Switch input path
  • The pushbutton contact is treated as a dry contact into the MCU.
  • The input is implemented as active-low:
    • J7 pin 1 -> GND
    • J7 pin 3 -> EXT_BTN_RAW
    • D10 clamps EXT_BTN_RAW to ground at the connector entry
    • R26 provides series protection from EXT_BTN_RAW into filtered node EXT_BTN_N
    • R25 pulls EXT_BTN_N up to 3V3_MCU
    • C31 filters EXT_BTN_N to ground for basic debounce / EMI suppression
    • EXT_BTN_N connects to U2 PC13
LED control path
  • The illuminated button LED is not driven directly from PB13.
  • Q4 implements the dedicated board-side low-side LED driver:
    • J7 pin 2 -> VIN_12V
    • J7 pin 4 -> EXT_BTN_LED_RETURN_SW
    • Q4 drain -> EXT_BTN_LED_RETURN_SW
    • Q4 source -> GND
    • R27 is the PB13-to-gate series resistor
    • R28 is the gate pull-down so the LED stays off during reset / boot / high-impedance states
    • D12 clamps transients on the VIN_12V connector supply pin
  • The exact switch suffix indicates a 24 V LED option, but the current board exposes VIN_12V on the LED supply pin because no 24 V rail exists in the present power tree. This preserves GPIO-safe control and connector integration now; prototype validation must confirm whether the available VIN_12V illumination level is acceptable or whether a later dedicated 24 V LED supply is needed.
Signal and behavior requirements
  • The pushbutton input must be firmware-visible as a dedicated GPIO event source on PC13.
  • The LED must be firmware-controllable from PB13 through the external driver stage.
  • Default behavior requirement:
    • button input idles inactive when the harness is connected and the button is not pressed
    • LED remains off by default during reset, boot, and low-power states unless firmware intentionally enables it
  • Keep the new button nets distinct from all existing camera, modem, ultrasonic, USB, SWD, and IR-illuminator nets.
Documentation and implementation follow-through
  • The schematic now includes the dedicated 4-wire connector, filtered/protected switch input path, and PB13-controlled LED driver stage.
  • Firmware notes have been updated so PC13 is treated as an active-low user input and PB13 is treated as the LED-enable output.
Remaining clarifications
  • Confirm the exact terminal numbering and LED polarity for FLM12-FJ-6-A10M4-BGXX012-24V from vendor documentation before cable release.
  • Confirm whether the 24 V LED option is internally current-limited.
  • Validate on hardware whether the current VIN_12V LED-supply choice gives sufficient illumination, or plan a later dedicated 24 V LED supply if full-rated brightness is mandatory.
  • Mating connector for J7: JST XH series XHP-4 housing with matching JST SXH crimp contacts, or an equivalent pre-crimped 4-wire JST XH cable assembly.
Main battery load disconnect switch implementation
Date: 2026-04-27
Objective
Add a simple user-operated main power switch that disconnects the battery discharge path from the system load while preserving the separate solar top-off path into the battery.
Implemented power-path behavior
  • Replaced SW1 with SS-12D10L5, a smaller through-hole SPDT slide switch used as a simple on/off main power switch.
  • The battery barrel-jack path remains:
    • J1 center pin -> D2 -> BATTERY_12V_RAW
    • BATTERY_12V_RAW -> U4 battery monitor input
  • The solar path remains upstream of the new switch:
    • J4 -> D4 -> IC-1 solar monitor -> R11 -> BATTERY_12V_RAW
  • The new switched discharge path is now:
    • U4 monitor output -> BATTERY_12V_SW_SRC -> SW1 pin 2 (common) -> SW1 pin 1 (used throw) -> VIN_12V
  • SW1 pin 3 is intentionally left unused so the part behaves like a compact SPST disconnect in this design.
Effect on downstream loads
  • VIN_12V is now the switched system-load rail.
  • The following loads remain on VIN_12V and therefore turn off with SW1 open:
    • U1 input / enable path for the 5 V buck rail
    • U6 VPWR / AVDD ultrasonic supply path
    • J5 motor supply input side
Intended user-visible behavior
  • SW1 ON: battery discharge path feeds VIN_12V; system loads operate normally.
  • SW1 OFF: VIN_12V is disconnected from the battery; normal system loads are off.
  • Solar top-off path from J4 to the battery remains available even when SW1 is OFF because it reconnects into BATTERY_12V_RAW upstream of the switch.
Replacement note
  • This update preserves the original power architecture intent while shrinking the switch footprint in the PCB layout.
  • The solar branch remains unswitched: J4 -> D4 -> IC-1 -> R11 -> BATTERY_12V_RAW.
Main battery power switch requirements-capture plan
Date: 2026-04-27
Objective
Capture the requirements needed to add a simple main power switch in the battery discharge path while preserving the ability for the solar input to continue trickle-charging the battery when the main power switch is OFF.
Very high-level execution plan
  1. Document the intended user behavior
    • Define exactly what ON and OFF must mean from the user's perspective.
    • Confirm which subsystems must lose power when the main switch is OFF.
    • Confirm whether any circuits must remain alive while OFF (for example charging, battery protection, fuel gauge, wake detection, or status indication).
  2. Define power-path boundaries
    • Identify the battery-side nodes that belong to the always-connected charging path versus the switched system-load path.
    • Establish the architectural rule that the solar charge path must remain electrically valid regardless of main switch position.
    • Record which existing rails are considered "battery domain," "charger domain," and "system-load domain."
  3. Capture charging and safety requirements
    • Confirm that solar trickle charging must work with the load disconnected.
    • Confirm whether charging while the switch is ON must also remain supported with no change to expected behavior.
    • Record any constraints related to battery chemistry, protection, reverse current blocking, undervoltage behavior, and safe shutdown expectations.
  4. Capture operating-current and switch-use requirements
    • Define the expected battery discharge current range that the main switch must interrupt.
    • Define expected inrush / peak conditions at turn-on.
    • Capture preferred switch style and user-interface constraints such as slide, rocker, tactuated latch, sealed part, panel access, or board-edge access.
  5. Identify verification requirements before implementation
    • Define the acceptance checks for OFF-mode behavior, ON-mode behavior, and solar-charging-with-switch-OFF behavior.
    • Define what must be measured or observed during validation, such as battery charge current, downstream rail collapse, charger status behavior, and absence of unintended back-power paths.
  6. Record schematic-impact scope
    • Note which existing project blocks will need review during implementation: battery connector/path, solar input/charger path, downstream regulators, power flags/net naming, and any always-on monitoring circuitry.
    • Record whether connector, enclosure, or harness changes are allowed or whether the switch must fit within the current mechanical concept.
  7. Freeze the requirement set before circuit edits
    • Convert the agreed behavior into a short checklist of must-have requirements and non-goals.
    • Get sign-off on the power-path intent before choosing the actual switching method or modifying the schematic.
Initial requirement statement to carry forward
  • The main power switch shall disconnect the battery from the normal system discharge path.
  • The solar input shall remain able to trickle-charge the battery when the main power switch is OFF.
  • The switch addition shall be treated first as a power-architecture and requirements update, not a detailed circuit redesign task.
  • Ultrasonic subsystem integration

  • Objective

  • Datasheet-driven corrections in progress

  • Current architecture intent

  • Connector note

  • Arducam Mega 3MP NoIR camera integration

  • Objective

  • Camera interface summary

  • Implemented board-side pinout

  • Design rationale

  • Dorhea 850 nm IR illuminator integration

  • Objective

  • Implemented interface and power path

  • Control logic

  • Connector and mating note

  • Integration notes

  • Combined external camera + IR connector implementation

  • Objective

  • Preferred combined pin budget

  • Implemented result

  • External illuminated pushbutton integration

  • Objective

  • Part-level requirements verified so far

  • Implemented result

  • Selected MCU GPIOs

  • Connector definition

  • Support circuitry implementation

  • Signal and behavior requirements

  • Documentation and implementation follow-through

  • Remaining clarifications

  • Main battery load disconnect switch implementation

  • Objective

  • Implemented power-path behavior

  • Effect on downstream loads

  • Intended user-visible behavior

  • Replacement note

  • Main battery power switch requirements-capture plan

  • Objective

  • Very high-level execution plan

  • Initial requirement statement to carry forward