go away spammer

Author Topic: USB IO card suggestions  (Read 1834 times)

0 Members and 1 Guest are viewing this topic.

Offline dbmonkeyTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
USB IO card suggestions
« on: June 27, 2013, 10:45:14 PM »
I need an external USB I/O card that has
-at least 16 out digital (on/off) wires
-can change all 16 bits every ms
-can be easily controlled with c++

Thanks! I had to ask the experts on this forum  ;D

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: USB IO card suggestions
« Reply #1 on: June 28, 2013, 11:49:58 AM »
Sounds like a slam dunk for an Arduino Uno. Note that the "analog input" pins can be used as digital pins, too. So, 18 total digital pins, plus the serial port which will talk to the computer. Another option that's about equivalent would be the Arduino Leonardo -- it doesn't need the serial port for computer comms AFAIK, so it has 20 total digital pins.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: USB IO card suggestions
« Reply #2 on: June 28, 2013, 05:33:54 PM »
There are some FTDI chips that have GPIO pins and are easy to use.
http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT232H.pdf

 [quote[-can change all 16 bits every ms[/quote]
This might be a problem with using USB and any OS like Windows, Linux etc due to the Time-sliced task manger. 


Offline Tommy

  • Robot Overlord
  • ****
  • Posts: 123
  • Helpful? 3
Re: USB IO card suggestions
« Reply #3 on: June 28, 2013, 07:38:51 PM »
Quote
I need an external USB I/O card that has
-at least 16 out digital (on/off) wires
-can change all 16 bits every ms
-can be easily controlled with c++

http://labjack.com/u3

Not sure about every ms?

Tommy

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: USB IO card suggestions
« Reply #4 on: June 28, 2013, 07:57:46 PM »
Not a bad device. From the user's guide:
Quote
Command/Response:  Software command to set it high followed by command to set it low.  Per Section 3.1 the best you can do is about 600us per command.
http://labjack.com/support/u3/users-guide/2.8

So maybe you can get the 1ms although at times this could be much slower.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: USB IO card suggestions
« Reply #5 on: June 28, 2013, 08:37:42 PM »
The Arduino Leonardo can do 1 ms pin timing easily. The best thing to do would be to define your own USB protocol and write your own USB decoding code using the LUFA library, although that's going to be more work.

If you are OK with scheduling pin on/offs a bit in advance, you can send data for the next 10 milliseconds in each packet, and easily keep up a 100 Hz command rate from the host with a Leonardo (or similar clone, such as the MattairTech 32u4 board that I really like: http://www.mattairtech.com/index.php/development-boards/atmega32u4-usb-development-board-arduino-compatible.html ) Being under $20, it's hard to get a better price than that :-)

 


Get Your Ad Here