I'm trying out basic CAN communication on a Hercules microcontroller.

In this third blog I'll design driver PCBs.

The second part describes schematic and custom KiCAD parts.




I've used two sources for my schematic. The datasheet of the TCAN332D and an article on the TI e2e forum.

These are the things I've taken over from the advice:

  • TXD input pin: If an open-drain host processor is used to drive the TXD pin of the device,
    an external pullup resistor between 1 kΩ and 10 kΩ must be used to help drive the recessive
    input state of the device (weak internal pullup resistor). (R3)
  • Digital inputs and outputs: To limit current of digital lines, serial resistors may be used. (R1 and R2)
  • Decoupling Capacitors on VCC: Bypass and bulk capacitors must be placed as close as possible to the supply
    pins of transceiver. (C2 and C3)
  • Filtering noise on digital inputs and outputs: To filter noise on the digital I/O lines, a capacitor may be used
    close to the input side of the I/O. (C1)
  • Transient Protection on CANH and CANL: Transient Voltage Suppression (TVS) and capacitors can be used
    for additional system level protection. These devices must be placed as close to the connector as possible.
    This prevents the transient energy and noise from penetrating into other nets on the board.  (D1, C5 and C7)
  • Bus Termination on CANH and CANL: Split termination where the termination is split into two resistors, (R5 and R6),
    with the center or split tap of the termination connected to ground through capacitor (C6).
    Split termination provides common mode filtering for the bus.
    When termination is placed on the board instead of directly on the bus,
    care must be taken to ensure the terminating node is not removed from the bus,
    as this causes signal integrity issues if the bus is not properly terminated on both ends

Custom Components


The CAN driver and CAN bus ESD protection diode aren't available as KiCAD components.

For the TCAN332D, I used KiPART to generate the component from a spreadsheet.

Here's the spreadsheet content:


input1TXD left
output4RXD left
pwr2GND bottom
analog6CANL right
analog7CANH right
pwr3VCC top


The command line to execute the KiPART transformation:


C:\Python27\Scripts\kipart.exe -w -s num -f TCAN332D.csv -o TCAN332D.lib


The result is a new KiCAD lib with the following part:


For the NXP PESD1CANPESD1CAN CAN bus ESD protection diode I used the KiCAD Library Editor to draw one myself.

I used one of the existing Series Schottky Diode components that came with KiCAD as the inspiration.

Creating parts in the Library Editor isn't fun. Just saying.

Here's the result.


The spreadsheet and both libraries are attached to this blog post.


Road Test Blog
part 1: First trials
part 2: Inject CAN Messages
part 3: Analyzer as Test Tool
part 4: Analyze the Physical layer of CAN Bus
Related Blog
part 1: tryout
part 2: Communication between 2 Devices
part 3a: Design a Bus Driver PCB
part 3b: Design a Bus Driver PCB - Schematics and Custom Components
part 3c: Design a Bus Driver PCB - Layout
part 3d: Design a Bus Driver PCB - Test