Video

Get the Flash Player to see this player.

I just finished a video illustrating Lumens in action shot with my new Xacti 1010. Hope you enjoy it.

Reset

Often, it isn’t until after you build something that you realize all the ways in which it could have been made better. After a few days of living with Lumens we’ve decided to go back and make improvements where we can. This installation is going to be up for 4 months and none of us want it to become a full time job maintaining things. One of the things that became obvious to us durring the build process, but we just didn’t have time to deal with it then, was the need for reset switches on the outside of the box. The boxes were built to house all the electronics safely, but with the circuit board mounted inside it’s hard to access and difficult to reprogram if you can’t easily reset it. While we were building, and even up to about 30 minutes before the opening, we were constantly updating the program on all the boxes on a regular basis.

Another thing we’ve seen is that from time to time the microcontrollers seem to lock up. They stop responding to input from the proximity sensor and ignore serial commands coming from the computer. A simple reset gets them going on their way again. Each circuit board has a small reset mounted directly on it. If in the process of resetting, you bump something else on the board, you’re just making more work for yourself. Most things are soldered in, but a few things, like the fan and the proximity sensor, are socket mounted. When these things get knocked off, it’s a really big pain to get them back in place. So, an external reset switch is the answer.

A Finished Circuit Board

Now that the dust has settled a bit I wanted to post a couple pictures of a finished Lumens Circuit Board. Above you will find a photo of the front. Note that the TIP120s are covered with heatsinks. Larry helped me work through many of the heat problems as we designed these boards. He informed me that driving six light bulbs from a single circuit board was going to generate a not insignificant amount of heat, and that I should think about that from the start. I looked high and low for the perfect heatsinks and these from All Spectrum Electronics were my favorites. In addition to the heatsinks each board also has an 18 gauge ground wire soldered down the length of it, as seen below.

The trace material on these circuit boards was not designed to handle much heat, and if unaccounted for, this heat could cause the trace to melt right off. We actually witnessed this on a board we forgot to solder the wire onto. The heavy gauge wire takes the strain off the trace material.

We built 36 of these boards by hand, assembly line style, and amazingly most of them worked without problem. Cold solders and mis-placed wires were the most common problems.

We used break away headers for the USB adapter, IR proximity sensor, and fan, to keep these parts socket mounted, and removable. The USB adapter was one of the more expensive components so I wanted to be able to reuse them down the road.

The Opening

Lumens opened tonight at Greylock Arts in Adams, at the MCLA Gallery 51 Annex in North Adams, and on Turbulence.org. The above photo is courtesy of Ryan Hutton, The North Adams Transcript. Ryan even shot a great video of the opening and put it on YouTube. Thanks Ryan!

The opening was a huge success, everything worked! But it was looking pretty bad right up until we opened the doors. Five minutes before both galleries went down because I stupidly chose to reset something. Lesson learned, don’t make any major changes five minutes before showtime. The people of Adams where lined up outside the door, waiting to see the lamps light up, and nothing was working. I was sick to my stomach.

Days before the opening I had setup Apple Remote Desktop in both spaces so I could troubleshoot and fix bugs no matter where I might be. ARD is great, it’s a fantastic way to be in two places at once. But then I needed to reset the DSL modem in the North Adams space and ARD stopped working. Things were so frantic in the days leading up to the opening that I never had a chance to fix it. All I needed to do was get the port forwarding working correctly, and I just never had the time.

And there I was, five minutes before the opening, in desperate need to be in two places at once. So I got in the car and drove the 5 miles back and forth between both spaces all night long, troubleshooting, and keeping things happy. I broke my PowerBook’s (Yes, I said PowerBook, antique, I know.) power port in the process, only making things worse. Now my laptop wouldn’t charge, and it was loosing charge fast. And because I had been using ARD I didn’t think to keep spare displays, keyboards, and mice in both spaces in case of emergency, should I need to administer a computer the old fashioned way. Another lesson learned, every computer needs a mouse, keyboard, and display, even if you plan to administer it remotely.

It’s truly amazing that Lumens worked at all, given that we never had a chance to fully test it. The only time all three spaces were online simultaneously was in that moment, five minutes before the opening, when everything stopped working. But when it came back up, it worked all night, without a hitch. Enjoy photos of the opening below.

Fellow Lumens artist Ven Voisey explains Lumens to the B-HIP interns.

The MCLA Gallery 51 Annex was packed in North Adams.

People standing outside the MCLA Gallery 51 Annex in North Adams.

Many artists contributed lamps. Marianne R. Petit’s lamp was made from a back brace she had to wear as a child.

North Adams Transcript reporter Ryan Hutton navigates the lamps at Greylock Arts in Adams.

Lumens project manager Marianne R. Petit speaks with the B-HIP interns about the many challenges involved in building Lumens.

A B-HIP intern browses the lamps in Lumens on Turbulence from the MCLA shuttle bus. Thanks to Wireless Zone of North Adams for providing wireless access to our laptops.

