Description



Steel Ice & Stone is a multi-media interactive installation.
Nine suspended LED panels and sensor-triggered sound create an environment for memory recall.

Wednesday, November 2, 2011

Assembling the code.

OK, so the unit has been figured out, somewhat. How to code it through a microcontroller?
Breaking down all the actions is somewhat easy, pretending your dealing with someone with an incredibly short attention span.

So, here goes, for Sensor A, the sensor that picks up a viewer and plays sound from the piece:

a) Viewer crosses Sensor A.
b) Sensor detects this and sends signal to the chip in the unit for sound playback
c) The sensor turns itself off for the duration of the playback on the chip.
d) When the chip has finished its playback, the sensor turns on again.

Easy enough, but, before this can happen, some other actions have to take place independently of what Sensor A is doing:

1. Before the viewer can cross Sensor A, it must be calibrated and smoothed: it must be set to pick up either:
     a) a break in the light caused by the shadow of the viewer
                  or
     b) movement within a specific range in front of it--for now, let's say 5 feet.

2. Before the sound can play, it must go through an amp which must be set to a specific loudness or volume, which is done at the time of calibration.

3. Before any of the above can happen, the unit must turn on an off according to a timer.

10 comments:

  1. Some things are simple. Tracking movement is easily attainable (money) or cheap (design). Neither looks like much, but gets good audience participation/engagement. Think about whether the timer is important; I am guessing it is only to make sure the last trigger doesn't get confused with the current one. The algorithm is:
    1) The viewer crosses the sensor whenever. Not "before...can...." Before the device can work...maybe. The viewer IS the trigger.
    2) The sound plays. The amp only controls volume. No mystery here. But do you want the sound to be repeatable, as a phrase? Timing is interesting, volume (amp) is a function of what you (artist) want.
    3) Timer? See above....

    ReplyDelete
  2. HI Dave:
    Thanks for your reply. I appreciate your kindness.

    Here are some clarifications:
    The unit would have two "timers": One to turn the device on and off to save battery life. I don't know whether this would work, however, for a device that is in an exhibition space, it's a wast of power for it to be on when no one is there.

    The other timer is to turn the sensor OFF while the sound byte plays, so if other viewers cross it (the sensor) it won't play.

    True, the viewer IS the trigger, ultimately. But within the unit...what triggers the sound to play?

    ReplyDelete
  3. So the way I've done this is to look at the whole system as two sections:

    1) The controlled device is what consumes most of the power.

    2) The sensor is a low-power device that just runs all the time.

    The sound chip, speakers, whatever you use for amplification (even if part of the sound chip): these suck the juice. So keep this stuff (1) off by default.

    Put the timer to control how long the sound plays on here, too. No reason to power a timer that's not doing anything.

    Now this device (1) needs only one signal: the trigger. That comes from the sensor circuit (2). It can just be a pulse that starts the timer. (Don't know how your timer works; many take either a voltage or an "edge" signal.)

    This way, when no one is around (assuming the sensor is not facing out at a busy street or harbor lights, and isn't too touchy) only the sensor is on. Everything else is off, waiting for the trigger. Very little power should be consumed.

    If the sound chip has a microcontroller part, then code could be great. But given you want to save battery, maybe just keep it simple?

    ReplyDelete
  4. Great. I have some questions:
    Is the "pulse" that starts the timer the viewer crossing the sensor?
    I was intending the two timers: One to turn the entire unit on/off, let's say, for the duration of the exhibition day--eight hours.
    The other to time against the duration of the sound byte, a number of seconds.
    The issue gets a little more complex since I want the sound unit to do two other things, too. Please see the schematic of the sound unit and let me know if it's too much to do wirelessly.

    ReplyDelete
  5. Yes. If it's optical, the viewer crosses the sensor's field of view (input), which changes the sensor's output signal in some way. A detector circuit that measures changes in the sensor's output signal then sends the trigger signal. These are very simple circuits, just a few transistors and other small, low-power components.

    You can use a shadow on the sensor to generate a pulse directly, but you'd be dependent on the light level in the gallery, aiming the sensor, etc. If that's within your control, then it can make the circuit really simple.

    Now the timers are interesting. The first is really more of a clock: on at 9, off at 5, or some such. Oddly, harder than it looks, unless you program something. Even then, time is complex: you could use a wrist watch, very low power, but the trick is getting an output signal from it. I have to think about this one.

    The schematic is high level, and shows some things connected but not really what is needed to trigger or time them. This will also impact power.

    The Arduino concept looks cool but I was struck by the power requirement. "40mA per I/O pin" means even if only the four analog pins count, the controller would use 160mA by itself. With a 9V battery capacity of about .5 AH, you could run it about 3 hours before changing batteries. Or use 3 batteries in parallel for an eight-hour day. That's not counting anything else like sound output. But the device could certainly control everything, and act as a clock if you can get a big enough battery.

    Also by "wirelessly" do you mean just on one circuit board (no problem) or using WiFi or infra-red? Those tend to take power, too.

    Gotta run. Maybe at this point also it needs be asked: what's the deadline?

    ReplyDelete
  6. The concern has always been the dry cells. I had a unit made a long time ago that worked great but the LED's ate a lot of power (a picture of it is at the left sidebar).

    I'm not sure if there are other, more powerful cells that could be tucked behind the piece.

    The wireless issue: I din't want wires climbing up to the ceiling. The pieces are free hanging from filament and additional wires not only kill the effect, but may pose safety hazards.

    I did think about using WiFi but was concerned about signal interruption; or perhaps the works could receive signals remotely from a computer hidden from view.

    Deadline? I'd like to get this thing up next summer.

    ReplyDelete
  7. OK, cool. The big parameters:
    -- Time = enough, esp. if you know it works
    -- Weight = an issue, need to minimize
    -- Cords = avoid
    -- Remote control = possible

    A few more:
    -- Sensors
    * Visible = not?
    * Attached/don't care?
    -- Speakers and sound circuit
    * Visible = not?
    * Attached/don't care?
    * Perceived sound origin = ?
    -- Control circuit/computer
    * One per photo/one for all?
    -- Terms of sale
    * Work for sale = (assume yes)
    * Individual or set only?
    * Will circuitry be sold with work?

    Because now I am thinking three things:

    1) If you sell works separately, then you need electronics per piece. Otherwise you could consolidate all of this to use only one control circuit (except it might be odd with Arduino which seems to have four inputs?).

    2) If everything electronic is powered from the track lighting and located above the work, presto! As long as the circuit detects the viewer and the sound seems to come from where you want the viewer to think it comes, could this make the problem easier?

    Lastly, how much of the electronic engineer and maker do you need to be? If you must do it yourself (because some of us must, after all), check out Bill Urmenyi @ http://www.urmenyi.co.uk/.

    He sells a great little book, "Electronics for Artists," which I only bought long after learning many painful lessons myself. I developed a very sensitive, resilient, analog optical sensor circuit I use(d) in my work (took 2 years). But Bill's is possibly more foolproof.

    He says he also makes circuits, but I never inquired about that.

    Still, if you can locate everything above the fray (ceiling mounted and/or and plugged in), you can use AC and just develop the Arduino unit! (And learn its programming language, and troubleshoot it, blah, blah...but there's still enough time.)

    ReplyDelete
  8. Hi Dave:
    I appreciate your time. Please see replies below:

    OK, cool. The big parameters:
    -- Time = enough, esp. if you know it works

    >>>>>When I did something like this before, it went very slowly until the project broke open and finished itself. The time consuming aspect are the final finishing touches, adapting the units to the images.

    -- Weight = an issue, need to minimize

    >>>>>How much weight are we talking? Wires and fasteners exist that can hold hundreds of pounds.

    -- Cords = avoid

    >>>>>Yes, at all costs.

    -- Remote control = possible

    >>>>>Don't know how this works. I had considered using sensors from a ceiling camera (like a department store security cam that has twelve screens) but couldn't figure out how viewers would break a differential and set off the sound.

    A few more:
    -- Sensors
    * Visible = not?

    >>>>>Sensors should not be obvious, even if they are visible. See the photo on the right side bar. That sensor came through a hole I drilled in the frame.
    SInce these pieces are much bigger, hang freely and don't have frames, I was anticipating the sensor coming through a hole in the fabric on which the photograph is mounted to the front and bottom/sides of the piece, held in place by a small metal bracket.

    * Attached/don't care?

    >>>>>Don't know what this means.

    -- Speakers and sound circuit
    * Visible = not?

    >>>>>Absolutely not. I found honeycomb speakers that are 11 x 14 inches (and they cam=n be bigger) by 1/4 in deep that deliver sound and fit behind the piece. The sound circuit must be no thicker than 1.5 inches to fit behind the piece. See other photographs to the left since I did this in the past.

    * Attached/don't care?
    * Perceived sound origin = ?

    >>>>>Both questions above answered here: Two sounds and three signals come from each piece.
    Sensor A, when tripped starts playback on the piece where it resides.
    Sensor B, when tripped sends a signal for playback on another piece nearby
    Sensor C receives a signal from another piece when tripped by another viewer and starts playback on the first piece.
    When the room has multiple viewers, the sound is multi-directional since sound comes from different parts of the exhibition space.
    -- Control circuit/computer

    * One per photo/one for all?

    >>>>>Yes, one per photo.

    -- Terms of sale
    * Work for sale = (assume yes)

    >>>>>Yes.

    * Individual or set only?

    >>>>>Individual pieces or a specific group of three. Can't mix-n-match. This piece is not editioned.


    * Will circuitry be sold with work?

    >>>>>Yes. For a single=piece sale, the remote sensor is set up for multi-directional sound. In this case, unit needs to be adapted for power. Hadn't thought about this one. I'll look into it.

    I'll answer what you wrote below after thinking about it a bit more.

    ReplyDelete
  9. I think I understand now.

    Weight comment was based on "hang with transparent filament." I assumed you wanted to avoid weight and possible stretching. I wasn't thinking of

    "Two sounds and three signals" is important. Now I see some triggers are local and others remote, that the photos will appear to communicate or interact in some way.

    Didn't mean to be annoying, just trying to understand the problem scope.

    BTW fine to go to email for speed, convenience, etc. mailto:gongmaster@wikigong.com

    ReplyDelete

Thanks for your feedback.