Hardware \ Wiring ALPHA 1.0
Author: Hernando Barragán
Description: Wiring is an electronic sketchbook and hardware electronics for developing ideas. It is a context for learning fundamentals of computer programming and prototyping with electronics within the context of the electronic arts.
Keywords: Wiring, Processing, Interactive Media, Electronic Arts, Programming, C, C++, Hernando Barragán

Search wiring.org.co:

###

##### Wiring hardware (I/O board and Mini)

The Wiring hardware is a small circuit board that includes a tiny computer of the size of a postage stamp known as a microcontroller. This computer can be programmed in the Wiring programming environment to control all kinds of sensors and actuators. Sensors are devices that allow the board to acquire information from the surrounding environment (temperature, light, distance to an object etc.). Actuators are devices that allow the board to create changes (responses) in the physical world (light, movement, temperature, etc.) making possible to create all kinds of interactive artifacts.

A microcontroller addresses some of the difficulties involved in prototyping with electronics by introducing the concept of programming into it. The same unit can behave in different ways, just by doing or modifying a software program to adapt it to a specific purpose.

In order to attach sensors and actuators the Wiring hardware provides a set of connectors known as pins. A pin can be set as INPUT or OUTPUT whether it is used to read a sensor or create responses in the physical world through actuators. Sensors can be of different kinds but they may be grouped into digital and analog. Digital refers to signals with two possible states, ON or OFF, HIGH or LOW, like switches for example or special communication protocols. Analog refers to signals that can take any value in a continuous range, like luminosity or temperature.

The Wiring hardware can be connected to a computer's USB port. This connection is both for uploading into the Wiring hardware a program written in the Wiring programming environment and to communicate the Wiring hardware with a computer for other purposes, like sending data from/to the board to an application running on a PC. The PC recognizes the Wiring hardware as a serial port, being able to read and send data to it from many applications.

There are 3 basic prototyping scenarios Wiring was designed for: standalone interactive objects or spaces, interactive objects or spaces connected to a computer to enhance the prototype capabilities, or networked objects or spaces by communicating multiple hardware devices.

There are two flavors of the Wiring hardware: The Wiring I/O board (left in the diagrams) and the WiringMini (right in the diagrams). Both the Wiring I/O board and WiringMini are based on the powerful ATMEL atmega128 microcontroller, so both have the same power and capabilities. The Wiring I/O board can be used out of the box, it provides a USB port on it which can be directly attached to a computer for uploading programs, no special setup or connections needed to start working with it so it is ideal in the classroom as it is just ready to use. The WiringMini is smaller in size, it is intended for advanced users. It doesn´t include a USB connector so it requires a serial adapter like the Wiring USBAdapter to program it. Because of the smaller size factor the WiringMini can be used directly on a breadboard, it has lower costs so it is ideal for setting up a small-mid production of a project. It fits in tiny places with a very low power consumption.

Do you want to get the Wiring hardware, see compatible boards or build your own? please check the FAQ

Digital input/output pins
Digital input/output ports
Analog input pins
PWM (analog) output pins
Serial ports
Pins with special functions
External interrupts pins
Need more digital pins?
Indicative LEDs
Power supply
USB Adapter

##### Digital input/output pins

The Wiring hardware has 43 Digital pins that can be configured and used individually as inputs or outputs from the Wiring language in the Wiring programming environment. When a digital pin is configured as INPUT it can be used to read all kind of sensors that give values ON and OFF, like push buttons, touch sensors, switches etc. When a pin is used as an OUTPUT it can be used to turn ON or OFF all sort of devices like light bulbs, motors, home appliances etc. Pin 48 is used as OUTPUT only and it is connected to an amber LED (Light Emitting Diode) located in the board for quickly test programs or as diagnostics.

##### Digital input/output ports

The Wiring hardware has 5 digital ports. A port is a set of 8 pins, and can be used to send or receive data to devices in parallel (8 bits at a time). They are useful when using devices like liquid crystal displays or printers. Each port can be configured and used individually as input or output from the Wiring language in the Wiring programming environment.

