1- The pinout of I/O connector
2- Example of an input application
3- Example of an output application
OS: JetPack 4.5.1 (L4T-32.5.1)
This blog post is suitable for:
• NVIDIA Jetson TX2 NX SOM with DSBOARD-NX2 (Rev. 1.1) Carrier Board
• DSBOX-TX2NX ( industrial fanless box PC with NVIDIA Jetson TX2 NX)
In this blog post, we will test the IIO (Industrial Input Output) interface of DSBOX-TX2NX.
First, let's look at 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 should use the isolated ground for IIO applications.
Digital IN0 Test
Digital input side accepts signals between 12-24V (rated for 2.25mA). In our application, we used Heschen M12 Inductive Proximity Sensor (PNP & Normally Open(NO)) with 24V voltage source.
Find sysfs equivalent of the connected input pin from the table. For this setup it is gpio-248. After proper hardware connection, we can continue with the software side.
Set gpio248 (DIGITAL_IN0) as input and read sensor value. To do this, you could use the commands below.
• sudo echo 248 > /sys/class/gpio/export
• sudo echo in > /sys/class/gpio/gpio248/direction
• sudo cat /sys/class/gpio/gpio248/value
Digital OUT0 Test
Digital output side can drive loads up to 24V and has a current limit of 1A. They work as low side switches, open-close between them and GND_ISO. So, you should have a circuitry as in the schematic below. In our application, we used GASHER 24V Indicator Light with 24V voltage source.
Find sysfs equivalent of the connected output pin from the table below. For this setup it is gpio-252. After proper hardware connection with industrial LED, we can continue with the software side.
Then set gpio252 (DIGITAL_OUT0) as output and control light state. To do this, you could use the commands below.
• sudo echo 252 > /sys/class/gpio/export
• sudo echo out > /sys/class/gpio/gpio252/direction
To short Output
• sudo echo 1 > /sys/class/gpio/gpio252/value
To open Output
• sudo echo 0 > /sys/class/gpio/gpio252/value
Thank you for reading our blog post.