Visitors browse the lamps at Greylock Arts in Adams.

Oh Yeah, The Website…

There have been so many things to do that it’s not totally surprising that one thing should fall through the cracks until the very end. Marianne has been plugging away at all the lamp images, getting them clipped out and cleaned up, so they can be inserted into the database. And Abbi has been typing up all the stories and inserting them into the database.

These days I don’t build a website without a content management system. My CMS of choice is Textpattern. It’s great for simple blogging as well as complex websites. I find myself fighting an awful lot with WordPress, or almost any other CMS I’ve used, to accomplish anything custom. Textpattern doesn’t get in my way, ever, and for that I thank it. I haven’t messed with Expression Engine yet, I hear good things about it, maybe one of these days I’ll have the time.

I’ve written an extension for Textpattern that allows it to play nicely with Flash sites. One of these day’s I’ll get around to releasing it to the public. This extension with Textpattern provides the foundation for the Lumens site. Flash consumes the XML output from Textpattern to generate the website. I was counting on it all coming together just in time, and it has. And so here it is, 1:30 pm, the day of our opening, and we’ve just finished the Lumens website.

The web site provides yet another way to experience this installation. It is a way for people who visit the galleries to learn about the lamps they’ve seen. It also provides a way for people who can’t visit the galleries to see and read about the lamps. And in doing so actually illuminate the lamps for a moment in the physical space. Their presence then becomes known to the people currently in the galleries in Adams and North adams.

The Ripple

The working title for this project has always been Ripple, and the vision that we all have had for this, has always been that the lamps should respond to people as they move through the space, as if they were wading in a pool of water. We didn’t want the light to look stiff or programmatic at all. Achieving this kind of effect has always required that we get a certain density of lamps in each space. I also assumed that it would require a lot of fussing with dimmer code in Arduino, but now that we’ve assigned lamps to every cluster and we can finally see the effect of lamps fading on and off through the space, I can honestly say that this water-like effect has more to do with the somewhat random placement of lamps around the room than with any subroutine.

The biggest problem that we are having is that the proximity sensors are getting false readings as lamps within their field of vision turn on and off. The entire room begins to oscillate in this increasingly chaotic fashion. It’s really hard to get any kind of meaning out of ones actions within the space. None of us are very happy with the effect because it just seems totally random.

Just a few hours before the opening I discovered that the above was the cause of our problems because I had mis-set the threshold variable for the sensor on the Arduino. This variable defines the point at which the microcontroller should turn the bulbs on. The sensor is constantly sending a voltage to the Arduino’s input pin. This voltage is always fluctuating up and down slightly as the sensor takes in it’s surroundings. We have been using Sharp Infra-Red Proximity Sensors, specifically the 2Y0A02, which has a range of up to 150 cm, 60 inches, or 5 feet, depending on which unit of measure you prefer. When the sensor is tripped by someone walking past or up to it the voltage goes up and the Arduino can detect this. These sensors can also indicate the distance of a subject from the sensor through voltage fluctuation.

We considered using several other types of sensors including ultrasonic range finders, force sensing resistors, and even video tracking, but ultimately went with the IR proximity sensors. To make working with these IR sensors easy you’ll want to pick up some of these cables as well.

Otherwise the dimming code is quite simple (Note the following code does not use sockets to communicate from one space to another. It has been simplified to only show dimming.):


// i've defined my sensor pin as a constant.
#define sensorPin 0

// the threshold var. consider this a starting point. every sensor is different.
int threshold = 250;
// the voltage on the input pin is stored in this variable.
int sensorValue = 0;
// used for dimming.
int lumenValue = 0;

// this is called on startup
void setup() {

    // the atmega168 has 6 input pins numbered 0 - 5. i chose 0 for my input pin. see the sensorPin constant defined at top.
    pinMode(sensorPin, INPUT);
    // the atmega168 has 6 pwm output pins numbered 3, 5, 6, 9, 10, and 11. we're going to use all of them.
    pinMode(3, OUTPUT);
    pinMode(5, OUTPUT);
    pinMode(6, OUTPUT);
    pinMode(9, OUTPUT);
    pinMode(10, OUTPUT);
    pinMode(11, OUTPUT);
}

