Friday, June 28, 2013

(Onlso) Oh, Nice! (/Onslo)

I got the prototype DuckNode working in time for the meeting.  Attached accelerometer (and an LED for the RSSI pin) to an XBee, and stuck those on top of a AAA battery holder.  Using Rob Faludi's XBee API library for Processing, was able to throw together a sketch that read off the transmitted values and triggered a MIDI note event when the right motion was detected.

Stitched up a simple wrist strap, and I was able to fling my hand out and trigger a sound effect that way.

But.  Well, first off, at this point it doesn't really do anything a sharp-eyed Stage Manager and a button can't do.  Second, it is a bit too much of a lump with battery pack and all.  Might be acceptable with a LiPo, and might work better with the parts re-arranged a little, but basically is more than you want on your wrist if you can help it. 

The concept of the DuckNode is that it is complete; no messing around running wires under a costume, just strap on the sensor pack and do the scene.  Or stick it on the set as a remote sensor, or even stick it up (or put it inside a prop) as a remote button.

The idea being a general-purpose package, trading the ease of just pulling a standard part out of the kit, for the gains from optimizing for a specific need.

But it is in present form a little too large to be comfortable worn on the forearm, and a little too streamlined to be of use in other applications.  So I will probably have to make the pack a little larger, add more buttons and batteries, but run a wire for a remote sensor..even a wire down to a wrist band (or, for that matter, wires to glove contacts or a flexi-strip trigger finger sensor.)

I'm also putting my POV wand on back-burner.  When I get more time I'm going to dress up more-or-less the current one with double the LEDs, brass tubing, and some extra display modes.  But I don't think it will be in this show.

What will be in the show is the voice-controlled LED controller.  It is PWM, although you can hardly tell (I might need to massage the code some more with a lookup table).

AFTER mucking about with all that extra circuitry, THEN realizing I couldn't just port Arduino software into the chips I had on hand, I went back to the manual and finally got a grasp for how you handle the ADC (analog read) on the metal.

And.  Working within the Arduino abstraction makes for fast coding, but it is amazing what is being hidden from you sometimes.  In the AVR series -- even in the ATtinys -- the ADC already has multi-sample, adjustable gain, and the ability to operate as a comparator (aka you could feed it a balanced audio signal.) 

Plus I realized a while back the AVR has port protection diodes and resistor built in.  So, the only parts you really need are a couple of passives to build a basic low-pass filter (the ADC can run into aliasing problems on high-frequency inputs).

So I am very tempted to code up a better version of the circuit on the ATtiny85's that just arrived today.

Except what also came in the mail are my MAX485's for building a DMX512 receiver.  For which there is an Arduino library.  So perhaps I should toss the box, and put together an Arduino shield instead (containing DMX512 port, the heat-sinked TIP120, analog trim pots that allow real-time adjust of internal setpoints, and a proper kill switch.

Well, I do have to test the DMX circuit.  And see if I've got Arduino-Tiny working for ATtiny85's (with care I won't brick these, too!)  I'm not sure I'll need a voice-controlled 60v PWM in the near future, so it probably makes the most sense to finish up what I've got and put it aside.

No comments:

Post a Comment