view history edit print login register

:: 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.


Navigation

Output

Input

Storage

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.

Visual

Audio

Physical/Mechanical

Electrical / High Power

  • Relays
    • Schematic for driving DC relays using a transistor connected to an Arduino pin.
    • Schematic for driving 5V DC relays using an optical coupler and a transistor connected to an Arduino pin, which is protected by the optical coupler. Based on the schematic above.
  • Voltage Boosters
    • A simple regulated DC-DC booster for up to 60V 1/4W. It uses no special ICs, just basic components and two pins from the Arduino.

Multiplexing


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.

Visual/IR

Audio

  • Microphones
    • Example of how to connect a piezo as a blow sensor, can also be used to read vibrations or as a touch sensor.
    • Example of how to connect a electret microphone.
  • MIDI

Mechanical

  • Switches and Buttons
    • Debounce: a library to debounce switches.
    • SoftwareDebounce: a simple software input debounce algorithm.
    • Buttons: a simple library to use hardware debounced buttons, handling one shot and hold.
    • HoldButton: a code that makes a single button able to call different functions depending upon how long it it is held.
    • Button: simple hardware abstraction library
    • AnalogButtons: a library to connect more than 1 switch to a single Analgue pin, using different voltage dividing resisters for each switch. Provides register callback functions or over-riding Button class methods to communicate a button press action. Supports configurable holding down of a Button.
    • AdvButton: Advanced, yet simple to use, library for registering user input with buttons. Provides an event based interface.

  • Encoders

  • Potentiometers

Input Devices

Capacitive Sensing

Pressure Sensing

  • SCP1000: Code to read the SCP1000 barometric pressure/temperature sensor, which uses the SPI interface.

Ardustat: Galvanostat/Potentiostat

  • Ardustat: Schematics and code to build an electrochemical characterization devices using an Arduino.

Distance Sensing

- URM37 Ultrasonic Distance Measurement Library by Miles Burton

Slot Detectors