// this is called repeatedly as long as the microcontroller is on.
void loop() {
    // analogRead is a built in method that reads a given pin.
    sensorValue = analogRead(sensorPin);
    // if the sensor value is above or equel to the threshold.
    if (sensorValue >= threshold) {
        // turn on all the lamps.
        // analogWrite is a built in method that writes a pwm wave to the given pin.
        // paramter 1 is the pin number. parameter 2 is the voltage value (between 0 and 255).
        analogWrite(3, 255);
        // so that all 6 lights come on in sequence instead of all at once use the built in delay method.
        // the parameter is given in milliseconds.
        delay(100);
        analogWrite(5, 255);
        delay(100);
        analogWrite(6, 255);
        delay(100);
        analogWrite(9, 255);
        delay(100);
        analogWrite(10, 255);
        delay(100);

        analogWrite(11, 255);
        delay(100);
        // set lumenValue to 0 every time the lights are turned on to full.
        lumenValue = 0;
    } else {
        // if lumenValue is below 255 (the max value for analogWrite).
        if (lumenValue<256) {
            // subtract lumenValue (ever incrementing, see below) from 255.
            analogWrite(3, 255-lumenValue);
            analogWrite(5, 255-lumenValue);
            analogWrite(6, 255-lumenValue);
            analogWrite(9, 255-lumenValue);
            analogWrite(10, 255-lumenValue);
            analogWrite(11, 255-lumenValue);
            // this delay makes the fade nice and sexy. not to short, not too long.
            delay(5);
            // increment lumenValue.
            lumenValue++;
        }
    }
}

Marianne Has Been Working Her Ass Off

There’s no other way to put it. Marianne has been doing most of the really un-sexy grunt work. That work includes; stripping wires, Photoshopping all the lamp images, sorting out the lamp database, getting press materials ready, and working hard to keep all of us on track. Below is a before and after of one of the lamps pre and post Photoshop to give you an idea of the work she’s been doing. There are 160 something lamps that have to be cleaned up, each one has an on and an off state, you do the math.

Not to mention she prepared all these duplexes.

There is no way to properly thank her for all her hard work.

Larry Alice Rocks The House

The simple truth is there wouldn’t be a Lumens without the help of Larry Alice. Above, Larry is helping me debug a Lumens circuit board. He has given me advice every step of the way, and lately he has been giving up entire days of his time to come and help us debug stuff. Larry is a local artist with an electronics and programming background. Without his help and guidance I’m convinced that none of this would be working. And I’d probably be curled up in a corner crying right now.

Too Much To Do

Five days away from our opening and there is an overwhelming amount of work that still needs to be done. Pictured above is the inside of a Lumens box. We’re trying to build 36 of these. At the left is a Pyramid 12 volt 14 amp regulated power supply purchased from Etronics. This provides the juice needed to power the light bulbs. At the back is MASSCOOL 80mm computer fan purchased from Newegg. Front and center are the power outlets, just like in the walls of your home except we’re only putting 12 volts through them, purchased from the local Home Depot for 49¢ each. The lamps plug directly into the under-side of the box. And on the right is a finished circuit board complete with a USB adapter from Sparkfun, an Atmega168 microcontroller, six Darlington TIP120 transistors from DigiKey with heat sinks from All Spectrum Electronics, and a mess of wires mostly from Radio Shack. Below is an assortment of build photos.

The most important tool, a soldering iron.

Ven, Sean, Abbi, Marianne, and Myself working another long night.

Ven and Sean building and programming boards.

Each box has individual control of six lamps. That’s 3 electrical duplexes per box.

Each box gets a fan to help keep the electronics cool.

A pile of Lumens boxes waiting to be assembled.

Thank God For John Schimmel

Our friend John Schimmel came up this weekend on a rescue mission. We have been falling farther and farther behind on our schedule, and with the opening looming John was generous enough to offer his time, expertise, and sense of humor to us this weekend. John is a resident researcher at NYU’s Interactive Telecommunications Program.

John’s work has been an inspiration to Lumens. One of his projects, Fireflies, are networked nightlights that consist of LEDs “caught” in mason jars like real fireflies. Tapping on the lid allows you to send messages to others. Fireflies were part of the LEDs Are Pretty exhibit at Greylock Arts last fall.

He made numerous suggestions and improvements to the Lumens code, and also pointed out that we were using the wrong proximity sensors. The ones we had ordered had a range much shorter than what we needed. That explains why things weren’t working as well as we had hoped. Thanks John!

The Lamps

The stars of this installation are the lamps, the stories that accompany them, and the people of Adams and North Adams who have generously donated them. Above is lamp cluster “A” in North Adams. We have been using this cluster as our test setup. Each cluster consists of a controller box (with all it’s associated circuitry) and six lamps. Each space will have up to 16 clusters.

We have a lot of lamps so far, but we’re still short of the 180 or so we’d like to have. We used DownStreetArt to put out a last appeal for more lamps, and they have been coming in two, four, sometimes ten a day. Marianne, Abbi, and Sean have been working tirelessly to collect, catalog, and photograph every single lamp.

Above, Sean is photographing one of our favorite lamps. It comes from Tim Alibozek of Victory Lighting, a business on Summer Street in Adams, just a few doors down from Greylock Arts.

We’ve gotten several lamps created by local artist made specifically for Lumens. We’ve had loaned to us antique lamps, special lamps, cheap lamps, and trash picked lamps.

DownStreetArt