##### Analog input pins

The Wiring hardware has 8 Analog Inputs capable of reading voltages between 0-5V. Internally the voltages are translated into numbers from 0 to 1024. These inputs can be used to measure continuous quantities like light intensity, temperature, proximity, position etc.

##### PWM (analog) output pins

The Wiring hardware has 6 PWM (Pulse Width Modulation) outputs. PWM consists of switching something ON and OFF thousands of times per second simulating the behaviour of an analog output, creating effects like light intensity dimming or controling the speed of a motor.

##### Serial ports

The Wiring hardware has 2 hardware serial ports. In the language one called Serial and the other called Serial1. The Serial serial port is available on the pins 32(Rx) and 33(Tx) and in the Wiring I/O board is also available through the USB connector. It is used for both programming the Wiring hardware with the Wiring development environment, and to communicate with other devices. The Serial1 serial port is available on I/O pins 2(Rx) and 3(Tx).

##### Pins with speacial functions

The Wiring hardware provides ISP and TWI (Two Wire Interface) also known as i2c interface. The TWI allows to connect up to 128 i2c sensors/actuators in a network using only 2 wires to communicate with all of them. It is also possible to use those pins to create a network of up to 127 Wiring boards using the Wire library.

##### External interrupts pins

It is possible to generate and attend external interrupts in the Wiring hardware. There are 8 external interrupts numbered from 0 to 7 so there are 8 pins on the Wiring hardware capable of external interrupts, 0, 1, 2, 3, 36, 37, 38, and 39 respectively. In addition to being regular digital pins, note that pins 0 and 1 are also used for the Wire library (TWI) and pins 2 and 3 are also the Serial1 serial port pins.

##### Need more digital pins?

If more digital I/O pins or a an additional I/O digital port are needed, it is possible to use the analog input section as a digital one, in such case individual pins will continue to be numbered from 40 to 47, and the set of 8 pins is available as port 5.

##### Indicative LEDs

The Wiring hardware has a power (green) LED indicator that is turned ON when the board is powered. It also has a diagnostic (amber) LED, that can be turned ON or OFF from the Wiring language and is accessed as digital pin 48. The Wiring I/O board also includes LEDs for the Serial serial port (USB) data transmission (light yellow) and data reception (red).

##### Power supply

A generic 7-13 Volt 800mA power supply with female, center positive connector is required to power the Wiring hardware. It will suit fine for a number of applications, but if more power is required, it is recommended to get a more robust power supply.

For small experiments, with low current consumption devices, the Wiring hardware can be powered from the computer's USB port when the board is connected to the computer.

The Wiring hardware can also be powered from external batteries or regulated power supplies (see the WARNING note at the end of the diagram when doing this).

A USB Cable (generic USB printer cable) is required to connect the Wiring hardware to a computer. The WiringMini requires a serial to USB adapter (like the Wiring USBAdapter) to connect it to a computer.

##### USB adapter

The Wiring USBAdapter converts the serial RS-232 TTL signal levels to USB. It is based on the FTDI FT232R chip. The small board provides access to all its pins and use it with breadboards and all kinds of microcontrollers.

The Wiring USBAdapter has RX and TX RS-232 TTL lines that can be connected directly to a microcontroller serial lines. The USBAdapter RX and TX lines must be connected to the TX and RX lines of the microcontroller repectively.

The RS-232 standard includes other I/O lines that are also available in the Wiring USBAdapter, even if those lines are not commonly used in many setups. It also provides access to other FTDI232R lines that can be configured for other purposes using the FTDI software utilities.

The Wiring USB Adapter is powered from the USB bus directly, it provides regulated voltage (VCC) output pins for 5V and 3.3V which can be used to power the WiringMini board or other devices that require such voltages to operate.

WARNING The USBAdapter is powered from the USB bus directly ONLY. Do not attempt to use the 3.3v or 5v lines for other than powering other devices, the USBAdapter should not be powered from those lines. Doing this wrongly might damage your USBAdapter permanently. If you are not sure about your connections or need additional support go to the discourse section and ask for help.