Help me plan electronics and software for an interactive art installation
January 27, 2010 11:14 PM   Subscribe

Help me plan the electronics and software for an interactive art installation involving buttons and a webcam and a monitor.

I've agreed to help an artist friend who wants some interactivity in a project she's planning. I know my way around circuits and computers and such but I haven't built anything practical like this before. Here is what needs to happen:

- Interacting with "the room" via motion sensors and buttons, possibly controlling lights, maybe a motor
- One of those interactions turns on a video camera and starts recording
- Another such interaction plays back the recording on a screen

My plan is to get a cheap microcontroller - I found the Arduino Duemilanove in another thread and this looks like about what I need. It will be simple enough for me to wire this up to buttons and lights and such. There is a laptop available for this installation (Mac, a few years old) and I figured I could control the camera and playback with that.

The trickiest part for me might be getting the Mac to do what I want. I'm assuming it is possible to trigger computer events with a signal from the microcontroller. I'm also assuming it's possible to have a script that listens for such events and is able to control the camera and display the way I want them to. I don't know how this would work (not much of a scripter); does this sound feasible? Where would I start?

Other issues:
- The artist does not want shitty video, but my total budget is max $200, of which I guess maybe $50 could get me a webcam which I'm hoping would be sufficient. What kind of quality would this produce? Would the video be smooth or jerky?
- Is it easy or difficult to capture a stream and play it back? What would be involved in doing this? Should I plan on a delay between finishing the recording and playing it back?
- What accessories do I need for the Duemilanove? I'll probably need a wall-wart, right?
- Anyone know a source for the Arduino in Vancouver BC, or do I have to order online?

What do you think? Reasonable? Better ideas?
posted by PercussivePaul to Computers & Internet (6 answers total) 2 users marked this as a favorite
Basing your system around X10 will probably be a lot easier. Don't be confused by the spammy site, the stuff really works, though it does have a fair bit of latency. You can get cameras that are designed to be turned on and off with X10 control signals (actually the power supplies are switched), and you can get motion sensors that directly transmit X10 control signals.

I'm assuming it is possible to trigger computer events with a signal from the microcontroller.

Not as easy as it should be, but not too hard. To get a PC to respond to an outside microcontroller, the obvious choice is to use a serial port, or a virtual serial over USB chip. Then script something that can respond to serial port data (almost any language could do it, even AutoIt). I don't know exactly how you'd do that on a Mac, but it is likely to be just as easy.
posted by Chuckles at 12:03 AM on January 28, 2010

This Arduino integrates one of those rs232/USB chips.
posted by Chuckles at 12:09 AM on January 28, 2010

Re serial port, I see the Arduino has an FTDI chip on-board for the virtual serial over USB that Chuckles is talking about. The happy news for you is that FTDI virtual serial stuff is Mac friendly (many virtual serial things or rs232-to-USB adapters are not). You will need to install a driver on the laptop from the FTDI website, but no big deal.
posted by tss at 12:31 AM on January 28, 2010

Response by poster: Been poking around in Arduino websites and found the Processing language which is I think the preferred way to do the sort of communication I have in mind. It has a video library which should in theory be able to do capture and playback like I want, but it is reportedly buggy. I will keep looking around.

X10 - would prefer not to go that route. Lots of reasons for that; at the least it seems it will seriously stretch the budget.
posted by PercussivePaul at 12:40 AM on January 28, 2010

The arduino has a big community of people doing phys-comp / art things with it, which should be helpful to you: there'll be people who've solved similar problems and speak your language.

You might want to look into Firmata — it's a protocol for making it easier to get an arduino talking to software on a host machine. I've never used it though. Anyway, you could write something, possibly in Processing or MAX/MSP or PureData, that talks Firmata out one end and does video and AppleEvents out the other end (applescript).

The Duemilanove can power itself from the USB port (or from a wall wart). You'll also need something to interface between the arduino's logic-level circuitry and whatever sensors and effectors you use. Sensors might not need any interfacing, but lights and motors will need something to switch their power on and off; perhaps a relay or relay shield? ("Shield" is the arduino community's term for special-purpose daughterboards that stack on top of the arduino to do some specific interfacing task.)
posted by hattifattener at 3:34 AM on January 28, 2010

You should look at ITP's Physical Computing pages, Tom Igoe's book Making Things Talk, and check out Processing, Pure Data or some other software to get things done. (I prefer Max/MSP/Jitter for quickly building things)

I would suggest using an Arduino and, if you're comfortable with programming, OpenFrameworks. As you discovered, Processing is used for many of these types of things, but video remains iffy.

I would also suggest you shy away from Firmata, mostly as a personal bias, but also because it completely obscures the inputs and outputs on the microcontrollers end. If something happens that you don't understand, you have no means of fixing it.

As for a webcam, if you're using a Mac, I really like the Unibrain Fire-I. Just as good as the old Apple iSights, less sexy design.

Good luck.
posted by tip120 at 9:24 PM on January 28, 2010

« Older How to help others find their favourite books.   |   How to change the homepage for my Aino? Newer »
This thread is closed to new comments.