It’s important to note that Lumens is part of an effort called DownStreetArt spearheaded by Jonathan Secor of MCLA Gallery 51 to bring visitors to Main Street in North Adams. Jonathan has been working very hard to open four new galleries on Main Street this summer, and to promote the downtown area to tourists attending MASSMoCA. Three of the new galleries opened today. Lumens will open a bit later on July 10th. In addition to Lumens, DownStreetArt features Maya III by Jarvis Rockwell, The North Adams Artists coOp Gallery, and Primary Secondary Volumes 1 and 2. Gallery 51 also opened an exhibition of artist Rich Remsberg’s work tonight titled Terms of Surrender.

Main Street in North Adams during the DownStreetArt Opening.

Jarvis Rockwell’s Maya III, a giant toy pyramid.

The North Adams Artists coOp Gallery features the work of over 16 local artists.

Jonathan Secor, Mark Mulherin, and Ana Maria Secor stand in front of Mark Mulherin’s The Grandfather Paradox on Main Street in North Adams.

Previewing Lumens

Today we previewed Lumens at both the North Adams Food Festival and The Summer Street Fair in Adams. Unfortunately it rained on the Food Fest, but the sun came out just in time for the Summer Street Fair, and it was a beautiful night. I’ve never seen Summer Street look so alive.

It was the first street fair in almost 30 years, and the people of Adams really came out to support it. We were so happy to be a part of it.

Pictured above is Greylock Arts amazing intern Abbi Hermosa demonstrating Lumens to the Sisters of St. Stan’s. Below is a photo of Ven asking two of our neighbors for a lamp donation.

We’re less than a month away from our opening and we need all the lamps we can get. The street fair provided us with a great opportunity to spread the word about Lumens.

Thanks to all the members of the Summer Street Association of Merchants for all their hard work in getting this year’s fair off the ground.

Starting To Build

It’s been a long time coming, but this weekend, we started building out Lumens. We setup an assembly line and just started cranking out circuit boards. We’ve tested one of them, and it seems to work. I hope the rest do. We plan to build out 36 boards total, 16 for each space, with 4 spares. Parts have been coming in from every direction. Our primary suppliers have been Digi-Key, SparkFun, Trossen Robotics, and of course the local Radio Shack.

Arduino Workshop

As part of Networked Realities: (Re)Connecting The Adamses we had Tom Igoe come up and teach an Arduino workshop at Greylock Arts today. The workshop was free and open to anyone. It was largely attended by local artists curious about how to use electronics and incorporate interactivity in their own works.

Thanks Tom!

Abbi

B-HIP intern Abbi Hermosa started work today at Greylock Arts. Abbi comes to us just in time as we are about a month away from opening Lumens. We’re going to need all the hands we can get. We’ve asked Abbi to blog about her experience in the Berkshires this summer. You can follow her blog here.

Prototype

I was able to get a prototype working today! I used this PComp tutorial as a starting point and built out from there. Just be sure you use 1k ohm resistors as indicated in the circuit diagram, not the 10k ohm resisters mentioned at the top of the page. Nothing terrible will come of it, but you won’t be able to take advantage of the full range of dimming.

Basically, I’m using the 6 PWM pins on the Arduino Diecimila board to dim lamps attached using standard electrical duplex sockets to a breadboard where I have TIP120 transistors. The TIP120s allow me to control the lamps, which require a higher voltage and current than the microcontroller. Here is a datasheet for the Atmega168 used on the Diecimila. The LEDs are just indicators.

I’m using 12V 15 watt light bulbs purchased from Service Lighting, but I’ve seen similar bulbs at the local Home Depot for more money. These bulbs are socket compatible with standard 120V bulbs making it really simple, plug and play. You just have to be careful not to plug them into the wall. They’ll fry instantly at the higher voltage.

The lamps are drawing power from a Radio Shack 13.8VDC 15-Amp. This bad boy is expensive, so I will look for a cheaper solution because we’re going to need 30+ power supplies total. But you can’t beat the convenience of your local Radio Shack. The Arduino is drawing 5V from a separate wall adapter, but in the final design it will draw power from USB. And remember, everything needs to share a common ground or it just won’t work.

Above, a wide shot of the prototype doing it’s thing.

Circuit Diagram

Above is a circuit diagram for what I hope to build. Its basically just this PComp tutorial modified to use all six PWM pins on the Arduino board. Quite honestly I don’t know what I’m doing here. So use this at your own risk.

Whats In A Name?

Ven has been calling this project Ripple since the beginning, but none of us were sold on any particular name. There has been a lot of back and forth between the artists and the gallery administrators. We had finally narrowed it down to Ripple, Lumens, or Lamplighters, but making a final decision was for whatever reason impossible. None of us could agree on anything. We started asking other people what they thought the name should be, and we got an interesting email response from Jessica Conzo at MCLA Gallery 51:

