I’ll add a Teensy 4.1 socket representation and wire the named control/telemetry nets. First I’ll check whether Pi/Teensy header parts already exist in the schematic/library; if a full Teensy socket part isn’t available, I’ll use a 48-pin dual-row header/socket with explicit net labels for the Teensy functions.
Confirmed the fallback plan: use either two 1x24 female socket strips or a 2x24 48-pin socket if available, then label the Teensy 4.1 functions explicitly.
Still to do once credits are available:
Add the Raspberry Pi 5 40-pin GPIO header.
Add the Teensy 4.1 socket representation, likely as two 1x24 female headers if no exact 2x24 socket exists.
Wire:
Teensy pin 1 TX1 -> Pi UART RX
Teensy pin 0 RX1 -> Pi UART TX
Teensy A0 / pin 14 -> shunt amplifier output net
Two Teensy PWM pins -> voltage adjust and current limit control nets
Raspberry Pi 5 + Teensy 4.1 System Architecture and Layout Plan
Scope
This plan upgrades the VoltiX Pro 320 architecture to use:
Raspberry Pi 5 as the master SBC for UI, touchscreen, data storage, database logic, networking, and high-level orchestration.
Teensy 4.1 as the deterministic real-time controller for ADC sampling, battery/protocol data acquisition, regulator control, and fast protection interlocks.
Connector placement is intentionally on hold until the clarifying questions at the end are answered.
System Block Diagram
Diagram
Control Partition
Raspberry Pi 5 Responsibilities
Touchscreen UI, menus, graphs, calibration workflows, and user profiles.
Network features: updates, data export, optional cloud sync.
High-level setpoints: requested voltage, current limit, output enable, test mode, protocol mode.
Non-real-time supervision: warnings, alarms, trend analysis, user prompts.
Teensy 4.1 Responsibilities
Real-time ADC sampling of output voltage, output current, input bus voltage, temperatures, and optional battery telemetry.
Control-loop execution for CV/CC buck stage setpoints.
Fast protection actions independent of Linux: overcurrent, overvoltage, overtemperature, ADC out-of-range, watchdog timeout.
Battery data protocol reading: SMBus/I2C, 1-Wire, UART-based pack interfaces, and module ID detection.
Deterministic output enable/disable and fault-latch behavior.
Pi to Teensy Communication Options
Option A: Dedicated High-Speed UART
Recommended when the Pi and Teensy are mounted on the same internal board/backplane and a robust embedded link is desired.
Electrical level: 3.3 V CMOS UART on both sides. Raspberry Pi 5 GPIO and Teensy 4.1 GPIO are both 3.3 V logic, so no level shifting is needed for direct Pi GPIO UART to Teensy UART.
Add series resistors: 22 to 100 ohm on TX lines for edge damping.
Add ground reference and optional ESD if the link leaves the board.
Suggested signals:
PI_UART_TX -> TEENSY_UART_RX
TEENSY_UART_TX -> PI_UART_RX
PI_READY -> Teensy GPIO input
TEENSY_FAULT -> Pi GPIO input
Optional TEENSY_BOOT/RESET control only if firmware update automation is required.
Suggested baud rate: 1 Mbps to 3 Mbps after signal integrity validation; start at 921600 baud for bring-up.
Option B: Direct USB Serial
Recommended when using stock Raspberry Pi 5 and stock Teensy 4.1 boards with minimal wiring.
Teensy 4.1 USB device port connects to Raspberry Pi 5 USB host port.
The Teensy appears as a USB serial device to Linux.
Advantages: no GPIO UART configuration, higher reliability, easier firmware workflow.
Disadvantages: requires USB cable/connector inside the enclosure, Linux USB enumeration delay, and slightly more complex recovery if USB resets during a fault.
Recommended Architecture
Use USB serial for first prototype bring-up and reserve a dedicated 3.3 V UART header/link on the internal board as a production option. The Teensy must keep hard real-time fault control locally and never depend on Linux for shutdown.
Safe Data Sharing Protocol
Command Direction: Pi 5 -> Teensy
Set output voltage target.
Set current limit target.
Enable/disable output.
Select test mode or battery protocol mode.
Request calibration mode.
Request telemetry snapshot or streaming rate.
Telemetry Direction: Teensy -> Pi 5
Output voltage/current/power.
Input bus voltage/current estimate.
Temperature channels.
Output state and active control mode: CV, CC, disabled, fault.
Fault flags and latched fault history.
Battery/protocol data frames.
Protocol Safety Rules
Use framed packets with length, command ID, sequence number, payload, and CRC.
Teensy validates every command before applying it.
Teensy enforces hardware-safe limits even if the Pi requests an invalid setpoint.
Use heartbeat/watchdog: if Pi heartbeat stops, Teensy either holds last safe state for a short timeout or disables output depending on selected mode.
Faults are latched in Teensy and require explicit clear command plus safe measured state.
Calibration constants stored locally in Teensy and mirrored to Pi database.
Logic-Level and Protection Notes
Raspberry Pi 5 GPIO: 3.3 V only, not 5 V tolerant.
Teensy 4.1 GPIO: 3.3 V logic, not 5 V tolerant on most pins.
Direct UART between Pi 5 and Teensy 4.1 is electrically compatible at 3.3 V.
Any 5 V battery/module protocol line must be level shifted or protected before reaching Teensy or Pi GPIO.
Use dedicated level shifters for bidirectional I2C/SMBus pack interfaces if external packs may present 5 V pull-ups.
Use ESD protection on all external-facing protocol/module connectors.
Keep analog measurement front end referenced to the Teensy analog ground area, with Kelvin routing from current shunts.
Power Distribution Plan
Table
Rail
Source
Load
Design Target
36V_BUS_PROTECTED
Isolated AC-DC module through fuse/TVS
Main buck, auxiliary bucks
36 V nominal, 15 A design path
5V_PI
Dedicated buck from 36 V bus
Raspberry Pi 5
5.1 V nominal, 5 A continuous, low drop to Pi connector
5V_CTRL
Separate clean buck from 36 V bus
Teensy 4.1, ADC, logic
5 V, 1 A provisional, low-noise layout
3V3_CTRL
Teensy regulator or external LDO/buck
ADC references, level shifters, sensors
3.3 V, clean analog/digital partition
VOUT_PROG
Custom buck output
DUT/front output
0.2 V to 30 V, 10 A
Raspberry Pi 5 Powering
Preferred: dedicated 5.1 V / 5 A buck with USB-C power input emulation or a robust 5 V/GND connector to Pi power pins.
If powering through GPIO 5 V pins, add fuse/current limit and ensure cable/connector resistance is very low.
Do not share the Pi 5 rail directly with sensitive analog ADC/reference circuitry.
Teensy 4.1 Powering
Use separate 5V_CTRL rail for Teensy VIN/VUSB strategy.
If Teensy USB is connected to Pi for data, avoid back-power conflicts by defining whether Teensy is powered from board 5V_CTRL or USB VBUS.
Add a USB power isolation/jumper or ideal-diode arrangement if both board power and USB can be present.
Layout Zoning Plan
Suggested Physical Zones
Mains module zone
Separate certified AC-DC module, inlet, fuse/switch/earth wiring.
Raspberry Pi 5, display connector/cable, USB/network access, storage access.
Keep away from hot power components and switch-node EMI.
External/module connector zone
Battery/protocol connectors, expansion modules, ESD protection, hot-plug power switching.
Edge-facing for accessibility.
Placement Rules
Keep the buck switch node copper compact and away from Pi/Teensy/ADC traces.
Put current shunts and sense amplifiers close to the measured current path, with Kelvin routing.
Route analog ADC inputs as filtered, guarded low-noise signals.
Separate Pi high-speed/display/USB cables from the buck power loop.
Use a common ground strategy with controlled return paths; do not split ground under control or measurement signals unless a full mixed-signal grounding plan is defined.
Connector Placement Hold
Before placing Raspberry Pi, Teensy, UART/USB, display, ADC, battery protocol, and power connectors, the following must be confirmed.
Clarifying Questions
Are you using stock Raspberry Pi 5 and stock Teensy 4.1 boards as plug-in modules, or do you want their circuitry integrated directly onto the custom PCB?
For Pi-to-Teensy communication, do you prefer internal USB serial, dedicated UART, or both with one as fallback?
How will the Raspberry Pi 5 touchscreen connect: HDMI + USB touch, DSI, or a specific 4.3 inch display module?
Should the Pi 5 be powered through USB-C, GPIO 5 V pins, or a custom high-current board connector?
For Teensy 4.1, should USB remain accessible externally for programming, or will the Pi program/control it internally?
What ADC performance target do you want for voltage/current metrics: sample rate, resolution, and accuracy? Example: 16-bit at 10 kS/s, 18-bit at 1 kS/s, etc.
Which battery data protocols are mandatory first: SMBus/I2C, 1-Wire, UART, HDQ, or vendor-specific phone battery interfaces?
Do external battery/protocol ports need to tolerate 5 V pull-ups/signals, or should all external logic be clamped/translated to 3.3 V?
Should the custom buck stage support only step-down from 36 V to 0.2-30 V, or do you truly need buck-boost behavior below/above the input bus in future revisions?
What enclosure/front-panel arrangement do you want: Pi/display on front panel with Teensy/power boards behind, or one main carrier board behind the display?