Interfacing with Hardware

These topics cover the hardware and software setup required to connect an Arduino device with a variety of electronic parts, chips and devices. A related topic not covered under this section is the shield, boards that plug directly into an Arduino's pin layout. Information on the creation and use of specific shields belongs in that section. Information on shields in general and their creation belongs here.

See here for a table of shields and the Arduino pins they use.

Arduino has limits on how much current can be sourced or sunk by its I/O pins. When interfacing with hardware you need to be careful not to exceed these limits. For details see ArduinoPinCurrentLimitations. In general, do not exceed 20 mA per pin. In particular, do NOT directly connect LEDs to Arduino outputs! Always use a series resistor (220 ohms is a good value).


Navigation

Output

Input

User interface

Communication

General


Output

Examples and information for specific output devices and peripherals: How to connect and wire up devices and code to drive them.

See also the pages devoted to the Dallas One-Wire MicroLan, I2C and ethernet. They enable you connect additional output (etc.) devices across networks controlled by the Arduino. The trouble of controlling a network is repaid if you need to connect many outputs (and/ or inputs), or if your actuators / sensors are not close to your Aruduino. Arduino as ISP

Arduino as ISP

Visual

Audio Output

MicroLS: a simple light show hidding advanced data acquisition and DSP functions.

Physical/Mechanical

Electrical / High Power

Multiplexing Outputs

USB

The UNO and Mega2560 use an ATMega8u2 to provide the USB interface to the Host PC and it is programmed with USB to serial firmware. The firmware on the ATMega8u2 can be replaced to turn the UNO or Mega2560 into a different USB device such as a Keyboard, Mouse, or MIDI device. This section has links to different USB firmware resources.

The coming Arduino Leonardo has USB support built into the the processor, removing the need for the FTDI or the ATMega8u2 to communicate with a host pc and the Arduino 1.0 IDE has partial support (written 22/2/12) for keyboard and mouse interfaces.


Input

Examples and information on specific input devices and peripherals: How to connect and wire up devices and code to get data from them.

See also the pages devoted to the Dallas One-Wire MicroLan, I2C and ethernet. They enable you connect additional input (etc.) devices across networks controlled by the Arduino. The trouble of controlling a network is repaid if you need to connect many inputs (and/ or outputs), or if your actuators / sensors are not close to your Aruduino.

Bar Codes

  • You can hook up a bar code scanner (which simulates a keyboard) or a keyboard to the Arduino. See bar code scanner

Light sensors... visible, IR, etc. Levels, not images

See also: the IR section in the Communications section

Images

Audio Input

Mechanical

Magnetic

Joysticks / Gamepads

Mice

Keyboard/Keypads

(See also section on capacitive sensing for keypads which will, for instance, work through a window pane.)

Capacitive Sensing

Magnetic Cards

Position Sensing

Pressure Sensors

Ardustat: Galvanostat/Potentiostat

Distance Sensing

Environmental

Tagging / Labeling

This section a legacy... Bar Codes and RFID now have their own sections. (From 29 Jun 2011)

Location

Motion

Other voltages / Power (kiloWatt hours)

Time

Touch screen

Slotted Detectors/ Proximity Sensors

See also other references to "proximity" elsewhere on page, including the material in distance sensing. There may be discussion of these devices in the "encoders" section, for intstance. Set up xrefs? SEe, for instance, the material here in "IR Reflectance/Line Sensors" under "Light sensors"

Human Interface

Multiplexing Inputs

ADC/DAC

RFID devices for input

Sparkfun offer several RFID readers suitable for Arduinos. There are useful discussions on the use of them in the Sparkfun pages, and in the forum.

Wiring tutorial (note: this Wiring tutorial link is 404).

At 1/2011, a useful discussion was unfolding in the forum on how to connect a Wavetrend active reader capable of reading cards at distances in excess of 2m.

The USB Phidgets RFID reader you may encounter for sale on eBay is not suitable for Arduino work, as to use it you need a proprietary .DDL


User Interface

Graphical or text - based user interface (UI) or human machine interface (HMI) on Arduino: How to ask a user to input information (number, choose from a list, enter text, etc.) on an Arduino using display (LCD, LED matrix etc.) and buttons, keypads or other devices.

Text-based user interface

Graphical user interface

Hardware independent layers

Storage

Various options for storing data from your Arduino board.

Built-In EEPROM / Built-In Flash

Dallas 1-Wire

DataFlash Memory

I2C EEPROM

SD / MMC Card

Spi RAM

USB Memory Stick


Communication

Information on communication protocols often used to talk with other devices. Please refer to Interfacing with Software for information on linking with various PC based applications. This listing may contain cross-listings with device type listings above.

Serial

SPI

SPI/USI

PWM

uM-FPU V3.1 Floating Point Coprocessor

uM-FPU64 Floating Point Coprocessor

2B

PS2

GSM/GPRS M2M modules

Phones

HDMI-CEC

Ethernet

Web Data Logging With Pachube

WiFi

See also the "wire-less" section for other communications channels without wires, e.g. IR.

A serial WiFly driver library and Client-Server classes are available through http://arduinology.blogspot.com and http://sourceforge.net/projects/arduinowifly/files/.

Sparkfun has the module available here: WiFly RN-XV Wire Antenna.
A 0.3 library is available here: github/WiFlyHQ.

Flash / Flex

DMX

CAN-Bus

I2C / TWI

Dallas One-Wire / MicroLan

Shield for sale here.

MIDI


MIDI Library - Simple and fast way to send and receive MIDI messages with the Arduino.

MIDI-out (sending midi data to another device)

MIDI-in (receiving and interpreting midi data with an Arduino)

KNX / EIB

Wireless... including radio-less "wire-less" channels, e.g. IR

See also: the WiFi section and Via Mobile Phone

Via Mobile Phone

See also: the Bluetooth section.

General

Arduino-related stuff that doesn't quite fit anywhere else.