not that I am really involved-  but since you guys have cc’d me… the
lamplighter was an infamous strip club near where I grew up and I just
can’t help but think of anything else.  it is also the name of a good
number of pubs, so I think it will conjure up something for most people.
probably not the images you want.
lumens makes me think of the mysterious creatures that live in the depths
of the ocean. plus lumens / luminescence are really beautiful, fun
words…

Jessica Conzo
MCLA, Program Coordinator
Berkshire Cultural Resource Center

That pretty much settles it. Lumens it is!

AC/DC

We’ve put off some of the electronic challenges for too long now. Some decisions have to be made. I’ll be the first to admit that I know next to nothing about electricity. So, take everything I say with a grain of salt. And certainly don’t get yourself killed following my blog. I started by reading as much as I could about light bulbs and in particular dimming light bulbs here, here, here, and here. I found this cool project by SeBsZ that was inspirational, but because it was designed for 230V AC @ 50hz, it wasn’t as useful to me as it might be to someone in Europe. The U.S. uses 110V AC @ 60hz. For a breakdown of who uses what and why read this.

Electricity comes into our homes as Alternating Current or AC at 110V or higher, and household light bulbs are typically designed to operate from this high voltage. AC power distribution was pioneered by Nikola Tesla and pushed into the mainstream by George Westinghouse. This method was rapidly adopted worldwide because it was superior to Thomas Edison’s DC distribution methods. However, the Arduino, and most personal electronic devices for that matter, use Direct Current or DC at a much lower voltage, often between 3V and 20V.

AC and DC are generally not interchangeable, one exception being light bulbs. Light bulbs only care about the voltage they are being given, not the type of current. This got me thinking. 12V light bulbs are easy to come by at hardware stores and online, here, for instance. They are typically used in automotive and boating applications where the power is coming from a battery. If I’m understanding all this correctly, an Arduino could potentially control and dim low voltage light bulbs directly from it’s PWM pins. This might be just the ticket for us. I’m going to get my hands on some low voltage bulbs and do some testing.

XMLSocket Hell

I’ve been showing a prototype of the Flash front-end to a few friends today to gauge their reactions and test for problems. It’s working for about 50% of the people I send it to. But for the other half it’s not working at all. The Flash is failing to connect to the PHP socket server on port 1024, or any port over 1023, despite the fact that the XMLSocket object in ActionScript requires you to use a port greater than 1023.

I’ve found that Windows built in firewall is often the culprit. What I asked one friend to disable his firewall it began working. However, asking every user to turn off their firewall for me was not going to be a viable solution. After a lot of digging around on Google and a couple false starts I finally found a relatively simple solution here. What DjZoNe explains is how to get PHP to allow ActionScript to communicate on ports below 1023 by having your PHP socket server supply Flash with a custom cross-domain policy file. The policy file looks something like:

Once I implemented something like this Flash had no problems connecting to my PHP socket server. See DjZoNe Blogol for complete details.

Connect The Dots… La La La La

At the heart of all this is a need to communicate between several different platforms. Some of these platforms, Flash/ActionScript for instance, can communicate just fine, on it’s own, with a PHP script running on a web server. A microcontroller running locally however, and connected to a computer via USB, needs a little helping hand, or proxy. This is because the microcontroller is communicating serially and the web server is listening over a socket. Something needs to bridge this gap. I chose REALBasic for this because it’s an environment that I’m fairly comfortable with. I know a lot of “real” programmers look down their noses at REALBasic, but I think it can’t be beaten for quick and easy, down and dirty desktop application development. Here’s a great link with a lot of useful information about sockets in REALBasic.

Below are some of the highlights from my REALBasic serial to socket proxy application for the two or three people who may be interested:

// the window1 built in Open method
Sub Open()
// setup some variables
dim x as integer
dim serialCount as integer
dim lumenPorts() as serial
dim result as variant
// lumenSocket is my custom socket class
// it is a sub-class of the built in TCPSocket class
// the socket handles communication between the local server and the remote server
lumenSocket.Address = "yourdomain.com"
lumenSocket.Port = 1024
lumenSocket.Connect()
// get the number of available serial ports
serialCount = system.serialportcount
// if there are serial ports available
if serialCount > 0 then
	// count through available serial ports
	for x = 0 to SerialPortCount - 1
		// match only serial ports within a certain name range
		// all of the usb adapters i got start with A4 or A1
		if (system.serialport(x).Name.InStr(0, "A4") > 0 or system.serialport(x).Name.InStr(0, "A1") > 0) then
			// lumenSerial is my custom serial class
			// it is a sub-class of the built in Serial class
			// communication between the local lamps and the local server happen over serial
			lumenPorts.append new lumenSerial
			// set all the properties
			lumenPorts(ubound(lumenPorts)).Baud = 8
        	lumenPorts(ubound(lumenPorts)).Bits = 3
        	lumenPorts(ubound(lumenPorts)).Parity = 0
			lumenPorts(ubound(lumenPorts)).Stop = 0
			lumenPorts(ubound(lumenPorts)).SerialPort = system.serialport(x)
			// try to open the port
			result = lumenPorts(ubound(lumenPorts)).Open
		end
	next
	dim portCount as Variant
    portCount = ubound(lumenPorts)
	// alert if serial ports are missing
	// i'm looking for 14 serial ports total
	if UBound(lumenPorts) < 0 then
		MsgBox "No Serial Ports Were Found!"
    elseif UBound(lumenPorts) < 13 then
      MsgBox "Some Serial Ports Appear To Be Missing!"
    end if
