Saturday, January 24, 2015

Laser Rifles and Dying Fairies

Not, not "Wizards, The Musical" (which one day, in some other life, I would love to have a part in producing).

I took a short job in The City -- for low enough pay a third of it is going to pay BART fare -- and once again an application came up for a DuckLight. Which is currently in the form of a PCB being manufactured in China. That is, the prototype board is. I figure there's about a 50% chance the first board will actually work correctly.

Once again, I would have saved a lot of time if I could have just reached into my kit and pulled one out. But also, once again, I hadn't imagined anything like this application until it came long.

Tinkerbell. There's a spot in the musical where Tink needs to go into her little house and stay there for a while. I had already planned for one of the default animations on the DuckLight to be a flicker or shimmer, but I didn't even know why I wanted that. Now I do. Dial up a nice Tinkerbell green and the effect is half-way there.

Only half-way, because this production is children's theater. No onstage actor is going to be able to hit a switch. So it needs the next element, the next board up in my Eagle-and-fab list; the XBee backpack.

Well, I did pull a morning of very swift soldering, and set up a single-channel AVR-controlled Cree and attached an XBee to it in line-passing mode. There was some strangeness going on with lines floating or automatically resetting or something but by adding a double-click detect I finally got it reliable enough to use it over the closing performances.

Otherwise Tink is being played by a laser. Which still makes me uncomfortable, even though I opened up the beam focus until the power is much spread out. To hit his targets the follow-spot operator went and attached the laser to three-foot long stick of wood that he braces against his shoulder. Naturally I took to calling this contraption his "Laser Rifle."

Being one of the bargain bulk optical goods from the industrious young engineers in Shanghai, this particularly laser diode is not stable enough, cooled enough, or otherwise suitable for leaving on for longer than a few seconds at a time. As a stop-gap, I put an AVR-powered switch on it that randomly blinks it off for half a second or so every few seconds. That seems to help, but I'm betting I'll still be out a laser diode before the show closes.

The blinking looks quite natural and Tink-like. Particularly tonight's performance. Right after Wendy said, "Wouldn't you say so, Tinkerbell?" the light blinked several times in quick succession as if Tink was making an acerbic reply.

Here's the full circuit in better light, by the way:

The 8-pin dip is the ATtiny85 running the random blink routine. The Tip-120 switches laser power, with a blinkenlight wired in parallel as a status monitor. Another one monitors the battery connection, which is switched on and off by the momentary button. That's the nice thing about these AVR's; supply power, and it boots up softly in milliseconds and starts running the program loop.

This was all in all another informative show. I need that serial Xbee connection for reliable triggering, and this makes twice now that 3 watts of RGB was a little marginal. Unfortunately the jump to 10 watts of LED power brings in a whole new level of current regulator and thermal management complexity.

No comments:

Post a Comment