8 Channel USB GPIO Module with Analog Inputs

Weight: 0.3 lb.



$19.95
USD


In Stock and Ready To Ship
Within 24 Hours

 This product is RoHS Compliant.

Numato’s 8 Channel USB GPIO module is low cost easily deployable solution for connecting your PC to other electronic circuitry through USB. No USB specific knowledge is required to set up and use this module.

 

 

  • 8 TTL compatible GPIOs available.

  • 6 Analog input channels (Pins shared with GPIOs)

  • 10 Bit Analog input resolution

  • All GPIOs can be individually configured as input or output.

  • 20ma Source/Sink capacity.

  • Can be controlled by using standard serial console applications or custom applications.

  • On board controller can be reprogrammed for custom applications.

Downloads for V7 and newer boards

Download User Manual

Download Driver

Downloads for V6 and older boards

Download User Manual

Download Driver

Common Downloads

Sample Code Library

Test Application in Visual Basic Express 2008

Perl Sample Code

Python Sample Code

Comments

12V to board

Hello.
What circuit do you recommend if I have a device with 12V/0V I/O and i want to read the value with the GPIO module?

Re:12V to board

You could use an instrumentation amplifier or  a simple voltage divider with a zener diode protection.

need linux drivers

Hi dear,

we are using this device in our embedded system (which is bare-minimal OS).
even "lsusb" also doesn't work in our system.

we have created node using "mknod /dev/ttyUSB0 c 188 0", we are able open the device but we are unable to write any command to this device.

i think we require driver to do. Could you please suggest which driver to use and link to its source.

thanks

Anand

Re:need linux drivers

Hi Anand, It looks like the USB CDC class driver is compiled out when building the kernel. Please rebuild the kernel including CDC ACM Communications class driver and everything should work fine.

device detected not able to communicate

Dear admin,

Thank you for the advice,

we did rebuild the kernel with the modification you suggested.

now in dmesg it is showing that device has been attached at ttyACM0.

But no node is created in /dev automatically, instead we found information in /sys/class/tty/ttyACM0/.

From this we fetched major (166) and minor (0) numbers and
We have created a node "mknod /dev/ttyACM0 c 166 0"

But unfortunately we are unable to communicate with the device. We are using the linux module mentioned in the forums. On normal systems, using this code we are able read / write from / to GPIO pins. Same code when cross-compiled, is not working on embedded OS.

Could you please help us in this regard?

Thank you.

anand

Re:device detected not able to communicate

Hi Anand, since your kernel is custom built, this question needs to be answered by a Linux kernel expert.

iterference between inputs

