TK109CANintermediate

CAN Bus

An SN65HVD230 CAN transceiver on a TinkerBlock board, for 3.3 V microcontrollers with a CAN controller of their own, such as every ESP32. CTX and CRX go straight across, the 120 Ω fitted on every board belongs only on the two end boards, GND runs with a twisted pair, and one board alone can never finish a message.

CAN Bus TK109

Specifications

TypeCAN bus transceiver, ISO 11898-2 high-speed physical layer. It carries a CAN controller's frames onto CANH and CANL; it is not a controller itself
ChipSN65HVD230 (Tokmas SN65HVD230DR, a second source of TI's part), SOIC-8
Supply3.0 to 3.6 V on 3V3: a 3.3 V board. CTX and CRX take at most 0.5 V above the supply, so the board is for 3.3 V logic only, never 5 V
HostA microcontroller with a CAN controller: every ESP32 (Espressif calls it TWAI), many STM32. An Arduino Uno has none
Header4-pin right-angle male, 2.54 mm: GND, 3V3, CTX (chip D, to your CAN TX pin), CRX (chip R, to your CAN RX pin). Straight across
BusCANH, GND, CANL on a 5.0 mm screw terminal and again on 3 male pins, the same three nets
Termination120 Ω across CANH and CANL on every board. Keep it on the two boards at the ends of the cable and remove it from the rest
SpeedTested at 500 kbit/s. The chip is rated to 1 Mbit/s; this board's 10 kΩ slope control slows its edges, so 1 Mbit/s suits only a short bus
Bus range−2 V to +7 V common mode, so GND runs with the pair; ±16 kV ESD on the bus pins; up to 120 nodes by TI's figure
Board22.4 × 30.4 mm TinkerBlock board, two LEGO-compatible holes 16 mm apart, red power LED
In the box6 × TK109 CAN bus block, headers fitted

What it does

CAN is a bus that every board shares as an equal: any board can send, every board hears every message, and when two start together the bus decides who goes first without spoiling either. It runs in cars and factories because it sends each bit as a difference between two wires, CANH and CANL, which noise cannot easily change.

The TK109 is the part between a microcontroller's CAN controller and those two wires: an SN65HVD230 transceiver, a 120 Ω terminator, and connections for the bus. The controller has to come from the microcontroller, and every ESP32 has one.

The TK109 from above at an angle: a black board with a gold border, a three-way screw terminal along the back printed CANH, GND and CANL, three male pins in front of it, the eight-legged SN65HVD230 between two round LEGO holes, CAN BUS printed on the right, and four right-angle pins out of the front edge printed GND, 3V3, CTX and CRX.
The TK109: bus at the back, microcontroller at the front.

Two things to know before wiring

  • CTX and CRX go straight across: CTX to your CAN TX pin, CRX to your CAN RX pin. And the board is 3.3 V only.
  • The 120 Ω across CANH and CANL is fitted on every board. Keep it on the two boards at the ends of the cable and take it off the rest.

Wiring, in four lines

  1. GND to GND, 3V3 to 3V3.
  2. CTX to the CAN TX pin, CRX to the CAN RX pin (GPIO 8 and 9 on the book's ESP32-S3).
  3. CANH to CANH, CANL to CANL, on one twisted pair, and GND to GND with them.
  4. At least two boards on the bus, all at the same bit rate.

Where to start

The handbook below is nine short articles. Read What is on the board before wiring, Every message is acknowledged before testing with one board, and The 120 Ω resistor before building a bus of more than two. The first message is two ESP32-S3 boards talking in one sketch.

When it doesn’t work

Does it work with an Arduino Uno?
Not on its own. The Uno has no CAN controller and runs 5 V logic, which this board's pins cannot take. Use an ESP32, which has the controller built in, or add a CAN controller chip and a level shifter to the Uno.
Do I cross CTX and CRX?
No. They are named from the microcontroller's side: CTX to your CAN TX pin, CRX to your CAN RX pin, straight across.
Do I need to remove the 120 Ω resistor?
Only on boards in the middle of a bus. Keep it on the two boards at the ends of the cable. With two boards, keep both; with all six on one cable, remove it from the four between.
Why does my single board keep reporting errors?
Every CAN frame must be acknowledged by another board. Alone, a sender resends each frame and counts an error every time. Add a second board running a sketch that starts its CAN controller at the same bit rate.
Do I need to connect GND between boards?
Yes. The receiver needs CANH and CANL within −2 V to +7 V of its own ground, and boards on separate supplies share no ground unless a wire gives them one. Run GND with CANH and CANL, which go on one twisted pair.
How fast and how far?
About 100 m at 500 kbit/s, the rate the boards were tested at, and further at slower rates: about 500 m at 125 kbit/s. 1 Mbit/s is the chip's rating and suits a short bus on this board.

The CAN bus handbook

9 articles · about 45 minutes

This page is the reference: what the part is, what it is made of, and the questions people arrive already asking. The handbook is the walk — the same part in the order somebody actually meets it.

What CAN is

2 articles

Two wires every board shares as an equal, and what this block does and does not bring.

How the bus decides

2 articles

Why the lowest identifier always wins, and why one board on its own can never finish a message.

The wires

2 articles

The 120 Ω fitted on every board, and the ground and twisted pair that keep a long bus working.

Using it

3 articles

A first message between two ESP32-S3 boards, how fast and how far, and where to look when nothing arrives.

Edit this page — content/modules/can-bus.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

CAN Bus

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum