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
    • 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
Industrial Automation
  • Technologies
  • More
Industrial Automation
Blog AVNET SmartEdge IIOT Gateway: Use the Isolated CAN
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Industrial Automation requires membership for participation - click to join
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: 7 Nov 2019 11:16 AM Date Created
  • Views 626 views
  • Likes 5 likes
  • Comments 5 comments
  • iiot
  • smartedge
  • can_bus
  • gateway
  • can
Related
Recommended

AVNET SmartEdge IIOT Gateway: Use the Isolated CAN

Jan Cumps
Jan Cumps
7 Nov 2019

The SmartEdge IIOT GatewaySmartEdge IIOT Gateway is a Raspberry Pi 3 Compute based industrial Linux box.

It runs Raspbian with some additions.

There's a set of industrial hardware extensions. In this blog I review the isolated CAN port.

image

 

 

Hardware

 

The gateway has a physical CAN driver. That's a piece of hardware that's not available on the standard Raspberry Pi family.

 

On a Pi, the CAN protocol itself is implemented in Linux/HW and you have access to the Tx and Rx signals on logic level.

The physical layer of the CAN protocol (driver IC and isolation/protection circuit) is something you add when you want to connect the Pi to a CAN BUS.

 

 

The CAN signals are available on a terminal block. An internal jumper (J23) configures the termination resistor.

If this is the first or last device on the bus, you place the jumper. Else you remove it.

 

 

image

 

Driver, isolation and protection circuit

 

On the gateway, the driver is a TI ISO1050ISO1050.

Input protection is done with a DF2S6.8FS,L3M on both signal lines.

  • Voltage - Reverse Standoff (Typ): 5V (Max)
  • Voltage - Breakdown (Min):6.4V
  • Voltage - Clamping (Max) @ Ipp: 9V (Typ)
  • Current - Peak Pulse (10/1000µs): 1A (8/20µs)

AVNET specifies an isolation level between bus and the rest of the gateway of 2kV.

 

image

Wiring

 

The CAN terminal block has the typical 3 connections: CAN Hi, CAN Lo and Ground.

The Ground is not shared with any other ground on the gateway.

When connecting the gateway to a CAN bus, you have to use a twisted pair for the two signal wires. the photo in the header of this post shows an example.

The ground signal is a straight wire.

There is no defined colour code convention for CAN wiring. I've used the SAE J1939-11 colours.

 

image

 

Test Circuit

 

I used a Microchip CAN BUS Analyser as "the other device on the bus".

Because my test bus has only two devices, both are end-of-line devices and need to have the termination resistors enabled.

On the analyser, this is done via the GUI. As mentioned before, you have to place jumper J23 on the gateway.

image

You connect Ground to Ground, Hi to Hi and Lo to Lo.

 

Software

 

The software CAN driver is a Linux component. It's designed to be as similar as possible to other Linux network drivers.

You have to enable that CAN network in Linux before you can communicate over the bus.

This is done by removing the comment in front of the can0 section in /etc/network/interfaces.

 

In this experiment, I'm using the Linux candump and cansend utilities to for sending and receiving data.

In the send scenario, the analyser's GUI is used to display the result.

For reading, the GUI is used to let the analyser inject a payload on the bus

 

Receive scenario - listen to the bus and log all traffic

 

candump can0

 

image

 

Transmit scenario - generate traffic and inject into the bus

 

cansend can0 01a#11223344AABBCCDD

image

 

As you can see in both captures, the test are successful. The infrastructure works.

 

Related Blog
Industrial I/O
Use the Industrial I/O
Control Industrial I/O directly from GPIO Pins
C Program for the Industrial I/O
Control Industrial I/O directly from Node-RED
Display Industrial I/O on Node-RED Dashboard
CAN Bus
Use the Isolated CAN
CAN programming in C on Linux: Filter and Mask
2020 Linux Image
The 2020 Linux Image and IoTConnect Scripts
Understand the Custom Scripts and Services (Pt. 1: intro and reset button service)
Understand the Custom Scripts and Services (Pt. 2: led service)
Understand the Custom Scripts and Services (Pt. 3: IoT Connect service)
  • Sign in to reply

Top Comments

  • Jan Cumps
    Jan Cumps over 2 years ago in reply to ajcc +1
    ajcc wrote: ... I have to get myself one of those MCP2515 based things you mention in another blog... If you have a BeagleBone, you don't need a MCP2515. Only a tranceiver for the physical layer. The TI…
  • ajcc
    ajcc over 2 years ago in reply to Jan Cumps +1
    Jan Cumps That's a good point, I only need some line driver then. The MCP2515 would probably be nice on an Arduino shield though.
  • Jan Cumps
    Jan Cumps over 2 years ago +1
    A capture of the Linux candump working with an automotive microcontroller's CAN data:
  • Jan Cumps
    Jan Cumps over 2 years ago

    A capture of the Linux candump working with an automotive microcontroller's CAN data:

    image

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

    Jan Cumps That's a good point, I only need some line driver then. The MCP2515 would probably be nice on an Arduino shield though.

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

    ajcc  wrote:

     

    ... I have to get myself one of those MCP2515 based things you mention in another blog...

    If you have a BeagleBone, you don't need a MCP2515. Only a tranceiver for the physical layer.

    The TI processor on a BB has built-in CAN peripherals and it's easy to enable in Linux.

     

    Then again, making your own board with a tranceiver is more expensive (also: more fun) than purchasing a ready made breakout with MCP2515 and tranceiver.

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

    Good post Jan.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ajcc
    ajcc over 2 years ago

    Those candump and cansend commands could come in handy, so I have to get myself one of those MCP2515 based things you mention in another blog. Nice!

    • Cancel
    • Vote Up 0 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

  • Facebook
  • Twitter
  • linkedin
  • YouTube