The Pantheon is a mechatronic art system which evolved out of an adaptation of the servers and hardware used by the music technology department at CalArts to control the mechatronic instruments residing in the Machine Lab. The Pantheon is structured to be modular, flexible, and easy to learn.
The Pantheon server is written in the ChucK programming language and plays host to mechatronic instruments and sensor banks in several of the installations presented in earlier chapters. To ensure that the server is able to keep track of any number of microcontroller clients, a handshake routine is run whenever the server is initialized to sort out the Pantheon microcontrollers from unrelated USB devices which might be plugged into the host computer. The routine requests an identification number (ID) from each USB device connected to the host computer. Connected Pantheon boards respond with their unique ID allowing the server to disseminate information about the microcontroller and assign a corresponding OSC address to the Arduino.
After the handshake is complete, the server begins to listen on the network for any OSC messages which correspond to the Arduinos who’ve completed the handshake. When the server recognizes a valid OSC address, and arguments, it forwards the message to the appropriate microcontroller using a custom serial communication protocol. In addition to the OSC listener, a supplementary ChucK program can optionally be executed to convert MIDI messages, from an internal IAC bus, into OSC messages that the server understands. This simple, yet flexible, system allows for the easy addition of any number of clients, can be controlled using any programming language able to output MIDI or OSC, provides a standardization for interfacing with the instruments, and gives the system administrator a built-in diagnostic to test if each of the devices are properly communicating with the server.
While most of the microcontrollers used in the Pantheon system only receive messages from the server, Arduinos which have onboard sensors report to the server with their sensor readings in addition to receiving messages from the server. During the handshake routine if any of the microcontrollers are discovered to be using sensors the server will spork a shred which infinitely polls the shield for readings. The Arduino firmware is kept simple simply reporting its raw sensor values delegating all signal conditioning and signal processing to the host computer. This greatly reduces the times needed for programming and calibrating systems after the hardware has been built by allowing for quicker calibration of the signal conditioning, providing a much more powerful machine to perform calculations, and reducing the number of times the new firmware needs to be uploaded onto the Arduino. The Pantheon polls the Arduinos telling each unit when to check the values of their sensors and report the result. This is done instead of the Arduinos continuously reporting their value to ensure the user maintains control over possible crosstalk between the sensors. This is especially important with ultrasonic rangefinders which have to be triggered one at a time, with an interval of inactivity between triggering, to avoid false positives and inaccurate readings.
When the server is orchestrating many Arduinos that make up larger, more complex structures, such as with the mechatronic personalities in No Humans Allowed
which each exhausting five Arduinos, the server initializes a “digital conductor” software process which organizes the multiple devices into larger constructs (personalities) while providing a comparatively intuitive interface for the artist to work with. The digital conductor orchestrates the overall activity of each of the personalities while acting as conduit for communication between the numerous Arduinos used in the ensemble. Just as an orchestral conductor does not play a violin or piano during a concert, the digital conductor does not exhibit direct control over what the personalities are doing. It instead acts as the glue that binds their communication and interaction to the world.
The Pantheon uses the Open SoundControl (OSC) protocol to orchestrate communication between clients and servers. OSC has many advantages over comparative protocols, such as MIDI, which are often used for controlling musical instruments or installations. For one, OSC is built around the UDP internet protocol allowing it to work seamlessly over the network. This makes it possible for Pantheon installations and performances to decentralize via wireless communication. MIDI limits the values for notes and velocities to the range of 0 to 127 while OSC, on the other hand, is able to send full 32-bit integers (ranging from -2,147,483,648 to 2,147,483,637), floating point numbers, strings, and even audio data, or video frames, disguised as what the protocol refers to as “blobs”. One advantage of OSC over MIDI is its freedom to define custom communication schemas. While the OSC schema that The Pantheon uses for any particular project depends on the demands of the project, installations that utilize the mechatronic personality architecture follow a pattern of “/xyz/n/v” where:
- x is the personality number
- y is the board type (1: Brigid, 2: Homados, 3: Hermes, 4: Theia)
- z is the board number of its type within its parent personality
- n is the note number (0-63)
- v is the velocity (0-1023)
Arduino shields are modular circuit boards that piggyback onto a specific Arduino model instilling the microcontroller with added functionality. Many shields were created for the Pantheon system to handle a variety of commonalities when creating mechatronic installations and performances. From driving stepper motors, actuating solenoids and reading ultrasonic rangefinders, the functionality of each board is specialized and its construction varied. All of the Pantheon shields do, however, share a grouping of common traits:
- All connectors used are Molex Mini-Fit Jr.
- These robust connectors are able to withstand current of up to 9.0A, feature fully isolated terminals with locking housings, require low engagement forces, and adopt polarized housings.
- All boards are conceived as shields for use with either an Arduino Uno or Arduino Mega microcontroller.
- For all boards the connectors are consistently wired with the tops of the housings always corresponding with a connection to ground.
- All boards have a RGB LED which is programmed to behave consistently between shields. The LED is red while booting after which it turns yellow until it responds to the server’s handshake routine. After completing the handshake the LED turns off and either remains off or can optionally flash blue each time a message is received from the server.
Brigid is the smallest of the two general purpose actuator shields and is designed for use with the Arduino Uno microcontroller. Brigid has a RGB status LED, a I2C port , six channels of control for solenoids, DC motors, LED strips or other two-lead DC actuators, and an input jack for interfacing with an external power source. Each of the actuator channels utilize a Pulse Width Modification (PWM) pin on the Arduino, instead of a simple digital pin, for added flexibility and control. The Brigid, along with its big brother Homados, includes JST jacks, along with pull-up resistors, for interfacing with the SDA and SCL pins on the Arduino; allowing for the easy attachment of I2C sensors.
The Brigid shield, as well as the larger Homados solenoid driver, employ the same circuit for each of the individual channels. The circuit is engineered for activating solenoids but can be used for other components namely DC motors, LED strips, and relay switches. The reliability of both the Homados and Brigid in installations and performances is largely due to the AOT460 N-Channel Enhancement Mode Field Effect Transistors used for each of their control channels. The AOT460s are able to safely handle loads of up to 60V at 85A giving them enough headroom to handle most DC solenoids, relays, motors, and lights. The gate of the transistor is connected to one of the Arduino Uno’s PWM pins through a 1kΩ resistor in series; limiting the current draw for each pin putting less strain on the Arduino while ensuring the transistors are not driven too hard. The transistor drain is connected to the positive end of the output jack where a 1N4004 clamp diode, with a path to PWR, protects the transistor from any possible inductive fly-back current caused by solenoids.
Homados is the larger of the two actuator shields in the Pantheon system and is fashioned for use with the Arduino Mega microcontroller. The board supports sixteen channels of actuator control, three I2C jacks, and a RGB status LED. The first fifteen channels of the Homados driver utilizes PWM while the sixteenth channel uses a standard digital pin. The Homados is intended to function as a larger version of the Brigid shield and is to be used when six channels of control are inadequate. The Homados shield implements the circuit described in section 6.5.1 above and is functionally comparable to the Brigid in all ways.
Hermes is a Arduino Uno shield designed to control stepper motors. The Hermes shield provides the Arduino with an interface to two Toshiba ULN2803APG high-voltage, high-current darlington drivers which are used to control up to four stepper motors. The ULN2803APG is a flexible chip which contains eight NPN darlington pairs with internal clamp diodes to protect against switching inductive loads. Each channel can operate at up to 50V at 125mA with a 5V, 0.5mA signal at the input. The ULN2803APG’s afford control over up to four permanent-magnet, or hybrid, unipolar stepper motors which are wired using either the 2-phase or 4-phase unipolar wiring convention. The darling pairs on the Hermes have quick turn-on and turn-off delays, at 0.1 and 0.2 microseconds respectively, allowing the attached stepper motors to be controlled at audio rate to produce sustained tones. In addition to the darlington arrays and output jacks Hermes additionally includes a single I2C channel, a RGB status LED, and two power jacks: one for the motors, and the other for the Arduino.
Theia is designed specifically for interfacing SR-04 ultrasonic rangefinders which are common sensor used in the work introduced in earlier chapters due to its cost efficiency and abundant availability. The shield features eight channels of control for the rangefinders as well as a RGB status LED. Although Theia is specifically structured for use with SR-04 rangefinders, the shield can alternatively be used for other sensors and actuators. Each of the eight 4-position Mini-Fit Jr. jacks provide power, ground, and two digital pins. The digital pins can be configured in the firmware to operate as either inputs or outputs allowing the shield to control 5V LEDs, motors, actuators, or sensors.