Project Setup for OBD-II to UART Dev Board

3:35

Accessing knowledge base.

Below is a ready-to-paste prompt you can use to kick off a new Flux copilot session to recreate this OBD-II to UART dev board. It specifies parts, rails, passives sizing guidance, and which buffers/transceivers each signal must pass through.
Prompt for new Flux copilot
Project goal
  • Create an OBD-II to UART interface dev board (ELM327/STN2120 class) that supports HS-CAN, MS-CAN, Single-Wire CAN (SW-CAN), ISO9141/ISO14230 (K/L-Line), and J1850 VPW/PWM, with a UART header for host connection and a DB9 for vehicle signals.
Major components (add these exact parts)
Power architecture and rails
Required rail decoupling and bulk caps (apply to every IC)
  • For each IC power pin, place decoupling: 100nF Capacitor + 1uF 0402 Capacitor + nearby rail bulk 10uF 0402 capacitor or 22uF 0805 25V Capacitor as space allows.
  • Use low-ESR ceramic capacitors for high-frequency decoupling; reserve tantalum/electrolytic for bulk decoupling.
  • Capacitor voltage derating:
    • Ensure capacitors operate at no more than 60% of their maximum rated voltage.
    • For tantalum, derate operating voltage to ≤50%.
  • Buck output capacitor design: size Cout so that ΔV = ΔI·ESR + ΔI/(8·fSW·Cout) and choose a voltage rating ≥1.5×VOUT.
  • Add downstream ceramic decoupling near switching loads to limit EMI coupling.
Critical signals and mandatory buffers/transceivers
  • HS‑CAN (CANH/CANL) must go through MCP2551T-I/SN. Include 120Ω termination resistors at both ends of the bus. Add input protection/EMI RC: series 100Ω 0402 Resistor with shunt 560pF 0402 capacitor to GND close to the connector.
  • MS‑CAN (CANH/CANL) must go through a second MCP2551T-I/SN. Same 120Ω termination guidance at network ends; replicate RC filtering as above at the node.
  • SW‑CAN (Single‑Wire CAN) must go through TH8056KDC-AAA-008. Follow the transceiver datasheet for line filtering and termination; include mode control pins to MCU GPIO.
  • ISO9141/ISO14230 K and L lines must be driven and sensed through discrete stages: driver with MBT2222ADW1T1G and protection/steering diodes BAS16TW-7, receive path thresholding/shaping via LM339LVRTER with RC filters (e.g., 100Ω 0402 Resistor/560pF 0402 capacitor) before the comparator inputs.
  • J1850 VPW/PWM:
    • TX high‑side gating and level selection via ZXMP6A13FTA and logic‑level shifting via BSS138DW-7-F.
    • RX threshold/conditioning through LM339LVRTER with a defined reference (R‑divider) and input RC filter.
  • UART to host is MCU UART through series resistors 100Ω 0402 Resistor to a 0.1 inch header.
Signal integrity and protection
  • Add series resistors (47–100 Ω) on MCU TX/RX, transceiver RXD/TXD, and comparator outputs to limit edge rates.
  • Place ESD/TVS or clamp diodes as required at the connector side for all vehicle‑facing nets using BAS16TW-7 or appropriate automotive TVS devices as per transceiver datasheets.
  • Crystal: keep traces short and symmetric; load with two 12pF 0402 capacitor to GND; include a nearby 0.1uF 0402 Capacitor on MCU VCAP/AVDD pins.
