Distance Reactive Chinese Lanterns (China Balls) - Possible?

I'm interested in trying to put together a collection of interactive projects involving light.

My first idea was to build a chinese paper lantern with an arduino/LED array/distance sensor that can fade and brighten in relation to a person's distance (closer they get, brighter it gets...). The ultimate goal is to have the paper laterns covering the ceiling to provide light wherever you move.

Is this possible? If so any recommended Arduino hardware (i.e. shields) you think would fit the project? Will I be able to provide code that allows the light to fade smoothly?

I'm testing with an Arduino UNO, 5mm LEDs and looking into purchasing the Ultrasonic Module HC-SR04 Distance Sensor.

No real background in coding so I'm eager to learn or receive guidance from anyone inclined to contribute to this project idea.

Let me know what you all think.

Thanks All

We're probably going to do the lantern ceiling again at Maker Faire this year, but have been thinking about adding some more reactivity, similar to what you're discussing. Would definitely like to see what you figure out, or maybe you can use some of our ideas. Considering the range sensors you mentioned, but one per lantern would be a really expensive setup. However, that would allow some neat height-reactive stuff. The current concept is to have a single row and column of range sensors, so that we can read across the space and get an X-Y coordinate of triggered locations. Requires far fewer sensors. Another idea uses pressure or capacitive sensors in the floor, but doesn't work well with furniture etc in the space. Maybe the best solution is something like EMSL uses in their reactive coffee tables; just a simple IR bounce circuit. Cheap enough to use once per lantern.

@macegr

Is that video of your lantern ceiling? If so, it looks quite incredible (and the layout of the fixtures is very similar to what i was hoping the final product to look like). What model and how many arduinos were used to power this system?

As you can probably tell I'm very much in the natal stages of my arduino knowledge, thus the simple questions still remain in my head...

  • Can you code an Arduino to fade LEDs up and down in brightness or is it purely ON or OFF (HIGH or LOW)?
  • Can you code an Arduino to trigger specific LEDs at specific distances with a distance sensor attached?
  • Do you need 2 Arduinos to accomplish both at once?

Any contributions to the discussion are greatly appreciated.

Thanks!

Yes, you can fade the LEDs. The Uno has the following PMW pins.

PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.

http://arduino.cc/it/Tutorial/PWM

madvillainy: Yes, that was our project at Maker Faire Bay Area last year. All the construction details and code is located here: Maker Faire Bay Area 2011 | macetech.com

The ceiling contained 128 RGB pixels and was all controlled by one Arduino Uno. It received pixel data from Processing and did some conversions, then sent commands to the LED controllers we used. All the sound reactive stuff and color calculations were done on the computer in Processing.

A single Arduino would have no problem controlling several LEDs, and reading several distance sensors, and mapping distances to various brightness levels. It wouldn't easily scale up to the size of the system above, but would be totally feasibly for, say, a six-lantern system where each lantern is only one color.

@Pauly - thanks! appreciate the assistance with that, very helpful stuff

@macegr - great work overall, the hardware you sell looks perfect for my project. do the lanterns need to be connected to a computer in order for the LEDs to react or create color-changing effects? also, how would powering such a project work? I assume it wouldn't be as simple as plugging in one Arduino UNO and calling it a day...

this support is wonderful, thanks again.

For some relatively simple effects, a computer probably wouldn't be needed. The Arduino doesn't have the horsepower to calculate all the RGB gradients and stuff in realtime, or do the FFT calculations at the same time as outputting all the pixels, so that's why we needed the computer.

Power is definitely a concern, but possibly less so if you're planning a dimmer project (one that lives in a dark room instead of a bright convention hall). The modules we used run at 12V, and 128 of them together can draw about 40 amps. We used an adjustable 0-60V 0-50A lab supply. A more reasonable setup would probably use a number of smaller, single-output supplies distributed through the system.