DSBOX-N2 Industrial Input Output Interface Tutorial

DSBOX-N2 Industrial Input Output Interface Tutorial

Jetson Nano

26 May 2021
WHAT YOU WILL LEARN?

1- The pinout of I/O connector  

2- Example of an input application 

3- Example of an output application 

ENVIRONMENT

Hardware: DSBOX-N2

OS: Jetpack 4.5(L4T-32.5)


This blog post is suitable for:

• NVIDIA Jetson Nano SOM with DSBOARD-NX2 Carrier Board

• DSBOX-N2

In this blog post, we will test the IIO(Industrial Input Output) interface of DSBOX-N2.



First, let's look over the IO connector. On the connector, there are 3 isolated outputs, 2 isolated inputs and 1 isolated ground. When using IIO, always double check which ground pin you are using. You must use isolated ground for IIO applications.


Digital IN0 Test



Find sysfs equivalent of the connected input pin from the table. For this setup it is gpio-504. After proper hardware connection, we can continue on the software side.

Set gpio504 (DIGITAL_IN0) as input and read sensor value. To do this, you could use the commands below.



sudo echo 504 > /sys/class/gpio/export
sudo echo in > /sys/class/gpio/gpio504/direction
sudo cat /sys/class/gpio/gpio504/value


Digital OUT0 Test



Find sysfs equivalent of the connected output pin from the table below. For this setup it is gpio-508. After proper hardware connection with industrial LED, we can continue on the software side.

Then set gpio508 (DIGITAL_OUT0) as output and control light state. To do this, you could use the commands below.



sudo echo 508 > /sys/class/gpio/export
sudo echo out > /sys/class/gpio/gpio508/direction

To short Output:


sudo echo 1 > /sys/class/gpio/gpio508/value

To open Output:



sudo echo 0 > /sys/class/gpio/gpio508/value

Thank you for reading our blog post. 


If you want to get updated on new blog posts, product launches and discounts, you can fill out the form and sign up for our newsletter. By signing up, you can reach various blog posts about AI, deep learning, machine vision, high-speed cameras, and industrial interfaces. 


You will receive a "free shipping" code for next purchase immediately.

English