Power budget (instruct the copilot to compute and verify from datasheets)
  • Compute worst‑case rail currents from datasheets and populate a budget with ≥30% headroom. Tabulate like this and fill in the numbers: | Rail | Consumer | MPN | Qty | I worst‑case (mA) | Notes | |------|----------|-----|-----|-------------------|-------| | 5 V | Buck losses, LDO input | TPS56624x | 1 | [calc] | Include switching/bias current | | 5 V | 3.3 V LDO input | LM317DCY | 1 | [calc] | Iout_3V3 + LDO overhead | | 5 V | J1850 LDO input | LM317DCY | 1 | [calc] | Based on J1850 load profile | | 3.3 V | MCU core/IO | STN2120 | 1 | [calc] | Worst‑case active current | | 3.3 V | Logic/LEDs | Low Power Green LED | 3 | [calc] | Set by series R | | 5 V | HS‑CAN transceiver | MCP2551T-I/SN | 1 | [calc] | Dominant recessive worst‑case | | 5 V | MS‑CAN transceiver | MCP2551T-I/SN | 1 | [calc] | As above | | 5 V | SW‑CAN transceiver | TH8056KDC-AAA-008 | 1 | [calc] | TX/RX worst‑case | | 5 V | Comparators | LM339LVRTER | 1 | [calc] | Supply current over temp |
  • Ensure regulator thermal dissipation for the 3.3 V and J1850 LDOs is acceptable: P ≈ (VIN − VOUT) × IOUT with adequate copper pour for heat.
Key passives and starting values (tune to datasheets)
  • Buck (5 V): L = 2.2uH Inductor, Cout = multi‑MLCC mix totaling 44–88 µF effective at bias, Cin ≥ 22–47 µF ceramic + optional electrolytic; snubbers as required by ringing.
  • Per‑line RCs (connector side): Rseries = 100Ω 0402 Resistor, Cshunt = 560pF 0402 capacitor to GND.
  • LED resistors: choose 330Ω 0402 Resistor for modest current; adjust to target brightness.
  • Add a termination 120Ω 0402 Resistor across CANH/CANL as a local test/plug where appropriate; ensure network‑end terminations are present in the system.
Schematic and net guidance
  • Name rails and critical nets clearly (e.g., PP5V0, PP3V3, HS_CAN_HI/LO, MS_CAN_HI/LO, SW_CAN, K_LINE, L_LINE, J1850_BUS±).
  • Ensure all microcontroller pins for TX/RX of each protocol are only connected through their required transceiver/buffer stages listed above; never directly to the connector.
  • Provide mode pins (enable, slope/RS, mode0/1) for each transceiver to the MCU with pull‑ups/downs sized per datasheets (start with 10kΩ 0402 Resistor).
Layout guidance (high level)
  • Place decoupling caps adjacent to each IC power pin with the 100 nF closest, then 1 µF.
  • Keep crystal loop short and away from switching nodes.
  • Route vehicle‑facing nets away from the buck’s SW node; add stitching vias around comparators and transceivers to a quiet GND.
  • Place RC input filters at the connector‑side, immediately before the transceivers/comparators.
What to deliver
  • Complete schematic with all parts/nets, decoupling per IC, and the power budget table fully populated from datasheets (worst‑case).
  • BOM with availability checked for all MPNs.
  • Basic layout with keep‑ins/outs defined, and critical placement done (buck, transceivers, crystal/MCU).
  • ERC/DRC clean; CAN termination and ISO/K/J1850 buffers verified; capacitor derating rules applied exactly as specified above.
Notes for copilot
  • Use the datasheets to size all passives and fill the power table. Apply: 120Ω CAN termination at both ends; low‑ESR MLCC for high‑freq decoupling; capacitors operate at no more than 60% of rating; tantalum at ≤50%; buck Cout rating ≥1.5×VOUT; and ΔV = ΔI·ESR + ΔI/(8·fSW·Cout).
  • Confirm all MCU‑to‑vehicle paths go through the indicated buffers/transceivers before connecting to the DB9.
SK34A footprint
3.3 V LDO dissipation
Decoupling net class
CAN termination resistor
205 days

To get started, talk to Flux or create a New Document.

Documents

    Documents are markdown text files which describe project goals, capture details, or even simulation outputs.

    Assets

    No assets added.

    STN2120 OBDII to UART Dev Board

    STN2120 OBDII to UART Dev Board thumbnail
    OBD2 to UART interface dev board. Alternative to deprecated ELM237 Chipset.
    Documentation:

    Properties

    Properties describe core aspects of the project.

    Pricing & Availability

    Distributor

    Qty 1

    Digi-Key

    $6.81–$12.50

    LCSC

    $13.73–$13.94

    Mouser

    $22.80

    Controls