Interfacing with DAQ (analog/digital I/O) devices

It looks like comedi is not enabled in the L4T kernel. Has anybody tried whether it is possible to enable it? Or are there other solutions for interfacing with DAQ (analog/digital I/O) devices?

1 Like

Not sure about what comedi is… Do you mean which interface can be used to connect DAQ devices? There are several I2S interface be used for that.

From google:
Comedi - The Linux Control and Measurement Device Interface.
The Comedi project develops open-source drivers, tools, and libraries for data acquisition.

There are a number of R sense resistors(value is 0.005 or 0.01 ohm) could used for current measurement.
This need wire on both side of sense resistors…

Comedi is a kernel extension to provide device drivers for interfacing with measurement devices (quite a number of devices from a number of different manufacturers). Which interface to use is not so much the issue. The question is what measurement/DAQ devices you can get a driver for on the Tegra platform. Comedi is part of the source code that has been used for building the L4T kernel, but it has been disabled. I was curious whether anybody has tried enabling it and whether it seems to work on the Tegra platform or whether there are other drivers available for the Tegra, which allow communicating with general-purpose digital/analog I/O boards/interfaces.

RE I2S: Isn’t that a digital audio interface? Is it also used for connecting measurement devices?

1 Like

The kernel configuration is standard for Jetson, and more or less no different than a desktop Linux distribution. Whatever was available in the 3.10.x kernels and not architecture-dependent will be there (and many things which are architecture-dependent are also there). I doubt anyone disabled the feature…they just didn’t add it by default. On a desktop PC distribution it is ok to enable a lot of features by module, even when not used…they tend to ship this way. For example, there would be no need to install drivers for all kinds of common video cards on a Jetson, just the one which is hard wired into the system is there…you could enable them if you want to add one to the PCIe slot, otherwise it is a waste of space. If you know which kernel config item enables comedi, you simply build and install the module. If you need more information on kernel build and configuration just ask…the gist is to use the “/proc/config.gz” as a starting config, update the CONFIG_LOCALVERSION (e.g., make menuconfig), and then make whatever changes you want.

If you have a specific piece of hardware (DAQ) you are thinking of, then there may be another driver for that. Details would depend on how the hardware is wired to the Jetson.

1 Like

Thank you, linuxdev. I can certainly give it a try. I just thought I would ask first whether anybody had already experience with this. Hard to believe that nobody ever had the desire to connect a multi-function DAQ card/interface (like, e.g., National Instruments products) to a Jetson. I can provide an update after having tried enabling the feature in the kernel…

1 Like

Hi jditte, I was confused about not having found anything of interest here on the forums as well in regard to interfacing with DAQ cards. In my project I need to interface with 24V PLC and we have so far failed with a 3.3 - 24V opto-coupler approach. As I hadn’t known the term “DAQ” until this week it wasn’t easy to find such a solution. But we got ourselves a Advantech PCIE-1730 card (not the PCI-1730 card). Somehow after about a day I got some modules compiled (using some commands from this GitHub repository on how to compile a kernel under Jetson L4T). The drivers load but unfortunately the card seems to not be supported by the COMEDI driver in the kernel.. I guess we were a little unlucky choosing the PCIE-1730 as there is another PCI-1730 which supposedly is supported. We might try another card from the list of COMEDI supported cards.
The thing I like about COMEDI is that there seems to be a high-level Python library. Can’t wait to get my hands on that and see how it compares to the Jetson GPIO library.

Anyway, just wanted to document this here in case others are facing similar issues. The Advantech support forums have at the time of writing two messages regarding the usage of Jetson ARM64 Linux with their products but no relevant responses regarding DAQ.