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

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.

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!
  • See also Visual / Light Sensor
  • See also Dallas One-Wire Interface

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

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

I2C / TWI

Dallas One-Wire Interface

MIDI

MIDI Library

MIDI-out (sending midi data to another device)

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

Wireless

General

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