Project Setup for OBD-II to UART Dev Board

3:35

General
Project
Knowledge Base
Accessed Knowledge (5)

Using Knowledge Base Tool.

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.
113 days

Ready.


Q2
Manufacturer Part Number
BSS138DW-7-F
U1
Manufacturer Part Number
STN2120-I/ML
Q4
Q6
Manufacturer Part Number
BSS138DW-7-F
http://tinyurl.com/yw84vt54

This is the TI web bench designer link.

4
http://tinyurl.com/ylmmm54h

2
EQ: Vo = Vref(1+R2/R1)+(Iadj\*R2)

5
CAN_J1850_BUS_P_R1
PP5V0_SW_D
C37
Capacitance
1u F
CAN_J1850_P_R
C36
Capacitance
1u F
PP5V0_SW
UART_TX
CAN_ISO_RX
CAN_PWM_RX
CAN_HS_RX
CAN_J1850_BUS_N
GPIO_RESET
C3
Capacitance
.1u F
C24
Capacitance
.1u F
CAN_J1850_BUS_N
CAN_SW_RX
PP3V3
CAN_MS_RX
C41
Capacitance
.1u F
PPA3V3
UART_TX
CAN_J1850_BUS_N_R
PPJ1850_V_SELECT
OSC1
GPIO_SLEEP
CAN_J1850_BUS_N_TX
ANALOG_SENSE_IN
CAN_K_LINE_R
PPDLC_SW
PP3V3
C39
Capacitance
.1u F
CAN_J1850_P_SW
PPJ1850_ADJ
CAN_HS_RX
CAN_HS_TX
CAN_L_LINE
GPIO_CAN_MODE0
CAN_J1850_BUS_P
PPJ1850
GPIO_CAN_MODE1
CAN_J1850_BUS_N_R
CAN_J1850_BUS_P_R1
GPIO_LED_HOST_ACT
CAN_HS_LO
CAN_J1850_BUS_P_VH
CAN_J1850_BUS_P_TX
CAN_J1850_BUS_P
CAN_J1850_BUS_P_R2
CAN_J1850_P_SW
GPIO_STATUS_LED
PPDLC
C21
Capacitance
.1u F
GPIO_LED_OBD_ACT
PP5V0_SW_D
ANALOG_SENSE_IN
PPDLC
CAN_MS_RX
GPIO_STATUS_LED
CAN_HS_HI
C31
Capacitance
1u F
CAN_HS_RX
PP3V3
CAN_SW_TX
CAN_SW_TX
PPDLC
GPIO_CAN_LOAD
CAN_K_LINE
CAN_J1850_BUS_P_VH
PP5V0_SW
GPIO_LED_OBD_ACT
PWR_SAVE_CTRL
GPIO_LED_HOST_ACT
PP3V3
C23
Capacitance
.1u F
PPA3V3
PPDLC
PP5V0_SW
C35
Capacitance
.1u F
CAN_ISO_RX
PPDLC_RAW_BUF_IN
PP5V0
PPJ1850
CAN_PWM_RX
CAN_MS_HI
PP5V0
CAN_MS_TX
CAN_VPW_RX
CAN_ISO_L_TX
PP3V3
CAN_J1850_BUS_P_TX
CAN_J1850_P_D
CAN_K_LINE_R
PP3V3
CAN_ISO_K_TX
GPIO_RESET
GPIO_CAN_MODE0
CAN_K_LINE
CAN_MS_TX
CAN_J1850_CAN_P
CAN_J1850_BUS_P_R2
CAN_ISO_K_TX
GPIO_SLEEP
PPJ1850_V_SELECT
CAN_J1850_BUS_N_TX
PP3V3_SW
C9
Capacitance
.01u F
CAN_VPW_RX
PP3V3
OSC2
PP3V3
PWR_SAVE_CTRL
CAN_MS_LO
C22
Capacitance
.1u F
PWR_SAVE
OSC2
PP3V3
PPJ1850
PPDLC_SW
C40
Capacitance
1u F
PP3V3
GPIO_CAN_MODE1
C6
Capacitance
1u F
PPDLC_RAW
PPDLC_ISO
CAN_HS_TX
PP3V3
CAN_J1850_P_D
CAN_ISO_L_TX
OSC1
CAN_SW_RX
PPDLC_ISO
PPDLC_ISO
UART_RX
PP5V0_SW
CAN_MS_RX
PP3V3
R36
Resistance
10k Ω
R13
Resistance
100k Ω
R12
Resistance
100k Ω
R59
Resistance
10k Ω
R24
Resistance
13.7k Ω
C30
Capacitance
560p F
R35
Resistance
10k Ω
X2
R11
R45
Resistance
374 Ω
R7
Resistance
100k Ω
R20
Resistance
330 Ω
Q1
R32
Resistance
10k Ω
R19
Resistance
330 Ω
R43
Resistance
100 Ω
R42
Resistance
100 Ω
R62
Resistance
100 Ω
Q7
R55
Resistance
10k Ω
LED3
R46
Resistance
100k Ω
R5
Resistance
1k Ω
R27
Resistance
10k Ω
R4
Resistance
30k Ω
R56
Resistance
1.5k Ω
R1
Resistance
100k Ω
R41
Resistance
510 Ω
LED1
R31
Resistance
10k Ω
R60
Resistance
1.5k Ω
R34
Resistance
2.7k Ω
Q5
Manufacturer Part Number
MBT2222ADW1T1G
C27
Capacitance
560p F
R17
Resistance
100k Ω
R57
Resistance
10k Ω
R61
Resistance
10k Ω
C42
Capacitance
22u F
R51
Resistance
1k Ω
R26
Resistance
240 Ω
C26
Capacitance
560p F
R28
Resistance
10k Ω
R3
Resistance
10 Ω
R30
Resistance
10k Ω
C11
Capacitance
22u F
R23
Resistance
100k Ω
C4
Capacitance
12p F
R39
Resistance
100 Ω
C5
Capacitance
12p F
D8
Manufacturer Part Number
BAS16TW-7
R47
Resistance
100k Ω
C7
Capacitance
10u F
R54
Resistance
1k Ω
R48
Resistance
10k Ω
U4
Manufacturer Part Number
LM339LVRTER
R6
Resistance
620k Ω
R2
Resistance
100k Ω
R15
Resistance
1k Ω
U10
Not Recommended for New Designs
R58
Resistance
10k Ω
C8
Capacitance
330p F
R52
Resistance
510 Ω
R49
Resistance
1k Ω
R44
Resistance
866 Ω
R18
Resistance
330 Ω
U7
Manufacturer Part Number
LM317DCY
R33
Resistance
10k Ω
Q8
R22
Resistance
220k Ω
C29
Capacitance
560p F
R37
Resistance
10k Ω
U2
Manufacturer Part Number
TPS566242
R16
Resistance
100k Ω
R21
Resistance
10k Ω
R29
Resistance
10k Ω
LED2
R40
R14
Resistance
1.5k Ω


  • Ground
    A common return path for electric current. Commonly known as ground.
  • Net Portal
    Wirelessly connects nets on schematic. Used to organize schematics and separate functional blocks. To wirelessly connect net portals, give them same designator. #portal
  • Power Net Portal
    Wirelessly connects power nets on schematic. Identical to the net portal, but with a power symbol. Used to organize schematics and separate functional blocks. To wirelessly connect power net portals, give them the same designator. #portal #power
  • Generic Resistor
    A generic fixed resistor for rapid developing circuit topology. Save precious design time by seamlessly add more information to this part (value, footprint, etc.) as it becomes available. Standard resistor values: 1.0Ω 10Ω 100Ω 1.0kΩ 10kΩ 100kΩ 1.0MΩ 1.1Ω 11Ω 110Ω 1.1kΩ 11kΩ 110kΩ 1.1MΩ 1.2Ω 12Ω 120Ω 1.2kΩ 12kΩ 120kΩ 1.2MΩ 1.3Ω 13Ω 130Ω 1.3kΩ 13kΩ 130kΩ 1.3MΩ 1.5Ω 15Ω 150Ω 1.5kΩ 15kΩ 150kΩ 1.5MΩ 1.6Ω 16Ω 160Ω 1.6kΩ 16kΩ 160kΩ 1.6MΩ 1.8Ω 18Ω 180Ω 1.8KΩ 18kΩ 180kΩ 1.8MΩ 2.0Ω 20Ω 200Ω 2.0kΩ 20kΩ 200kΩ 2.0MΩ 2.2Ω 22Ω 220Ω 2.2kΩ 22kΩ 220kΩ 2.2MΩ 2.4Ω 24Ω 240Ω 2.4kΩ 24kΩ 240kΩ 2.4MΩ 2.7Ω 27Ω 270Ω 2.7kΩ 27kΩ 270kΩ 2.7MΩ 3.0Ω 30Ω 300Ω 3.0KΩ 30KΩ 300KΩ 3.0MΩ 3.3Ω 33Ω 330Ω 3.3kΩ 33kΩ 330kΩ 3.3MΩ 3.6Ω 36Ω 360Ω 3.6kΩ 36kΩ 360kΩ 3.6MΩ 3.9Ω 39Ω 390Ω 3.9kΩ 39kΩ 390kΩ 3.9MΩ 4.3Ω 43Ω 430Ω 4.3kΩ 43KΩ 430KΩ 4.3MΩ 4.7Ω 47Ω 470Ω 4.7kΩ 47kΩ 470kΩ 4.7MΩ 5.1Ω 51Ω 510Ω 5.1kΩ 51kΩ 510kΩ 5.1MΩ 5.6Ω 56Ω 560Ω 5.6kΩ 56kΩ 560kΩ 5.6MΩ 6.2Ω 62Ω 620Ω 6.2kΩ 62KΩ 620KΩ 6.2MΩ 6.8Ω 68Ω 680Ω 6.8kΩ 68kΩ 680kΩ 6.8MΩ 7.5Ω 75Ω 750Ω 7.5kΩ 75kΩ 750kΩ 7.5MΩ 8.2Ω 82Ω 820Ω 8.2kΩ 82kΩ 820kΩ 8.2MΩ 9.1Ω 91Ω 910Ω 9.1kΩ 91kΩ 910kΩ 9.1MΩ #generics #CommonPartsLibrary
  • Generic Capacitor
    A generic fixed capacitor ideal for rapid circuit topology development. You can choose between polarized and non-polarized types, its symbol and the footprint will automatically adapt based on your selection. Supported options include standard SMD sizes for ceramic capacitors (e.g., 0402, 0603, 0805), SMD sizes for aluminum electrolytic capacitors, and through-hole footprints for polarized capacitors. Save precious design time by seamlessly add more information to this part (value, footprint, etc.) as it becomes available. Standard capacitor values: 1.0pF 10pF 100pF 1000pF 0.01uF 0.1uF 1.0uF 10uF 100uF 1000uF 10,000uF 1.1pF 11pF 110pF 1100pF 1.2pF 12pF 120pF 1200pF 1.3pF 13pF 130pF 1300pF 1.5pF 15pF 150pF 1500pF 0.015uF 0.15uF 1.5uF 15uF 150uF 1500uF 1.6pF 16pF 160pF 1600pF 1.8pF 18pF 180pF 1800pF 2.0pF 20pF 200pF 2000pF 2.2pF 22pF 20pF 2200pF 0.022uF 0.22uF 2.2uF 22uF 220uF 2200uF 2.4pF 24pF 240pF 2400pF 2.7pF 27pF 270pF 2700pF 3.0pF 30pF 300pF 3000pF 3.3pF 33pF 330pF 3300pF 0.033uF 0.33uF 3.3uF 33uF 330uF 3300uF 3.6pF 36pF 360pF 3600pF 3.9pF 39pF 390pF 3900pF 4.3pF 43pF 430pF 4300pF 4.7pF 47pF 470pF 4700pF 0.047uF 0.47uF 4.7uF 47uF 470uF 4700uF 5.1pF 51pF 510pF 5100pF 5.6pF 56pF 560pF 5600pF 6.2pF 62pF 620pF 6200pF 6.8pF 68pF 680pF 6800pF 0.068uF 0.68uF 6.8uF 68uF 680uF 6800uF 7.5pF 75pF 750pF 7500pF 8.2pF 82pF 820pF 8200pF 9.1pF 91pF 910pF 9100pF #generics #CommonPartsLibrary
  • Generic Inductor
    A generic fixed inductor for rapid developing circuit topology. *You can now change the footprint and 3D model at the top level anytime you want. This is the power of #generics
  • Terminal
    Terminal
    An electrical connector acting as reusable interface to a conductor and creating a point where external circuits can be connected.
  • RMCF0805JT47K0
    47 kOhms ±5% 0.125W, 1/8W Chip Resistor 0805 (2012 Metric) Automotive AEC-Q200 Thick Film #forLedBlink
  • 875105359001
    10uF Capacitor Aluminum Polymer 20% 16V SMD 5x5.3mm #forLedBlink #commonpartslibrary #capacitor #aluminumpolymer #radialcan
  • CTL1206FYW1T
    Yellow 595nm LED Indication - Discrete 1.7V 1206 (3216 Metric) #forLedBlink

Inspect

STN2120 OBDII to UART Dev Board

STN2120 OBDII to UART Dev Board
Description

Created
Last updated by ryanf
1 Contributor(s)
ryanf

Controls

Properties

Availability & Pricing

DistributorQty 1
Digi-Key$6.81–$12.50
LCSC$13.73–$13.94
Mouser$22.80

Assets