end if

// the lumenSocket built in DataAvailable method
Sub DataAvailable()
	// setup some variables
	dim command as String
	dim i as integer
	// read the socket in
	command = me.ReadAll()
	// commandIsValid is a custom global method used to validate a command
	// it returns true or false
	if commandIsValid(command) = true then
		// loop through all the serial ports
		for i = 0 to ubound(lumenPorts)
			// write to each serial port what came in over the socket
			lumenPorts(i).Write(command)
		next
	end if

// the lumenSerial built in DataAvailable method
Sub DataAvailable()
	// setup some variables
	dim command as string
	dim i as integer
	// read the serial in
	command = me.readAll()
	// lumenNetwork is a global boolean variable used to tell the local app if the server is up or down
	if lumenNetwork = true then
 	   // if the network is up write the command to the socket
 	   // append a Char(0) to signify the end of a command to ActionScript's built in XMLSocket class
 	   // the PHP socket server script then verifies this command and if valid sends it to all connected clients
		lumenSocet.Write(command+Chr(0))
	else
		// if the network is down feedback on yourself
		// loop through all the serial ports
		for i = 0 to ubound(lumenPorts)
			// commandIsValid is a custom global method used to validate a command
			// it returns true or false
			if commandIsValid(command) = true then
				// the the command was valid so send it to each lumenPort
				lumenPorts(i).Write(command+Chr(0))
			else
        		// the command is not valid
        		// do nothing
      		end if
    	next
	end if

Meanwhile…

While we dink around with the Arduino we also need to start thinking about how to make things talk across the internet. I make my living primarily as an ActionScript programmer, and I’m pretty comfortable with Flash in general. I know, I know, Flash is the devil’s work, it makes everything on the web suck, etc., but it also pays the bills. While I work on making lamps talk across the internet, I’m also trying to keep a roof over my head here.

I’m starting to think about the web experience for this project. Flash/ActionScript is the obvious choice for me, not only because I’m comfortable with it, but because it’s still the best choice for asynchronously loading data on the web. If we want people to be able to look at pictures of lamps, read about lamps, and turn them on remotely, Flash/ActionScript fits that bill to a tee.

I’ve never turned lamps on over the internet before though so I start by looking around to see what other people have to say. It looks like the thing to do is use ActionScript’s XMLSocket. From Adobe, “The XMLSocket object implements client sockets that allow the computer running the Flash Player to communicate with a server computer identified by an IP address or domain name.” Sockets are ideal for things like chat applications and multi-user gaming, where data needs to be exchanged in real-time between multiple clients and the server.

Great, but I’m also going to need a socket server script running on my web server. I looked around a little more and found this fantastic tutorial on Kirupa.com about PHP 5 Sockets with Flash 8. The tutorial contains a PHP script which acts as a socket server, broadcasting anything that is sent to it back to anything that is connected to it. The script is going to need some modification to make it work for us, but I’m also comfortable with PHP so lets see how far we can go with this.

Arduino


It’s been a long time since I’ve messed with electronics, and when I did it was only for a brief time during my first semester at ITP. Back then we used the BX24, pictured below.

My PComp final project was a radio controlled car built with the BX24. I had fun with it, but that wasn’t really my focus at the time so I moved on to the things that interested me. It didn’t help that I was a pretty awful programmer at the time. I still think I am, but somehow I just keep hacking my way through problems until things finally start to work.

I kept hoping that at some point I’d find the time and patience to get back into electronics post grad-school, but it just never happened. There was always some other, usually pointless, project consuming all my time. I am going to use this project as an excuse to get back into electronics though.

Tom was generous enough to lend us some Arduino boards to play with when we saw him last. If you are looking to get started this is a great starter kit. I downloaded the software and used this as a starting point. It’s surprisingly easy to get going. Much easier than I remember the BX24 being. The first thing i did was make an LED blink, pretty simple, but exciting to see it working. There is a lot to learn and not much time. Our opening date has been set for July 10th.

My next experiment was to see if I could get a proximity sensor to control the on/off state of an LED. The following is the resulting code:

// define the pins to be used on the microcontroller
#define sensorPin 0
#define ledPin 13

// define the initial value of the sensor variable
int sensorValue = 0;
// compare the sensorValue to this variable to determine if something is in front of the sensor
int threshold = 200;

void setup() {
	// set the led pin to output
	pinMode(ledPin, OUTPUT);
	// open the serial port
	Serial.begin(9600);
}

