Skip to content

Commit 9537a7e

Browse files
committed
Improving the discussion on tranceivers.
1 parent 705a295 commit 9537a7e

3 files changed

Lines changed: 37 additions & 16 deletions

File tree

src/05-can/01-can-transceivers.md

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,46 +25,67 @@ CAN doesn't use "high = 1, low = 0" on a single wire like normal logic. Instead,
2525
- A **dominant bit** represents a logic **0**
2626
- A **recessive bit** represents a logic **1**
2727

28-
**Key concept**: The CAN bus's idle (recessive) voltage is set by external infrastructure—in LCC, by a device like the RR-CirKits LCC Power-Point or SPROG POWER-LCC—not by your transceiver. Your transceiver only *nudges* the bus around that idle level.
28+
**Key concept**: The transceiver operates in two fundamentally different modes—**high-impedance (recessive)** and **active driving (dominant)**. The bias network in your LCC infrastructure (like RR-CirKits LCC Power-Point or SPROG POWER-LCC) provides the reference voltage, but the transceiver's behavior determines what you actually measure.
2929

3030
#### Recessive (Idle) State
3131

32-
In the **recessive (idle) state**, no node is actively driving the bus. Both CANH and CANL sit at nearly the **same voltage**, defined by the bias network in your LCC infrastructure. The exact idle voltage depends on what device provides the bias.
32+
In the **recessive state**, the transceiver outputs are **high-impedance**—essentially disconnected from the bus. The transceiver isn't driving the lines at all; it has "let go" of them.
33+
34+
With no active driving, the **bias network** in your LCC infrastructure pulls both CANH and CANL to nearly the **same voltage**. For typical LCC infrastructure (like the RR-CirKits Power-Point or SPROG POWER-LCC), this is around 2.5V, though the exact voltage depends on the specific device. When fully settled, there's almost no differential voltage between them.
35+
36+
**Important**: After a dominant period, the bus doesn't instantly jump to the bias voltage. The bias network charges the bus through the cable capacitance, creating an **RC charging curve**. During short recessive periods (between bits), the voltage may not fully settle to the bias level.
3337

3438
#### Dominant (Transmission) State
3539

36-
When any node wants to send a **dominant 0 bit**, its CAN transceiver briefly **creates a small voltage difference** between the two wires:
40+
When any node wants to send a **dominant 0 bit**, its CAN transceiver **actively drives** both outputs:
41+
42+
- **CANH driver** pulls toward the transceiver's VDD supply voltage (e.g., 3.3V for SN65HVD230)
43+
- **CANL driver** pulls toward GND (0V)
3744

38-
- **CANH is nudged up** above the idle level
39-
- **CANL is nudged down** below the idle level
45+
This creates a significant differential voltage between the two lines. However, the actual voltages you measure are **not** VDD and GND because:
4046

41-
**Example: From my test setup** (with a transceiver connected to LCC infrastructure), measurements showed:
47+
1. The **bias network is still connected** and pulls both lines toward the bias voltage (~2.5V)
48+
2. The **termination resistors** (120Ω at each end of the bus) load the drivers
49+
3. The drivers and bias network "fight" each other, settling at intermediate voltages
4250

43-
| State | CANH | CANL | Differential |
44-
|-------|------|------|---------------|
45-
| **Recessive (1)** | ~2.25V | ~2.12V | ~0.13V |
46-
| **Dominant (0)** | ~1.68V | ~1.08V | ~0.60V |
51+
**Example: From my test setup** (SN65HVD230 transceiver with VDD=3.3V, connected to LCC infrastructure), measurements showed:
4752

