1
\$\begingroup\$

I need to control 17 digital outputs and 1 digital input from software running on a generic PC. The two interfaces that I can expect to always have available are USB and Ethernet. I don't necessarily need low-latency access to the IO ports, and I only have to read the inputs once every few seconds, but I do need to toggle the outputs at precise time intervals.

To achieve this, I thought the best approach would be to get some generic, low-cost MCU with 18 IO pins and USB support, and program it to accept a buffer of simple time-stamped commands over USB, which it would queue and then execute at the proper times. Instructions would translate to English like: At +1.2s: output 1100101 00000100 0000 or At +1.3s: read inputs.

Then I realized that what I was about to create is totally generic - it can be used in any application, not just mine. This got me thinking that something like this may already exist as a commercially-available product (a USB plug and MCU soldered to a board with pin-holes for the I/Os). But I can't find it, and I'm not sure what keywords to search for. Does anyone know if I can buy something like this?

Edit: After asking this question, I came across this related post: USB to GPIO module

\$\endgroup\$
12
  • 1
    \$\begingroup\$ Yes, it's called an Arduino. \$\endgroup\$
    – Majenko
    Commented Jun 12, 2014 at 22:35
  • 2
    \$\begingroup\$ "To achieve this, I thought the best approach would be to get some generic, low-cost MCU with 18 IO pins and USB support, and program it to accept a buffer of simple time-stamped commands over USB" - which is an Arduino. \$\endgroup\$
    – Majenko
    Commented Jun 12, 2014 at 22:52
  • 2
    \$\begingroup\$ "something like this may already exist as a commercially-available product (a usb plug and mcu soldered to a board with pin-holes for the I/Os)" - an Arduino. \$\endgroup\$
    – Majenko
    Commented Jun 12, 2014 at 22:53
  • 3
    \$\begingroup\$ Google "usb gpio module" or "usb relay module" or "usb 24 channel relay" \$\endgroup\$
    – Passerby
    Commented Jun 12, 2014 at 23:05
  • 1
    \$\begingroup\$ diolan.com/io/digital_in.html \$\endgroup\$
    – jippie
    Commented Jun 13, 2014 at 5:58

2 Answers 2

3
\$\begingroup\$

What you are describing there is known as a Microcontroller Development Board. There are many many different makes around.

The most common one is called the Arduino (made in Italy), and consists of an Atmel MCU (different ones are available) on a PCB with a USB interface (usually another Atmel MCU acting as a USB CDC/ACM interface to the main MCU's UART port).

Other makers of similar boards include chipKIT (who use the PIC32 microcontroller), Maple (who use ST Micro ARM chips), as well as the chip manufacturers themselves making them (such as Ti's Launchpad series of boards).

Most of them are programmed in C++ using a semi-standard API (the Arduino API is seen as the standard, and most of the others try and emulate it fairly closely), but some of them do also provide BASIC for programming in as well.

There are "bigger" boards as well, such as the Raspberry Pi, and the Beaglebone, which run a full blown version of Linux (some other operating systems are available as well), and often provide Ethernet (and/or WiFi) interfaces as well as USB ones.

Boards range in price, from just a few dollars (such as the Launchpad, IIRC mine cost $4.50 including delivery) up to $50-$100, such as the Beaglebone.

If you are looking for something less programmable there are modules based around the FT285R chip available. This is a USB to parallel FIFO chip, to which you send bytes and the equivalent 8-bit value is output on 8 IO pins. It can also be used as 8 inputs if you wish. That would mean all the programming would be done on the PC as the chip isn't programmable in any form at all.

\$\endgroup\$
1
\$\begingroup\$

Hardkernel offers a USB IO board for $15. While it doesn't appear to support the type of buffering described in the question, it does support SPI, UART and I2C outputs, as well as (2) ADC inputs and PWM. It's based around a PIC18F45K50 and appears to have 26 usable IOs.

The firmware for the chip can also be reprogrammed over the USB interface, so it would be possible to patch the default firmware to support timestamped commands. More info can be found here.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.