void loop() {
	// read the sensor
	sensorValue = analogRead(sensorPin);
	// print the sensor value
	Serial.println(sensorValue, DEC);
	// set the led on or off based on the sensor
	if (sensorValue >= threshold) {
		analogWrite(ledPin, 255);
	} else {
		analogWrite(ledPin, 0);
	}
}

Time Passes

Marianne and I have been really busy with an awesome new exhibit opening at Greylock Arts of artist Todd Holubek’s work as well as a side project I’ve been working on so I haven’t had time to devote to this lately. The side project is cool, and I have to admit it’s the first advertising project that I’ve worked on in years that I actually feel excited about. It’s not anything to do with selling something people don’t need. And it doesn’t make me feel all dirty on the inside. I’ll post a link when it’s complete. Reality is setting in though as time keeps ticking by. We need to make progress.

Testing The Waters

Sean, Ven, Marianne, and I all met with Tom Igoe again this weekend, this time in NYC. Now that we know what we’re going to try and build it’s time to start experimenting with technology to see not only what’s possible, but what’s easy to build and within our budget. We began by going over the basic idea, discussing the interaction, and finally we talked through potential problems.

Basically, we plan to build two environments filled with lamps, somehow detect the presence of visitors, turn on lamps in the area of the visitor when their presence is detected, send information across the internet when a presence is detected, turn on lamps at the remote location in the same general area, and also provide a web interface for browsing lamps over the internet.

Tom is part of the team of core developers who work on Arduino, an open source hardware and software microcontroller platform. So he gave us a quick rundown of what the Arduino is capable of, showed us the programming environment which implements the Processing/Wiring language, and provided us with an intro/refresher course on electronics.

lightingPlus

We then made a trip to Lighting Plus at 676 Broadway where we purchased a few different types of bulbs to test. We got a range of incandescent bulbs in a variety of wattages, an LED bulb, and a dimmable compact fluorescent bulb.

Tom then showed us a few ways to control the bulbs. We started by looking at X10. X10 is an industry standard for communication among electronic devices. X10 devices can talk to one another by sending a series of commands over household power lines. If X10 can be made to work for us, it would certainly provide an easy (out of the box) solution to our problem. X10 dimmers work by plugging directly into a wall outlet. A lamp is then plugged into the dimmer. These dimmers can be purchased for around $13 each, so it would also be an inexpensive solution. An X10 dimmer is typically controlled with a  as seen below. But you can also control it with a microcontroller serially using an interface module, as discussed in Tom’s great book, Making Things Talk.

The biggest problem I see with using X10 is that we’d ideally like to have 100 or more lamps, and X10 can only send one command at a time and each command can take up to two seconds to be sent. This may not seem like much, but when you need to send dozens or hundreds of commands nearly simultaneously, two seconds is an eternity. Used in this way, it would be difficult if not impossible to make many lamps attached to these dimmers actually dim fluidly in the same space.

The other possible solution we looked at was a Velleman DC controlled dimmer. These dimmers are serious business. They cost about $33 each, and come in a kit which you have to assemble yourself.

The cheapest place I found them was Apogee Kits. Based on how long it took Tom to build one we estimated it would take us 45 minutes to an hour to build each module. None of us are what you would call soldering pros. Sure we’d get faster over time, but that’s a lot of time spent building dimmers. The end result though is beautiful. The Velleman’s dim fluidly and are easily controlled from an Arduino, or any other DC source.

We had a really productive meeting, but it left us with more questions than answers. I’m going to order a bunch of this stuff, and anything else that catches my eye, and start getting my feet wet.

Light It Up

After proposing several of our ideas to Helen and Jo at Turbulence we’ve decided to move forward with the one that involves turning on lights telematically from Adams to North Adams and vice versa. The idea began during a brainstorming session with Tom when he said something about rippling lights. This idea caught Ven’s attention and evolved to people sending ripples of light using street lamps to the sister town/city as people walked down Main or Park streets, the “downtown” areas of North Adams and Adams respectively.

However, once it became clear that a project like that would likely face signifigant obstacles from local government we decided to move the project indoors. Ven then came up with the idea to collect ordinary household lamps from the citizens. The lamps would be installed into Greylock Arts and MCLA Gallery 51. The lamps will illuminate as visitors to the gallery walk through the space to investigate groups of lamps. This will also cause lamps in the sister town/city to illuminate in the same general area within the other gallery. Marianne suggested that each lamp could also have it’s story told online. And I added that the action of reading a lamp story on the website could also illuminate that specific lamp in the gallery.

Bouncing Ideas

Sean, Ven and myself have been meeting pretty regularly since November to discuss what it is we should do either as a group or individually. Some of the ideas that have been discussed include: A virtual tug of war, rippling street lamps as people walk by, a networked dance floor, as well as a high school football game between North Adams and Adams where the teams would swap jerseys.