48-
The exact voltages you observe will depend on your specific infrastructure and transceiver. The key principle remains: **the idle voltage is set by the bias network**, and **the transceiver creates the differential around that point**.
53+
| State | CANH | CANL | Differential |
54+
|-------------------|--------|--------|---------------|
55+
| **Recessive (1)** | ~2.37V | ~2.37V | ~0.00V |
56+
| **Dominant (0)** | ~2.14V | ~1.18V | ~0.96V |
57+
58+
Note that the recessive voltage (~2.37V) is set by the LCC infrastructure's bias network, not by the transceiver. The exact voltages you observe will depend on your specific transceiver, its supply voltage, and the LCC infrastructure you're using. What matters for reliable communication is the **differential voltage** (CANH - CANL), not the absolute voltage on either line.
4959

5060
#### Visualizing the Differential Signal
5161

5262
Here's what this looks like on an oscilloscope during actual CAN bus communication:
5363

54-
![Oscilloscope capture showing CANH, CANL, and differential signal](images/ScopeCapture.png)
64+
![Oscilloscope capture showing CANH, CANL, and differential signal](images/ScopeCapture3.png)
5565

5666
In this capture:
57-
- **Yellow trace (CANL)**: Shows the low line varying as nodes transmit
58-
- **Cyan trace (CANH)**: Shows the high line varying in the opposite direction
67+
- **Yellow trace (CANL)**: Shows the low line being actively driven low during dominant periods, then charging back up during recessive periods
68+
- **Cyan trace (CANH)**: Shows the high line behavior during the same transmission
5969
- **Purple trace (CANH-CANL)**: The differential signal - notice how clean and digital it is!
6070

61-
**Key observation**: While the individual CANH and CANL voltages aren't constant (they shift due to bus activity and bias variations), the **differential signal (CANH-CANL) is very clean**. This is the magic of differential signaling - noise and voltage shifts that affect both wires equally cancel out when you subtract them, leaving a robust digital signal.
71+
**Key observations**:
72+
73+
1. **RC Charging Behavior**: Notice the curved rise at the end of each dominant pulse (when returning to recessive). This is the bias network charging the cable capacitance. The voltage doesn't instantly snap to the bias level—it gradually rises following an exponential curve.
74+
75+
2. **Longer vs. Shorter Recessive Periods**: During longer idle periods (left side of the capture), both lines fully settle to ~2.37V. During shorter recessive periods between bits, the voltage doesn't have time to fully charge and settles at a lower intermediate voltage.
76+
77+
3. **Clean Differential Signal**: While the individual CANH and CANL voltages show complex behavior (active driving, RC charging, partial settling), the **differential signal (CANH-CANL) is very clean**. This is the magic of differential signaling—noise, voltage shifts, and charging effects that affect both wires equally cancel out when you subtract them, leaving a robust digital signal.
6278

6379
The CAN receiver in your transceiver looks only at this differential voltage, not the absolute voltage on either wire. This is why CAN is so reliable in electrically noisy environments like model railroads and industrial settings.
6480

6581
### The Transceiver's Role
6682

67-
Your transceiver does one essential job: **convert the ESP32's logic signals (0V/3.3V) into small differential voltages on the CAN bus**. It pushes CANH and CANL apart to send a dominant bit, then releases them to send a recessive bit. Everything else—the bias voltage, termination, ground reference—comes from your LCC infrastructure (such as the RR-CirKits LCC Power-Point or SPROG POWER-LCC).
83+
Your transceiver does one essential job: **convert the ESP32's logic signals (0V/3.3V) into differential voltages on the CAN bus**.
84+
85+
- **Recessive (logic 1)**: Transceiver goes **high-impedance**, releasing the bus and allowing the bias network to set the voltage
86+
- **Dominant (logic 0)**: Transceiver **actively drives** CANH toward VCC and CANL toward GND, creating a differential voltage
87+
88+
Everything else—the bias voltage, termination, ground reference—comes from your LCC infrastructure (such as the RR-CirKits LCC Power-Point or SPROG POWER-LCC). The transceiver's drivers work against this infrastructure during dominant periods, which is why the measured voltages are intermediate values rather than full VCC/GND.
6889

6990
### The Wired-AND Behavior
7091

47.5 KB
Loading
45.9 KB
Loading

0 commit comments

Comments
 (0)