Communications Protocols

This section of the wiki is devoted to methods of getting data from sensor interfaces to host computers.

RS232 serial

Serial data is generally buffered by the operating system in order to provide the highest possible data transfer rates. This usually adds to latency and jitter. However, RS232 often provides the simplest means to connect an inexpensive microcontroller to a host computer. A simple circuit can be used to convert from a microcontroller's TTL voltage levels to the RS232 standard.

  • Connector: DB9 or DB25
  • Max Transfer Rate: 115,200 bps

The RS232 Standard

USB-CDC serial

Serial data is generally buffered by the operating system in order to provide the highest possible data transfer rates. This usually adds to latency and jitter.

  • Connector: USB

USB HID

USB HID data is generally given high priority in operating system kernels since its designed around human response times.

  • Connector: USB
  • Max Transfer Rate: 64 kbps

IEEE1284 Parallel Port

MIDI (Musical Instrument Digital Interface)

MIDI is an asynchronous serial communication protocol which is almost universally used in commercial digital instruments. MIDI has a lower resolution and data transfer rate than many newer data protocols, which makes it less-than-ideal for transferring large amounts of continuous data, but due to its ubiquity it can be useful for interfacing with a lot of existing music hardware. MIDI can easily implemented using the UART output capability of most microcontrollers.

Most MIDI messages consist of three bytes, where the first byte specifies the type of message and the channel number, and the last two bytes are parameters relating to the type of message sent (key number, controller number, velocity, etc). For a full list, see the link below.

Arduino and MAXMSP interface

Some good option for test, debug and also for some control can be find on Arduino Playground webpage. As of March, 2011, under the following configuration: Mac OS X system + Arduino duemilanove board + Arduino 018 software + MAXMSP 5.1.7

two options worked really fine:

Open Sound Control

Open Sound Control (OSC) is a communication protocol optimized for modern network technology. An OSC message consists of an address, followed by one or two more arguments. The addresses consist of a hierarchical, URL-style name that begin with a forward-slash (“/”) character. The transmission units of this protocol are called packets and they will always possess a size with a multiple of 4. Compared to MIDI, OSC has the advantage of being able to process “Bundles” of messages that can occur simultaneously.

Inter-Integrated Circuit(I2C)

Inter-Integrated Circuit Protocol is a communication protocol that allows multiple peripheral devices to be controlled by one or more controller devices. It requires two lines a serial data line (SDA) and serial clock line (SCL) which each device connected on the bus requiring a unique address. Messages are split into two frames. The address frame indicates the peripheral where the data is being sent to and 8 bit data frames which contain the data being transmitted.

1)

  • Connectors: 2 wires (SDA,SCL)
  • Transfer Speeds: 100kbits/s(Standard Mode), 400kb/s(Fast mode),1Mb/s(Fast-mode plus),3.4Mb/s(High-speed mode)
  • Max Number of peripheral Devices: 1008