While doing some research into the dance floor idea I came across this really cool MIT student project called the 1E Disco Dance Floor. It’s a 128 square foot 1,500 LED dance floor. Be sure to check out the video. It’s totally crazy!

We haven’t really settled on anything yet. We just keep bouncing ideas off of each other. Hopefully something will stick.

A Town Divided

I went down to the North Adams Public Library today to search through the newspaper archives for articles detailing the division of North Adams from Adams. It was a lot of fun searching through the microfilm. The librarians were very helpful and even pointed me in a few useful directions. This research is being done for an upcoming project called Networked Realities: (Re)Connecting The Adamses.

Networked Realities is a collaboration of Greylock Arts, MCLA Gallery51, and Turbulence with local artists including myself. Networked Realities seeks to artistically re-connect the Town of Adams and the City of North Adams through the Internet. Adams and North Adams, once a single town in northern Berkshire County Massachusetts, where divided in 1878. The project has been made possible through the support of New Radio and Performing Arts, Inc. with funding from the Andy Warhol Foundation for the Visual Arts, the LEF Foundation, and the Massachusetts Cultural Council.

I felt it was important to get a historical perspective to better understand why the town was seperated in the first place. Adams was first settled in 1762. It was then called East Hoosac. By the time the town was renamed for Samuel Adams, the north and south ends of town had begun to develop different personalities. One could certainly make an argument that they were at best loosly connected from the start. South Adams was largely settled by Quakers who created a farming community. While North Adams became a center for industry due to it’s better access to water and transportation. The two settlements are separated by five and a half miles.

One local paper, The Hoosac Valley News, was very much opposed to the division. They supported a two thirds vote by the residents to determine the fate of Adams, and pushed for a city charter instead of division. The North Adams Transcript, another local paper which is still around, on the other hand, supported the division and was pushing for a simple majority vote.

One of the editorials from The Hoosac Valley News reads, “In this controversy reason and argument are ignored; an irritation has been fostered which too many are glad to escape from through the door of town division.” And later it reads, “It is said: ‘there never will be peace until the town is divided.’ There are two answers to this – First, shall we yield a principle to a clamour? Second, there will be peace when the opponents of division teach these agitators through a decisive act of the legislature or a vote of the people, that only defeat will crown their scheming.”

I had assumed going in that it was North Adams and it’s residents who wanted independence from “South” Adams, but it appears to have been the other way around. Isaac Collins, a shoemaker from Adams, was responsible for spearheading the separation. His tombstone reads: By his means and labor, succeeded in securing an independent township to Adams, in 1878, by setting off North Adams from Adams. The settlements of North and “South” Adams had long fought over the location of a permanent meeting house to conduct town affairs. At the time of seperation the town clerk, as well as a majority of the selectmen and other town officials were residents of the north settlement. You can see how this would irk the residents of the south settlement.

The decision to separate was made by the Massachusetts legislature on or around April 10th 1878. Best I can tell the people of Adams never had a final say in their fate.

Igoe, You goe, We all goe?

This morning we had a brainstorming session with Tom Igoe. Tom is a colleague of Marianne Petit (my partner in crime at Greylock Arts), at NYU’s Interactive Telecommunications Program. Tom is the area head for what’s called Physical Computing. PComp is basically a way of sensing the physical world through the use of sensors, and using microcontrollers, computers, and software to interpret this information, ultimately to control other aspects of the physical world through the use of lights, displays, motors, and other feedback mechanisms.

Tom is a really special guy, and we are so lucky to have him as a consultant for this project, whatever direction it takes.

The Beginning

Helen Thorington and Jo-Ann Green of Turbulence came to Marianne and I with a proposal to collaborate on a project in our new gallery, Greylock Arts. We have no idea what this might ultimately be, but we are so thrilled with the opportunity to do something big. Marianne and I have both received Turbulence commissions in the past. In fact, Marianne was one of the first artists to be commissioned by Turbulence. She produced The Grimm Tale, an interpretation of a tale by the Brothers Grimm, with John Neilson in 1996. In 2006 she and I both received a commission with Elizabeth Mikesell to produce The Saddest Thing I Own, a website repository of people’s saddest objects.

For our newest collaboration we began looking for a third partner almost immediately. MCLA Gallery 51 seemed like the perfect match for us. Marianne and I have always been impressed with the caliber of their exhibitions. Plus, they are based in North Adams, while we are in Adams, Massachusetts. The idea to re-connect the Adamses artistically came almost immediately.

We then put out a call to local artists and started building a team. Ven Voisey and Sean Riley are two artists we’ve known and come to like. Ven’s work is poetic, he has been involved with The CAC, and we always see him helping out local art projects. Sean’s work is complex and beautiful, and he has been an active member in the local arts scene for many years. The decision was made to involve myself directly as an artist because we needed someone local capable of architecting and programming whatever might come out of this collaboration. Marianne will be supervising the project.