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
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • 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 Industrial I/O
  • 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: Jan Cumps
Date Created: 4 Nov 2019 6:31 PM
Views: 335
Likes: 7
Comments: 4
  • iiot
  • raspberry
  • industrial
  • smartedge
  • raspberry_pi
  • gateway
  • raspbian
  • linux
Related
Recommended

AVNET SmartEdge IIOT Gateway: Use the Industrial I/O

Jan Cumps
Jan Cumps
4 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 industrial I/O.

 

GPIO Hardware

 

The SmartEdge IIOT Gateway (from now on: gateway) has two banks of isolated I/O - named DIGIO A and B.

All signals are isolated from the Raspberry part via optocouplers.

Each bank has 2 inputs and outputs that share a common ground*.

The input is high impedance and drives an optocoupler's input. The coupler's output is connected to a Raspberry GPIO pin.

The output is an open collector transistor, driven from a Raspberry GPIO pin via an optocoupler.

Bank A and B are isolated from each other.

Isolation is up to 2 kV.

 

image: I/O specifications from the datasheet

 

The schematic shows the first input and output of bank A. Note that output is on the left, input on the right, and the external connector is shown in the middle.

The User Guide shows the full setup for both banks.

image: output and input of Bank A, I/O 1

 

While the Raspberry GPIO pins are I/O, the DIGIO pins are dedicated input or output.

Here's an example test circuit for both input and output side.

image: simple output (left) and input test circuit

 

GPIO Firmware

 

Raspberry Pi users will be happy to see that the pins can be used just like the 3.3 V I/O pins.

They are supported by Linux character devices. You control and check their status by reading and writing to Linux files**.

This table shows the mapping between the DIGIO pins and the corresponding Linux devices.

 

 

DIGIOLinux deviceDirection
A I1200input
A O1201output
A I2202input
A O2203output
B I1204input
B O1205output
B I2206input
B O2207output

 

In this blog, I'm talking to the pins from Linux. There are plenty examples that show how to talk to Raspberry I/O from your favourite programming language.

Before you can use a pin, you have to export it.

 

# enable DIGIO A I1 and O1
echo 200 >/sys/class/gpio/export
echo 201 >/sys/class/gpio/export

 

The output pins have to be configured as outputs.

 

# make O1 an output pin
sudo echo out > /sys/class/gpio/gpio201/direction

 

You can drive an output by executing:

 

#switch O1
sudo echo 1 > /sys/class/gpio/gpio201/value
sudo echo 0 > /sys/class/gpio/gpio201/value

 

Checking an input pin's status is done like this:

 

#read I1
cat /sys/class/gpio/gpio201/value

 

As you can see, all is very similar to talking to the common Pi pins. But your lines can be up to 60 V.

When you want to use the typical Raspberry Pi GPIO pins, they are available too. The traditional Pi header is accessible inside the box.

 

 

* it's not really a ground but a shared reference point.

** they are indeed character devices. The Linux facing interface to set direction and work with the statuses seem to be files, e.g.: /sys/class/gpio/gpio201/value. In the background, there's a driver that translates that into hardware signals to the Broadcom chip.

 

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
RS-485 Bus
AVNET SmartEdge IIOT Gateway: Use RS-485
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)
Anonymous

Top Comments

  • clem57
    clem57 over 2 years ago +1

    Thanks Jan Cumps for the review of the new SmartEdge IIOT Gateway . It is great to know programming these new Pi's is like before. Are you back home?

  • Jan Cumps
    Jan Cumps over 1 year ago

    I've written a C example to talk to these industrial I/Os: AVNET SmartEdge IIOT Gateway: C Program for the Industrial I/O

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • DAB
    DAB over 1 year ago

    Good post Jan.

     

    DAB

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 2 years ago in reply to clem57

    yes, home

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • clem57
    clem57 over 2 years ago

    Thanks Jan Cumps for the review of the new SmartEdge IIOT Gateway . It is great to know programming these new Pi's is like before. Are you back home?

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
Element14

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 © 2022 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