Turning Inspirations: Radically Interactive, Participant Created Turning Art
Home - Art Installation - Workshop - Inspirations - Geeky Tech - Contact

Geeky Technical Details

A lot of software and electronics are involved to allow 32 discs respond to participants turning any of the discs and movement in front of 6 ultrasonic sonar-based motion sensors.... all the while being fully changable from any number of other participants at web browsers.

System Block Diagram

This diagrams shows all the major components in the system and how they communicate with each other. Details on each parts follow below.

Web Page

This web page, using Javascript (AJAX), provides real-time display of the discs and their configuration, and allows everything to be edited while the system is running.

Complete HTML & Javascript code, CSS, Images & other files

Art Controller

This modified Linksys router controls the whole system. It runs the OpenWRT Linux distribution, and two programs control everything.

Linksys WRTSL54GS wireless router info

The serial communication daemon program regularly queries all the motor controllers for their disc positions and the sonar sensors, using this protocol on the RS-485 network (text-only protocol spec), . It allows "clients" to request updates via UDP packets (text-only protocol spec), and it sends the updated status about 40 times per second. In theory, many "clients" could connect and each could control one or more discs. However, only the one server program has been written and it seems unlikely any other programs using the UDP protocol will ever be written.

Serial communication daemon source code

The server program implments all the behaviors of the system. It establishes UDP communication with the comm daemon, and listens for web broswers to make HTTP connections on port 80.

Each time the comm daemon provides new status, the server issues any speed changes necessary. HTTP requests that change the configutation are handled, as are request for static data (html, javascript, images, etc).

Server Program source code (named "client" for historical reasons)

RS-485 Interface

The linksys router has full duplex 3 volt TTL level serial, without handshaking. A simple circuit converts this to half duplex RS-485. The leading edge of any transmitted start bit causes the RS-485 circuit to begin transmitting (by setting a RS-latch made from two NAND gates). A microcontroller monitors the line for additional bytes, and when a silent time of 1.5 bytes has passed, the microcontroller shuts off the transmitter).

The motor controller and sonar interface have code that waits for 2 byte times between the end of a message and when their transmitter is activated, so a bus conflict does not occur. The motor controller and sonar interface disable their transmitter 1/2 way through their stop bits (wouldn't it be nice if the 233 MHz 32-bit MIPS-based linksys router could do real-time tasks as well as a 12 MHz 8-bit 8051 chip!)

RS485 Transmitter Control Source Code

Motor Controller

The motor controller allows the speed of 4 motors to be controller, and it monitors the position of each motor using a 96-step rotary encoder and an IR reflection sensor to detect the disc's home position.

Motor Controller Source Code

An interrupt routine that runs 2000 times per second makes the decision when each motor should take a half-step, and updates the position based on both sensors. Code running in the background continuously monitors the measured postion against the number of steps taken and automatically disables the motor when they diverge (assumed to be a participant touching the disc). The serial communication daemon is responsible for implementing the no-movement timeout to reactivate the motor.

The motor controller reports absolute position, but accepts only speed commands. The server program is responsible for sending speed settings at the appropriate time (relayed by the comm daemon) to acheive the desired positions.

Schematic for the controller board (green PCB portion)

Stepper Motors & Rotation Sensors


A rotation sensor is mounted to the back of each motor,
to detect when a participant is manually turning the disc,
or overpowering the motor.


Coupling the tiny back side shaft from the motor to the shaft of the rotation sensor turned out to quite difficult. This heatshrink tube slips. A second ridig coupler was designed using plastic and set screws. However, the trade off is extra drag (torque) on the motor if the shafts aren't aligned perfectly.


The TEAC motors have a shaft on both sides.


The motor, as seen in its natural habitat

Infrared Reflection Sensor (home position)


These IR reflective sensors detect a strip
on the disc. When a new disc is placed on the motor,
it's home position is automatically detected.


The discs mount to a raised plastic platform which holds the disc at the optimum height above the IR sensor.


This black stripe is drawn on the back side of the disc by the artist, to mark the bottom of the art. When the amplifier is properly calibrated, the sensor detects the difference between the brown cardboard and black ink.


A simple pullup resistor turned out to be inadaquete to reliably detect the stripe on the back
of each disc. Instead, this amplifer with adjustable light/dark current threshold was necessary.


Schematic for the IR amplifier board. Two of these are on each board, sharing the power supply and bias resistors

Ultrasonic Motion Sensor


The sensor is made by Parallax (the blue board). It receives a pulse to
send a ping, and returns a pulse when the echo is heard. The other board
measures the elapsed time (distance to person in front of the sensor), and
communicates this on the RS-485 network to the controller.

Parallax PING Ultrasonic Sensor product info

The sonar interface board listens for a command on the RS-485 network to indicate when the ping should be sent. It then gives the pulse to the Parallax sensor (via the PNP transistor connected to P1.7), and then begins listening for the response pulse that indicates the sound was reflected back. When that pulse is received via INT0, the elapsed time is stored and may be queried via the RS-485.

Ultrasonic Motion Sensor Interface Source Code


Pin P1.7 sends the "begin ping" pulse, and INT0 receives the echo response.

Power Management


The motors run on 8 volts, from this 12 to 8 volt step-down
power supply. 8 volts dramatically lowers power consumption in the
motors, and remains consistent even if the battery discharges from
12 volts to as low as 10 volts.