VoltiX Pro 320 Diagnostic Station


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.
I’m blocked because the project ran out of execution credits during the library search, so I could not add or wire the Teensy socket.
Completed so far:
  • Inspected the schematic: no Raspberry Pi header or Teensy socket currently exists.
  • Searched the library for a Teensy 4.1 / 2x24 / 48-pin female socket: no exact usable part was found.
  • Found a usable Raspberry Pi 5 GPIO header candidate:
    • Pin Socket 02x20 for Rpi 5, 40 terminals, library UID 339d7494-1424-4871-b0a9-f2bc536ebf3e
  • 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:
  1. Add the Raspberry Pi 5 40-pin GPIO header.
  2. Add the Teensy 4.1 socket representation, likely as two 1x24 female headers if no exact 2x24 socket exists.
  3. 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
    • Teensy pins 11/12/13 -> SPI MOSI/MISO/SCK expansion nets
    • All Teensy/Pi/analog grounds -> common GND
  4. Run review and fix any ERC issues.
  5. Update the architecture/firmware notes with the final pin mapping.
Find socket headers
Add Pi header
Create pin map
Search 2x24 socket
Inspect existing nets

Waiting for input


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


"Isolated AC-DC Module\n36V DC Bus" "Protected node_36V Bus\nFuse TVS Bulk Caps" "Custom node_320W CV CC Buck Stage\n0.2V to node_30V node_0A to node_10A" "Dedicated node_5V node_5A Buck\nRaspberry Pi Rail" "Clean node_5V Buck\nTeensy and Analog Rail" "Raspberry Pi 5\nUI Database Network" "Teensy 4.1\nReal-Time Controller" "High-Speed ADC Front End\nVoltage Current Temp" "Buck Control Interface\nPWM DAC Enable Fault" "Battery Data Protocol Ports\nSMBus I2C 1-Wire UART" "Touchscreen Display\nHDMI DSI USB Touch" "Database and Logs\nLocal Storage Network" "Pi-Teensy Link\nUART or USB Serial" "Front Output Terminals\n0.2V to node_30V node_10A"
Control Partition
Raspberry Pi 5 Responsibilities
  • Touchscreen UI, menus, graphs, calibration workflows, and user profiles.
  • Database logic: session logs, battery profiles, protocol results, firmware/config files.
  • 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.
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


RailSourceLoadDesign Target
36V_BUS_PROTECTEDIsolated AC-DC module through fuse/TVSMain buck, auxiliary bucks36 V nominal, 15 A design path
5V_PIDedicated buck from 36 V busRaspberry Pi 55.1 V nominal, 5 A continuous, low drop to Pi connector
5V_CTRLSeparate clean buck from 36 V busTeensy 4.1, ADC, logic5 V, 1 A provisional, low-noise layout
3V3_CTRLTeensy regulator or external LDO/buckADC references, level shifters, sensors3.3 V, clean analog/digital partition
VOUT_PROGCustom buck outputDUT/front output0.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
  1. Mains module zone
    • Separate certified AC-DC module, inlet, fuse/switch/earth wiring.
    • Physically isolated from SELV boards.
  2. High-power DC zone
    • Existing 36 V input terminal/fuse/TVS/bulk caps.
    • Custom 320 W buck stage: MOSFETs, gate driver/controller, inductor, shunts, output capacitors.
    • Place near output terminals and airflow.
  3. Analog measurement zone
    • ADC, references, anti-alias filters, shunt sense routing.
    • Adjacent to Teensy, away from switch node and MOSFET/inductor loop.
  4. Real-time controller zone
    • Teensy 4.1 module, debug/programming access, hardware interlock lines.
    • Short routes to ADC and buck control signals.
  5. SBC/UI zone
    • Raspberry Pi 5, display connector/cable, USB/network access, storage access.
    • Keep away from hot power components and switch-node EMI.
  6. 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
  1. 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?
  2. For Pi-to-Teensy communication, do you prefer internal USB serial, dedicated UART, or both with one as fallback?
  3. How will the Raspberry Pi 5 touchscreen connect: HDMI + USB touch, DSI, or a specific 4.3 inch display module?
  4. Should the Pi 5 be powered through USB-C, GPIO 5 V pins, or a custom high-current board connector?
  5. For Teensy 4.1, should USB remain accessible externally for programming, or will the Pi program/control it internally?
  6. 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.
  7. Which battery data protocols are mandatory first: SMBus/I2C, 1-Wire, UART, HDQ, or vendor-specific phone battery interfaces?
  8. 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?
  9. 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?
  10. 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?
  • Scope

  • System Block Diagram

  • Control Partition

  • Raspberry Pi 5 Responsibilities

  • Teensy 4.1 Responsibilities

  • Pi to Teensy Communication Options

  • Option A: Dedicated High-Speed UART

  • Option B: Direct USB Serial

  • Recommended Architecture

  • Safe Data Sharing Protocol

  • Command Direction: Pi 5 -> Teensy

  • Telemetry Direction: Teensy -> Pi 5

  • Protocol Safety Rules

  • Logic-Level and Protection Notes

  • Power Distribution Plan

  • Raspberry Pi 5 Powering

  • Teensy 4.1 Powering

  • Layout Zoning Plan

  • Suggested Physical Zones

  • Placement Rules

  • Connector Placement Hold

  • Clarifying Questions