Hi, when reading analog signal on input0 (for example 2V), the near ports (not connected)are interfered and showing 1V for input1 and 0,5V on input2(. When the voltage is higher even input3 is interfered. Please help me to solve it. Thanks in advance. Nerijus

Re:iterference between inputs

Unconnected ports will have floating voltage present and can vary randomly. To avoid this connect unused IOs to either VCC or Ground. You may use the pull up resistors on the back side of the board for this purpose.

help needed when state changes of a GPIO

hi dear,

we have just purchased "8 Channel USB GPIO Module with Analog Inputs".

We are connecting 2-pin audio cable which has two states (High and Low) to this. We are working in Linux Environment. We want to know is it possible to have interrupt kind of mechanism to notify to the system when there is change in state of particular GPIO?

Thanks,

Anand

Re:help needed when state changes of a GPIO

You can read the status of any GPIO at any time by sending a read command. To detect a change, you will need to poll the device in background. USB doesn't have any support interrupts.

Java

are there any example codes for Java ?

Re:Java

We don't have Java sample code available at this time. We are planning to include Java with the roll out of next set of sample applications. It should be available at http://numato.com/sample-code-library once published.

When will the Java sample

When will the Java sample code be ready, its been 2 months and there still isn't any sample code available.

Re:When will the Java sample

We haven't rolled out the Java sample code yet. The fundamentals of communicating with this product is same irrespective of the programming language. Please refer to RXTX library that can be used to access serial ports and can be used to communicate with this product. There is a very good tutorial available at http://www.kuligowski.pl/java/rs232-in-java-for-windows,1

led ONBOARD usage

i'd like to ask what is the use of the led and th FWUP connector on the board
besides what i the use of the pins R8(or RB) 5,6,4,7 and GND, VDD among them
thank you

Re:led ONBOARD usage

FWUP is used for firmware updat. Rest of the pins you mentioned are unused as of now.

Read input and set/clear output

Hi,
I wrote a program in C# Visual Studio 2012 to test the board.
I can do that one at a time :
read input from switch.
set/clear output to drive transistor or LED.

But for example :
I set the gpio7 to switch on the LED.
after I read to find the state of the switch on gpio2, the last command switch off the led.

It look like it is not possible to have 1 input on gpio2 and output on gpio7 working together.
Why is it not possible ?

Is there a way to do that ?

thanks

C#

I need help with sample code for C#, can you share yours with me?

thanks!

Re:Read input and set/clear output

Hi Morgan, it is possible to read the input status of  a GPIO without affecting the output status of any other gpio. Can you please share the piece of code that execute these command so we can review and give some recommendation ? Please use the page https://numato.com/contactus to share the code.

Question about Frequency and Duration of TTL Output

Hi, I am working on a project requiring an output of TTL signals with 3 usec TTL high voltage and period of around 65 usec. Is it possible that I use this device achieve it?

Re:Question about Frequency and Duration of TTL Output

3uS is too small of a pulse width to achieve using this module. 

Serial communication via I2C/UART

Hi,

in schematic i see, that there are I2C and UART pins from PIC connected to the CONN_6 (RB5-RB7). Please, how i can drive them from PC. Or what is purpose of these borad's pins?

Re:Serial communication via I2C/UART

Those pins are not used in the current production firmware. They are left avaialble to to those who want's to customize the firmware. It is possible to write your own firmware and use those pins.

Looking for general data logger program to work with this device

I am creating a test rig system that must record 4 analog input voltages. 100hz sample rate is sufficient.

I don't want to write a program myself. So, I was hoping you can refer me to some software that is compatible with your GPIO device.

Re:Looking for general data logger program to work with this dev

Hi, we are working with third party developers to bring data logging and automation software that supports our products. It may take a few months before we can roll out them them though.

Reading analog values from IO6 and IO7

I am using this for an aquarium monitor, using 5 of the 6 analog inputs and all of the remaining high/low inputs. It's working great (using Visual Basic). I just thought I would pass some info along to other users for accessing IO pins 6 and 7 for reading analog values. I was trying to do a read specifying 6 and 7 as the target, but this did not work. I needed to use 4 and 5. i.e. the valid analog read values are 0-5, not 0-3,6,7 even though IO6 and IO7 are physically used. Maybe this was documented and/or expected by some folks, however for others like me that may not have noticed/expected this behavior, I thought I would share.

Re:Reading analog values from IO6 and IO7

Thanks for sharing the info. GPIOs 4 and 5 does not have analog capability. There is a table on page 5 of the documentation lists IOs capable of analog function

Re:Reading analog values from IO6 and IO7

My confusion resulted from comparing the table info shown on page 3 of the doc with this info that you reference on page 5. It was not clear that IO6 maps to ADC4 and IO7 maps to ADC5. I am thinking that the page 3 table that lists the values ADC5 and ADC6 should really be listing ADC4 and ADC5 (or am I not understanding something?).

Speed of operation

I would like to use the 8 channel USB GPIO for an application which will require to toggle a digital output every few milliseconds (maybe 10 ms). Is it possible to achieve this speed by means of sending properly timed SET and CLEAR commands? Which is the speed limit of the module?

Re:Speed of operation

The speed at which the GPIOs can be toggled depends on operating system, number of devices connected to the bus and many other factors. Above all, USB is not strictly deterministic, at least to say it is not deterministic enough to generate timed pulses over multiple transactions. When customers ask about the speed, we always say a few tens of toggles per second. But some customers reported as many as 150 toggles per second. But we can not claim any particular number because of the above mentioned non-deterministic behavior. In short, we would not recommend this product for creating pulses with timing in the order of milliseconds.

Is there support for win64?

I am thinking of purchasing this GPIO, however I would like to be driving this from a 64 bit Windows 7 operating system using Perl. I was looking at the Perl sample and noticed this:
if($Os == "MSWin32"){
use Win32::SerialPort;
}else{
print "Only Win32 Operating Systems supported at this time";
}
Is this still true?

Re:Is there support for win64?

The board supports both 32 bit and 64 bit Windows versions. But it is a little bit tricky to detect Win64 operating system in Perl.  So in summary, this Perl script supports only Win32 but it is possible to modify it to make it support Win64 if necessary.

Drivers for Mac

I bought the 8 channel adaptor and wish to instal it on Mac. Do you have drivers available for OSX
Best
Stan

Re:Drivers for Mac

No driver needed for mac. Just connect the board and Mac OS will detect the board right away.

Firmware update

I have a version 4 board, can it be updated to version 5 so I can use the new commands? Please provide flash utility if one is available. Thanks!

Re:Firmware update

Would you please send a quick note to us through "contact us" page?

Reading contact switch status

I am looking for something that I can connect to the USB header on my NAS system board and read the status of the front-panel buttons (simple contact switches), and it looks like this device will fit the bill.

After reviewing this page, http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/buttons_and..., I've come with the circuit diagram posted here -- http://blog.penurio.us/2013/08/im-thinking-of-building-this.html.

Will this work? Is there a better device for what I'm trying to do?

Also, how thick is this device? There isn't a lot of extra room in the NAS.

Thanks!

Re:Reading contact switch status

Hi There, I think this can be done much easier. The 8 Channel USB GPIO module comes with pull up resistors pre installed. To use them, all that you need to do is to solder the corresponding jumper for the IO where the switch is connected. External to the board, only the switch is needed. Connect the switch from the IO to Ground.  When the switch is not pushed, the IO will stay high and when the switch is pushed, the IO will go low. This change can be read by using gpio read command. I can draw schematic diagram for you if my explanation is too difficult to follow. Please let me know.

nice for playing around not great for heavy use

I got one of these about a year ago while waiting for my pi and it's fairly good. My main issue is if you pull the gpio as fast as the serial will let you the device will go off to nowhere land and need a power cycle. I slowed down my pulling and it still goes away about once a day. The pull up resistors are also tough to get but can be done by hand. I think with the PI A unit you are better off using that for most cases.

What is the analogue input voltage range?

Hi there, I have two quick questions.

1) What is the max voltage of the inputs when using this as an adc?
2) In what form are the voltages read out, i.e. do you get a reading in 'Volts' or 'arbitrary units' which have to be translated into volts?

