Architecture Overview

From CCRMA Wiki

(Difference between revisions)
Jump to: navigation, search
(Arduino)
 
(9 intermediate revisions not shown)
Line 1: Line 1:
-
A quick overview on the architecture of the [http://cm-wiki.stanford.edu/wiki/PID_2009 Physical Interaction Design Workshop 2009] setup
+
A quick overview on the architecture of the [http://music250a.stanford.edu Physical Interaction Design's] architectural setup.
Line 5: Line 5:
Very broadly, a PID setup allows computers to react progammatically to events in the physical world.
Very broadly, a PID setup allows computers to react progammatically to events in the physical world.
-
[[Image: diagram1.png]]
+
[[Image: diagram1.png]]
Actions, events and states are detected by sensor circuits, which convey signals to an embedded microcontroller, which in turn addresses a computer program. The computer program can then respond by producing sound and graphics, or it can pass commands back to an embedded processor, which can effect action, sound, or display through the use of electronics.
Actions, events and states are detected by sensor circuits, which convey signals to an embedded microcontroller, which in turn addresses a computer program. The computer program can then respond by producing sound and graphics, or it can pass commands back to an embedded processor, which can effect action, sound, or display through the use of electronics.
Line 15: Line 15:
Here is an example of a very basic sensor circuit:
Here is an example of a very basic sensor circuit:
 +
[[Image: circuit1.png]]
[[Image: circuit1.png]]
Line 21: Line 22:
For this workshop we will be using an [http://cm-wiki.stanford.edu/wiki/AVR#ATMega644 Atmel AVR ATMega168].
For this workshop we will be using an [http://cm-wiki.stanford.edu/wiki/AVR#ATMega644 Atmel AVR ATMega168].
 +
 +
More on [http://cm-wiki.stanford.edu/wiki/Microcontroller_Architecture Microcontroller Architectures].
==PID 2009 setup==  
==PID 2009 setup==  
For this workshop, we will be using breadboards and [http://www.arduino.cc/en/Main/ArduinoBoardNano Arduino Nanos] running [http://firmata.org/wiki/Main_Page Firmata], as platforms for the sensor circuit and embedded microcontroller, respectively. On your computer, you will be using MAX/MSP or PD, graphical programming environments that use a patch-programming model and enable sound synthesis.
For this workshop, we will be using breadboards and [http://www.arduino.cc/en/Main/ArduinoBoardNano Arduino Nanos] running [http://firmata.org/wiki/Main_Page Firmata], as platforms for the sensor circuit and embedded microcontroller, respectively. On your computer, you will be using MAX/MSP or PD, graphical programming environments that use a patch-programming model and enable sound synthesis.
 +
[[Image: diagram3.png]]
[[Image: diagram3.png]]
Line 42: Line 46:
[http://www.firmata.org/wiki/Main_Page Firmata] is a generic protocol for microcontrollers to communicate with software on a host computer. Firmata firmware is available for the Arduino and PIC platforms; Firmata host software is available for [http://at.or.at/hans/pd/objects.html#pduino Pd] and [http://digitalcoleman.blogspot.com/2009/03/maxuino-005-released-arduino-firmata-v2.html Max/MSP], as well as for [http://www.arduino.cc/playground/Interfacing/Processing Processing], [http://sourceforge.net/projects/firmataplus C++], [http://code.google.com/p/pyduino/ Python], [http://code.google.com/p/as3glue/ Flash], [http://code.google.com/p/as3glue/ SuperCollider], [http://code.google.com/p/permata/ Perl] and [http://www.acraigie.com/programming/firmatavb/default.html Visual Basic].
[http://www.firmata.org/wiki/Main_Page Firmata] is a generic protocol for microcontrollers to communicate with software on a host computer. Firmata firmware is available for the Arduino and PIC platforms; Firmata host software is available for [http://at.or.at/hans/pd/objects.html#pduino Pd] and [http://digitalcoleman.blogspot.com/2009/03/maxuino-005-released-arduino-firmata-v2.html Max/MSP], as well as for [http://www.arduino.cc/playground/Interfacing/Processing Processing], [http://sourceforge.net/projects/firmataplus C++], [http://code.google.com/p/pyduino/ Python], [http://code.google.com/p/as3glue/ Flash], [http://code.google.com/p/as3glue/ SuperCollider], [http://code.google.com/p/permata/ Perl] and [http://www.acraigie.com/programming/firmatavb/default.html Visual Basic].
-
Firmata is not as widely used as Arduino; people usually write custom Arduino firmware code to suit their application. Because Firmata works generically to collect inputs and issue outputs, it is generally not as efficient in time or bandwidth as custom firmware. However, by using Firmata, we can abstract away many of the details of microcontroller programming to focus our efforts on our MAX/MSP or PD programs.
+
Firmata is not as widely used as Arduino; people usually write custom Arduino firmware to suit their application. Because Firmata works generically, it is generally not as efficient in time or bandwidth as custom firmware. However, by using Firmata, we can abstract away many of the details of microcontroller programming to focus our efforts on our MAX/MSP or PD programs. We will be using the default implementation of Firmata firmware; it is also possible to write your own firmware using Arduino but use the Firmata protocol and libraries ([http://arduino.cc/en/Reference/Firmata see here]).
==Alternative platforms==
==Alternative platforms==
Line 48: Line 52:
As a point of reference, the table below shows some alternatives to the platforms we are using in this workshop.
As a point of reference, the table below shows some alternatives to the platforms we are using in this workshop.
-
<table border=1><tr><td>Electronic circuit platform</td><td>Microcontroller platform</td><td>Programming Environments</td></tr><Tr><td></td><td></td><td></td></tr></table>
+
<table border=1><tr><td colspan=3>PID platforms</td></tr><tr><td>Electronic circuit platform</td><td>Microcontroller platform</td><td>Programming Environments</td></tr><Tr><td><b>Breadboarded Circuits</b><br>Printed Circuit Board<br>Off-the-shelf Components</td><td><b>Arduino</b><br>Other AVR-based systems (like Buddha Board)<br>PIC based systems<br>Basic Stamps<br>ICubeX</td><td><B>PD<br>Max/MSP</b><br>Processing<br>Visual Basic<br>Super Collider<br>ChucK<br>Flash</td></tr></table>
[[Category:PID]][[Category:PID_2009]]
[[Category:PID]][[Category:PID_2009]]

Current revision as of 09:42, 28 September 2009

A quick overview on the architecture of the Physical Interaction Design's architectural setup.


Contents

Architecture Diagram

Very broadly, a PID setup allows computers to react progammatically to events in the physical world. Image: diagram1.png

Actions, events and states are detected by sensor circuits, which convey signals to an embedded microcontroller, which in turn addresses a computer program. The computer program can then respond by producing sound and graphics, or it can pass commands back to an embedded processor, which can effect action, sound, or display through the use of electronics.

Image: diagram1b.png

Sensor circuit

A circuit is an interconnection of electrical elements such as resistors, inductors, capacitors, voltage sources, current sources, and switches in a network that has a closed loop, giving a return path for the current. A sensor circuit incorporates a sensor which varies resistance, inductance, capacitance, or otherwise varies voltage or current to produce signals indicating the state of the sensed phenomena.

Here is an example of a very basic sensor circuit:

Image: circuit1.png

Microcontroller

A microcontroller is essentially a small computer on a chip. Like any computer, it has memory, and can be programmed to do calculations, receive input, and generate output. Unlike a PC, it incorporates memory, a CPU, peripherals and I/O interfaces into a single chip. Microcontrollers are ubiquitous, found in almost every electronic device from ovens to iPods.

For this workshop we will be using an Atmel AVR ATMega168.

More on Microcontroller Architectures.

PID 2009 setup

For this workshop, we will be using breadboards and Arduino Nanos running Firmata, as platforms for the sensor circuit and embedded microcontroller, respectively. On your computer, you will be using MAX/MSP or PD, graphical programming environments that use a patch-programming model and enable sound synthesis.

Image: diagram3.png


Arduino

The Arduino is an electronics prototyping platform with a hardware and software component.

The Arduino software application is an IDE for programming firmware for the Arduino hardware. Its programming language is based on C; it has some structures, variables and functions specially designed for managing microcontroller electronics. It is open source and can be downloaded for free.

The Arduino hardware is based on the Atmel AVR microcontroller family. There is not one Arduino board, but, rather, a host of boards based on the same basic open-source design. Ours, the Arduino Nano, is based on the Arduino Decimila design, but is smaller, and breadboard-mountable.

The Arduino hardware has the advantage of being mass-produced, relatively low-cost and readily and widely available. More importantly, there is a wide community of folks using Arduino, which makes it easier to get support after this workshop.

Firmata

Firmata is a generic protocol for microcontrollers to communicate with software on a host computer. Firmata firmware is available for the Arduino and PIC platforms; Firmata host software is available for Pd and Max/MSP, as well as for Processing, C++, Python, Flash, SuperCollider, Perl and Visual Basic.

Firmata is not as widely used as Arduino; people usually write custom Arduino firmware to suit their application. Because Firmata works generically, it is generally not as efficient in time or bandwidth as custom firmware. However, by using Firmata, we can abstract away many of the details of microcontroller programming to focus our efforts on our MAX/MSP or PD programs. We will be using the default implementation of Firmata firmware; it is also possible to write your own firmware using Arduino but use the Firmata protocol and libraries (see here).

Alternative platforms

As a point of reference, the table below shows some alternatives to the platforms we are using in this workshop.

PID platforms
Electronic circuit platformMicrocontroller platformProgramming Environments
Breadboarded Circuits
Printed Circuit Board
Off-the-shelf Components
Arduino
Other AVR-based systems (like Buddha Board)
PIC based systems
Basic Stamps
ICubeX
PD
Max/MSP

Processing
Visual Basic
Super Collider
ChucK
Flash
Personal tools