Environmental

  • Temperature
    • KTY 81-* KTY (NTC) Tempertaure sensor with Arduino
    • Dallas Temperature Control Library. A very simple library to interface with the DS18B20, DS18S20 or DS1820 IC.
    • A simple lookup table method of getting Celcius numbers from a 10k thermistor. Code & calculating spreadsheet here: thermistor
    • Reading a thermistor using an equation instead of a lookup table. thermistor2
    • Single line of code to read thermistor from 1C to 44C: thermistor3
    • There are also ways to access the excellent Dallas 1-Wire temperature sensors.OneWire
    • Extremely easy-to-use Arduino library for the Sensirion SHT1x temperature and humidity sensor, which also calculates the dew point (sensor available at nuelectronics).
    • Simple Library to interface a Maxim MAX6675 Thermocouple to Digital Temp Converter. (Google Code
    • Reading from SMT16030 digital temperature sensors
    • LM75A i2c temperature library
    • Microchip MCP9700A Temperature Sensor Library -40C to +125C for $0.36US!
    • LM335A Temperature Sensor Library

  • See also

    • Dallas One-Wire Interface: MicroLans- networks of 1-Wire chips- have been popular for many years with weather station hobbyists. In the "outside world" beyond our own Arduino community there is a great deal of information on connecting rainfall, wind, temperature, (etc, etc!) sensors... little of it Arduino specific, but all of it Arduino useable once you master the basic techniques of communicating with the 1-Wire chips at the heart of all of the already-invented wheels. The basic techniques are not terribly complicated, and they open up many possibilities.

    • Sensors for Light (Visual and IR... levels, not images)

Tagging / Labeling

Location

  • Compass
    • HMC6352 I2C Compass Sensor - Read heading from a compass sensor, using the Wire library. Here's the sketch: Learning.hmc6352
    • Forum posting on controlling the HMC6352 with the Wire library.
    • Parallax HM55B Compass Sensor - get angle to North here is all you need: HM55B

  • GPS
    • Arduino code for parsing data from the EM-406 GPS module, by bigengineer.
    • How to connect a Parallax GPS module to the Arduino, and read its $GPRMC string. Tutorial translated from Igor González Martín's original Spanish tutorial. This allows you to get date, heading, latitude and longitude from the GPS module.
    • GPS library for Arduino/Wiring by Maarten Lamers is a library for decoding (NMEA) data from any GPS receiver. It extracts all information types, such as speed, direction, location. Supports $GPRMC and all possible sentence types. Includes example programs and routines for calculating distances and directions over Earth's surface. NOTE: this library does not work on 1K Arduinos: Duemilanova, etc.
    • TinyGPS, a new GPS/NMEA parser by Mikal Hart is a resource stingy library for decoding (NMEA) data from any GPS receiver. It extracts speed, direction, location, course, date, and time, but consumes only about 100 bytes of RAM.
    • Acoustic.GPS A GPS homebrew "GPS" system that uses sound to determine distance to three known points using off the shelf components.

Motion

Electrical / High Power

Time

Touch screen

Multiplexing

Shift Registers

ADC/DAC


Storage

Various options for storing data from your Arduino board.

Built-In EEPROM

  • The EEPROM library give you access to 512 bytes of non-volatile memory (that is, it retains its value when you turn the board off).

Built-In Flash

  • Mikal Hart's Flash library allows you to easily store strings, arrays, and tables in read-only memory without the hassle and complexity of learning PROGMEM programming.

USB Memory Stick

DataFlash Memory

I2C EEPROM

Dallas 1-Wire

  • There are EEPROMs in the 1-Wire chip family from Dallas Semiconductor. They connect to the Arduino via a MicroLan. The techniques for using MicroLans from an Arduino have already been developed. (And give you access to input and output options, too.)

SD / MMC Card

Spi RAM


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

PWM

uM-FPU V3.1 Floating Point Coprocessor

  • Fpu library for using the uM-FPU V3.1 Floating Point Coprocessor.

2B

  • 2B is a simple protocol used to receive and send messages to Arduino

PS2

Phones

HDMI-CEC

  • HDMI CEC Library communication with HDMI CEC capable devices (TV, DVD, Receivers, BR) : power on/power off/input selector.

Ethernet

WiFi

  • AsyncLabs has a WiFi shield for the Arduino using ZeroG Wireless's ZG2100 WiFi device. It comes with a WiShield library which includes the driver source code, a TCP/IP stack and a bunch of sample sketches demonstrating the use of the Arduino as a web server and a web client. More information about using the sketches can be found on the AsyncLabs wiki page.

Flash / Flex

DMX

  • DMX (Digital MultipleXed) is a protocol used for connecting lighting controllers, dimmers, scrollers, scanners, etc..

I2C / TWI

Dallas One-Wire / MicroLan

MIDI

MIDI Library

MIDI-out (sending midi data to another device)

  • Ardrumo: software to convert serial data coming from the Arduino into Mac OS X MIDI drum data (i.e. how to get Arduino talking to GarageBand without buying any extra hardware).
  • S2MIDI - Windows (.NET) program for converting serial data from Arduino into MIDI messages (hosted on Google Code)
  • MIDI Relay - Very similar to S2MIDI - copies all note on / note off and controller messages to the default MIDI port.Useful for quick testing of MIDI applications(MIDI Relay)
  • ttymidi - a GPL-licensed program that allows an Arduino board to interface with Linux ALSA MIDI applications without any additional hardware.
  • Make your Arduino into a MIDI drum controller with Todobot's tutorial
  • The Midi Out tutorial from the fine folks at ITP.
  • A blog on building a midi guitar pick using the Arduino.
  • read six sensors and send their values as Midi CC messages
  • Effects Processor Controller via MIDI
  • MIDI Touchpad hardware and software using PS2 Touchpad as a MIDI Device. Real MIDI, not translated by Desktop app.
  • 16 MIDI Drums 10 switched and 6 velocity sensitive drums
  • MIDI Projects
  • Wii Guitar Hero World Tour Drums MIDI Out interface at http://jamers.netne.net.

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

Wireless

General

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