element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • 'Choose another store...'
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs CAN communication with Hercules Safety Microcontroller - part 3b: Design a Bus Driver PCB - Schematics and Custom Components
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 13 Oct 2017 11:41 AM Date Created
  • Views 1023 views
  • Likes 3 likes
  • Comments 5 comments
  • automotive
  • hercules
  • launchpad
  • can
Related
Recommended

CAN communication with Hercules Safety Microcontroller - part 3b: Design a Bus Driver PCB - Schematics and Custom Components

Jan Cumps
Jan Cumps
13 Oct 2017

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.

image

 

Schematic

 

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:

 

TCAN332D
typepinnamesidehidden
input1TXD left
output4RXD left
pwr2GND bottom
analog6CANL right
analog7CANH right
pwr3VCC top
nc5NCbottomyes
nc8NCbottomyes

 

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:

image

 

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.

 

image

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
Attachments:
canlibs.zip
  • Sign in to reply

Top Comments

  • Jan Cumps
    Jan Cumps over 5 years ago +2
    I'm starting with the PCB. Component layout: edit: the 3d viewer messed up the SOT23 package. On the PCB itself there is no problem.
  • DAB
    DAB over 5 years ago +2
    Nice update. Is the CAN bus similar to the USB using differential serial communications? DAB
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to DAB +2
    I don't know enough about USB under the hood to make that call. CAN doesn't support power profiles and the typical USB profiles (like audio, human interface, ...) It's a serial protocol with arbitration…
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to mcb1

    Yes, there are certainly a number of similarities in the physical layer.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 5 years ago in reply to Jan Cumps

    Sounds more like RS485 on the physical side.

    This list is a good reference

    https://en.wikipedia.org/wiki/List_of_network_buses

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to DAB

    I don't know enough about USB under the hood to make that call. CAN doesn't support power profiles and the typical USB profiles (like audio, human interface, ...)

     

    It's a serial protocol with arbitration, addressing and messaging. No explixit clock. And like some other serial standards, the physical layer is twisted pair with high an low (balanced) lines.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 5 years ago

    Nice update.

     

    Is the CAN bus similar to the USB using differential serial communications?

     

    DAB

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 5 years ago

    I'm starting with the PCB. Component layout:

    image

     

    edit: the 3d viewer messed up the SOT23 package. On the PCB itself there is no problem.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube