Hey all!
I'm just getting started with this Arduino stuff, and I'm doing so by getting myself involved in a somewhat complex project. To pull that trough, I think I'll need a bit of sound advice.
Just a little bit of background on this project, to give you some context: as a student of Architectural Lighting Design (BA) at the Buskerud University College in Drammen, Norway, I'm lucky enough to get the opportunity to work on some pretty interesting lighting projects. The most recent one is for a newly started light festival in Slemmestad, Norway, were a fellow student and I are to create an interactive light installation which is to be placed in a public space.
The site of the installation is in a wooded, sloped area where there is a flight of stairs -- during the festival, there will be a fair amount of traffic there, as it connects different parts of the festival area. I'll try and get up some pictures to illustrate what kind of place this is.
Anyways, for this area we have developed a (still somewhat loosely defined) concept that is about underlining the contrast between the dense vegetation in our site and the surrounding industrial architecture. To do that, we'll be creating one static installation that will use fiber optics to emphasise the geometric shapes of the industrial stuff, and one dynamic installation in the foliage that should convey a more living, breathing and organic impression.
And now I'm starting to get to the point here: it is this latter part of the installation that I figured could be Arduino-powered. The idea is that there will be one or more volumes of voxels (volumetric pixels), in the form of RGB LEDs in small (ø=~5cm) diffuser domes placed on ground-mounted stems, and that these volumes of voxels should react by changing colour and luminance when people pass by them, as to be somewhat reminescent of a swarm of fireflies moving through the vegetation (or something like that ...).
The exact size of the volume and density of the voxels is something we'll have to get back to; I don't know enough about the actual dimensions of the area yet, but there is a site inspection scheduled for the 1st of July -- I'll get back with details when that's done. But until then, there are quite a few things I'm wondering about. It should be noted that I'm quite new to Arduino -- I got an Uno R3 SMD and some other stuff just a few days ago. I have a little bit of previous experience with electronics, but just very simple stuff. I haven't done much programming either, and certainly not in languages that are very similar to Arduinop/Wiring/Processing -- just some HTML and CSS, plus a tiny bit if PHP that I just barely understood. So, in short, I might need some teaspoon explanations of certain things here.
What I have done so far is to hook up a strand of 20 WS2801 controlled RGB LEDs to the Arduino and play around with FastSPI (and Glediator, which was loads of fun, but I'll leave it out of this). I have made a sketch that consists of two green blobs of light that can move along a dim, blue background, controlled by two pots on a breadboard. Basically, what the finished installation will be is just that, but controlled by motion sensors instead of pots, and with 200+ instead of 20 LEDs, in 3 rather than 1 dimension.
To give an idea of where this is going, the sketch is in the next post. Couldn't put it in this one due to post length limitations. As I'm a bit of a noob, some of this might look a bit sketchy (hehe), so feel free to point out what could be improved. It's based on "FastSPI LED Effects" from Funkboxing. (FastSPI LED Effects [UPDATED TO WORK WITH FastSPI_2] » funkboxing)
[code in next post]
So, to get this to be controlled by people strolling in the stairs, I figured the following:
As people are restrained to one-dimensional movement, either up or down the stairs, the motion tracking mechanism that will make the green blobs follow them should in theory be relatively simple. What I was thinking was to use an array of PIR sensors with a relatively narrow field of view, placed along the stairs -- say, for instance, two per metre. They'll report whether or not they see people to the Arduio, where a nifty sketch will map the locations of people to positions along a strand of WS2801 controlled voxels.
- Is that feasible at all? If not, what's the better way to do it?
- I'd be very interested in suggestions for suitable, narrow-FOV digital PIR sensos, preferrably with IP>65 enclosures. (DIY-ing very possible if neccessary; budget not extremely tight, but not infinite either)
- There'd be very many sensors; is it a good idea to use shift registers, such as 74HC595N, to get enough inputs?
Assuming that this or some other solution works, the next issue is programming the motion. What I have in the sketch above does not look quite organic enough to me; the movement of the light blobs is of course very stiff. If I turn a pot from 0 to 1023, the blob jumps straight from LED 0 to 19. How could one go about slowing its movement down, so that it'd use a second or two to get all the way from one end to another? Also, perhaps there is a way to make it accelerate, then decelerate before stopping, perhaps even with a bit of elasticity when stopping? Anything to make it look more like an organism, less like a machine.
The next thing is this thing about voxels. The idea is that the volume should have a depth of, say, 5 rows of voxels, and a similar height (length TBD). I take it that each WS2801 controlled LED requires a bit of RAM from the Arduino, and that about 200 is max for an Uno. Either I could use a Mega instead, and figure out how to arrange them in a 3D matrix -- or, far more conveniently, I could send the exact same commands to the 5*5 strands, hoping that physically ofsetting them will make it look natural (I believe that's very feasible). The voxels won't be placed in a strict grid, but scattered a bit more randomly, so in theory, having all the strands get the same instructons should look good enough. I could acquire some more LEDs to test that at a small scale. Assuming that it works, what should I do to get several strands to take the same input?
Before I stop, there's one more thing I'm wondering about: cabling for the WS2801s. I take it that they use some kind of SPI/I2C, which I'm not familiar with at all. I read a highly inconclusive discussion in an A/V forum about cabling for this kind of signals, and it seemed that twisted pairs (with SDA/GND and SCL/GND) would be the way to go. Could I just use CAT5 for this? Could I to VCC/VCC on one pair and assume that there won't be too much voltage drop? (I presume I'd have to feed more power to every 20 LEDs or so on each strand anway).
--
Phew. That was a lot of questions. I'm not demanding full answers to everything just yet, but some pointers in the right diraction and some comments on whether this is even remotely close to making any sense whatsoever would be very appreciated. There are more specifics I'll get back to later, but that'll have to wait.
Thanks in advance for any clarifications!