Thank you.

Answering my own question...

Sorry, just spotted in the user manual the adc input is 5V max and the read out is 10 bit. I missed it the first time I read it for some reason, apologies!

How to install the driver at command line

Is it possible to install the driver at command line, to avoid installing manualy?

Re:How to install the driver at command line

Should be possible with pnputil (http://msdn.microsoft.com/en-us/library/windows/hardware/ff550419(v=vs.85).aspx).

How do I use to replace a momentary switch?

I now realize I should have purchased the 4 channel USB relay module but too late. I took delivery of this board and need help.

I have a separate circuit that presently utilizes a momentary push button switch for a 3v and less than 1 amp circuit. I want to replace the momentary switch with a switch controlled by a computer.

So I believe I now need to connect some kind of low volt relay to this board and I will have what I need. But I am a complete newbie. Could you please tell me what electronics I need to connect and where I need to connect. I have four of these switches so I am guessing I need:

- Four low volt relays (someone give me a part number that is available in US?)
- Connect each relay to the common gnd on this board
- Connect the other lead of the first relay to 100, 2nd relay to 101, and so on
- Now when I turn on 100 the first relay will trigger. When turn off power the relay will switch back open

The voltage I am switching is 3v and the amps is very low, below 1 amp.

Others have mentioned just using a transitor instead. But I have not been able to figure out how to use a transistor when the circuit I am switching is an independent circuit and does not share a ground.

Thanks in advance for any help!!!

Is this correct?

Re:How do I use to replace a momentary switch?

Did you check the possibility of connecting the GPIOs directly to the input through a resistor? If the input needs less than 20mA (this will depend on the input stage though) this should probably work. Can you please share the diagram of how the switch is wired currently and confirm if a pull up resistor is used ?

Regis

This is a very simple and convenient module. The only thing I think is missing is PWM outputs. This is an easy software feature to implement and with that, we could do anything.

Could you share example of using in Linux?

Ideally a C example but really anything would be helpful. Like to see setting port attributes, opening port, reading and writing from port.

Also I am using this to sense a momentary button that is pushed for a split second. I have four different buttons that can be pressed. I will be interfacing using a PC on a stick device that is not very powerful. Will I be able to poll fast enough to sense the press of one of the four buttons?

I plan on creating four threads that are in a loop polling the for the button press. It is pretty important that I do not miss the button being pressed.

Thanks for any help!!

regarding linux example

hi dear,

i am using the same device in linux for some notification purpose.
i am connection 2-pin audio cable to this USB device and i want to get notification when state changes at particular PIN.
i request your help in this regard. how to read particular GPIO value in linux?

is any kind of interrupt mechanism there to get the notification in case of state change at particular GPIO?

Thanks

Anand

Re:regarding linux example

USB doesn't have any interrupt mechanism avaialble. To detect any changes, you will need to poll the device in background.

Re:Could you share example of using in Linux?

A user submitted sample program is available for download at http://numato.com/productdoc/usbrelay/ReadUSB.tgz. This is written for USB Relay module but modifying it to work with GPIO board should be easy.