Integrated circuits · 3.3 V differential bus
SN65HVD230: Two Transmit Requests, One CAN Bus State
With two SN65HVD230 transceivers on the same pair of wires, one low transmit input can make both receivers report low. Wire a short 3.3 V bench bus, try four combinations, and check what the two signal wires actually do.
What to measure
In a Controller Area Network (CAN), a transceiver connects digital logic to a differential pair. The receiver compares two voltages, CANH and CANL. In this experiment, dominant means the transceiver actively makes CANH higher than CANL. Recessive means the driver releases that differential drive. The two wires can still sit above ground when their difference is nearly zero.
Use one original Raspberry Pi Pico to control two independent transceivers on the same bus. Pull either transmit input low and check whether both receivers report the change. Then request dominance from both and see whether the bus keeps the same polarity. The Pico holds each request long enough to inspect its settled level. These are manual physical-layer trials. A working CAN network also needs controllers to form frames, acknowledge them and handle errors.
The THVD1450 RS-485 turnaround experiment also uses a differential pair and two end terminations. There, an enabled transmitter drives either polarity. Here, a recessive request leaves another node free to establish the dominant state.
Build the two-node fixture
Use two TI SN65HVD230DR parts marked VP230, on bare SOIC-to-2.54 mm adapters. SOIC is the small-outline integrated-circuit package. The suffix selects TI’s eight-pin D package on tape and reel. Use the top-view diagram and pin-one mark to orient both chips. Use a USB-powered original Pico, two 10 kΩ pull-ups, two 100 nF ceramic bypass capacitors, two 120 Ω ±1% quarter-watt resistors, and about 25 cm of nominal 120 Ω twisted-pair CAN cable plus a common ground lead. Keep both adapter connections and the capacitor leads short.
| SOIC pin | Node A | Node B |
|---|---|---|
| 1 · D | GP2 (Pico pin 4) | GP6 (Pico pin 9) |
| 2 · GND | Common 0 V | Common 0 V |
| 3 · VCC | Pico 3V3(OUT), pin 36 | Pico 3V3(OUT), pin 36 |
| 4 · R | GP3 (Pico pin 5) | GP7 (Pico pin 10) |
| 5 · Vref | Leave open | Leave open |
| 6 · CANL | CANL at A end | CANL at B end |
| 7 · CANH | CANH at A end | CANH at B end |
| 8 · RS | Common 0 V | Common 0 V |
Join each chip’s pin 2 and pin 8 to the Pico’s ground at pin 38. Fit a 100 nF capacitor between each chip’s pins 3 and 2. Fit a separate 10 kΩ resistor from each pin 1 to 3V3(OUT). The pull-ups set a released command while the Pico pins are inputs on a powered fixture. Pin 5 is a reference output. This circuit leaves it open.
Grounding RS selects the device’s high-speed mode. TI also specifies slope control with a resistor from RS to ground and a standby mode when RS exceeds 0.75 times VCC. For the exact SN65HVD230, standby turns off the driver while the receiver remains active. Keep RS hard-wired to ground for these trials so the two nodes have the same mode.
TI recommends 3.0 to 3.6 V at VCC. Use the Pico’s 3V3(OUT) and leave VBUS, VSYS and 3V3_EN out of the fixture connections. The absolute supply stress range is −0.3 to 6 V. TI lists −2 to +7 V operating common-mode and −4 to +16 V absolute stress on each CAN bus terminal. Run only the common-ground, 3.3 V fixture below. Leave vehicle harnesses, powered field buses, external bias supplies and deliberate faults out of this bench setup.
Predict the four settled states
A high D input releases differential drive. A low D input requests positive differential voltage, Vdiff = CANH − CANL. Under the data sheet’s receiver test conditions, a differential input at or below 0.5 V produces high R, while one at or above 0.9 V produces low R. These bounds leave a transition region. Classify the settled plateaus and record the actual voltage if it falls in between.
| Trial | D at A / B | Pair state | R at A / B |
|---|---|---|---|
r | 1 / 1 | Recessive, difference near zero | 1 / 1 |
a | 0 / 1 | Dominant, positive difference | 0 / 0 |
b | 1 / 0 | Dominant, positive difference | 0 / 0 |
x | 0 / 0 | Dominant, positive difference | 0 / 0 |
At low frequency, the two 120 Ω end resistors appear in parallel. The nominal total is 60 Ω. TI lists 2 V typical differential drive for one driver into 60 Ω under its specified test conditions. At that example voltage each resistor carries 2 V ÷ 120 Ω ≈ 16.7 mA and dissipates about 33 mW. The combined resistor current is about 33 mA. This estimates the load current from the example voltage. A second dominant request has the same polarity and does not imply twice that voltage.
Check resistance, then capture voltage
- Start unpowered. With both adapters disconnected, check each 120 Ω resistor and then measure across CANH and CANL on the assembled cable with both resistors fitted. Expect 59.4–60.6 Ω from their tolerance, plus meter and lead error. A reading near 120 Ω suggests one end is missing. Check continuity along each wire and from end to end on the separate ground lead. Disconnect USB before changing wiring.
- Verify the supply and idle commands. With the wiring complete, power the Pico by USB. Use a digital multimeter to check for 3.15–3.45 V across pins 3 and 2 at each transceiver as a setup check. With the program idle, verify that both D pins sit high. Stop if either supply is out of the setup range, a D pin remains low, a part warms unexpectedly, or the Pico resets. TI’s D-input limits are 0.8 V maximum for low and 2.0 V minimum for high.
- Use two scope inputs with a common reference. Set both compensated probes and channels to ×10, 1 MΩ scope input and direct-current coupling. Put both reference clips on common 0 V, with the channel 1 tip on CANH and channel 2 tip on CANL. Use scope math for channel 1 minus channel 2. A bench scope often bonds its ground clips together and to protective earth. Keep the clips off CANH, CANL and the supply. Leave the scope’s protective earth intact.
- Capture four trials. Use the command examples below. Start with
rin free-run mode for a steady baseline. Fora,bandx, try a single acquisition on the CANH rising edge, roughly 500 µs per division, and arm it before typing the command. Read CANH and CANL at the same settled time well away from the edges, then record the difference and the receiver bits. If the CANH trigger misses, check both traces and select a trigger level between the observed recessive and dominant levels. With a spare channel you can verify a D or R level on a repeated run, referencing it to the same ground. - Check recovery. After each run, record whether the differential returns near the
rbaseline. A receiver can report recessive with an open bus input, so a pair of high receiver bits alone does not establish continuity. Whenaandbdiffer, recheck the failing end’s D pin, bus polarity, RS ground and receiver wiring before repeating.
| Trial | CANH (V) | CANL (V) | Difference (V) | R at A / B | Released again? |
|---|---|---|---|---|---|
r | |||||
a | |||||
b | |||||
x |
Use the blank observation sheet to also record both supplies, D levels if checked, the unpowered termination and acquisition settings. The states above are predictions. Fill the worksheet with your own measurements.
Run the complete Pico program
Install the original Raspberry Pi Pico release of MicroPython v1.29.0 and copy can_states.py to the board. In its read–evaluate–print loop (REPL), enter from can_states import run. Arm the scope before each call to run("a"), run("b") or run("x"). For the baseline enter run("r"). The returned dictionary shows the requested D levels, observed R levels and whether the two readings agree with the expected state.
Each valid command preloads both D outputs high. The program requests a 1 ms release interval, writes the selected D levels, requests another 1 ms delay and samples both R pins. Its cleanup restores D high on exit. The interpreter and sequential reads and writes make these approximate windows. Read the middle of the plateau rather than using this program to measure propagation delay or CAN bit timing.
"""One low-speed physical-layer trial for two SN65HVD230s on a Pico."""
from machine import Pin
from time import sleep_us
def run(command):
"""Request one state, sample both receivers, then release the bus."""
if command not in ("r", "a", "b", "x"):
raise ValueError("use r, a, b or x")
level_a = int(command not in ("a", "x"))
level_b = int(command not in ("b", "x"))
expected = level_a & level_b
tx_a = Pin(2, Pin.OUT, value=1)
tx_b = Pin(6, Pin.OUT, value=1)
rx_a = Pin(3, Pin.IN, pull=None)
rx_b = Pin(7, Pin.IN, pull=None)
try:
sleep_us(1000)
tx_a.value(level_a)
tx_b.value(level_b)
sleep_us(1000)
observed_a = rx_a.value()
observed_b = rx_b.value()
finally:
try:
tx_a.value(1)
finally:
tx_b.value(1)
return {
"tx_a": level_a,
"tx_b": level_b,
"rx_a": observed_a,
"rx_b": observed_b,
"expected_rx": expected,
"matches": observed_a == expected == observed_b,
}
Host tests run this exact file with a fake Pin and microsecond timer. They check the four commands, initialization, release ordering, receiver disagreement and cleanup after interrupted sampling. The host checks establish program behavior in the test harness. Physical voltages and timing belong in the bench worksheet.
Challenge
Suppose a settled recessive run returns both receivers high, and either single-dominant run gives the expected low bits. What measurement can still reveal a missing end resistor?
Show the answer
Disconnect USB and isolate the cable and its end resistors from both adapters. Measure across CANH and CANL. A correctly terminated cable reads near 60 Ω, while a cable with only one end resistor reads near 120 Ω. The receiver bits can agree in a slow trial even when the line has the wrong termination for fast edges.
Primary sources and files
- TI SN65HVD230 data sheet, SLOS346O. See the pin table, recommended and absolute limits, driver and receiver test conditions, mode table, application wiring and orderable addendum.
- TI SN65HVD230DR orderable. SOIC-8 D package and VP230 marking.
- Raspberry Pi Pico R3 pinout and Pico data sheet. Board pins and 3V3(OUT) power details.
- MicroPython original Pico firmware, v1.29.0 Pin reference and time reference.
Download the experiment source and tests. Includes the complete program, host tests, wiring contract, editable figures and blank worksheet.