Shop OBEX P1 Docs P2 Docs Learn Events
Dragon Art with SX Controlled LED Detailing — Parallax Forums

Dragon Art with SX Controlled LED Detailing

ZootZoot Posts: 2,227
edited 2007-12-05 15:03 in Robotics
A wooden box approx. 9.5" x 5", decorated with woodcut type dragon art. A yellow LED illuminates the dragon's eye. Red LEDs outline flame from the dragon's mouth. Green LEDs outline the tip of the tail. An IR detector is within the loop of the dragon's upper tail. LEDs mounted on the back of the box provide a backlit "glow".

This is a holiday gift for my brother and sister-in-law, who play Dungeons & Dragons with their friends. He is videographer; she is a physicist. The PDF below is the "user's guide" we sent along with the package.

The artwork was created in Adobe Illustrator and imaged to heavy card stock. The art was mounted to the backing board, and then drilled both sides for flanged T-1 LEDs. Then the frame was added and wiring installed.

The one-off gifts we've been doing this year are a playground for me to test out all kinds of code and see what's not ideal. Like a lot of the code in this program. In any case...

The program runs full PWM or binary (on/off port bits) on the LEDs using horribly nasty code in the ISR and body. The former is nice for subtler LED effects, the latter is easier for running algorithmic patterns and for reading data tables to the LEDs.

An FSM (Finite State Machine) controls the display -- the user can aim any modulated IR source at the box and the red LEDs will show what "channel" the user is choosing. If the user chooses the green tail LEDs, the box goes to sleep (the SX does not sleep, but the display does).

The T-1 leds on the front are driven directly from individual SX pins; the four T-1 3/4 leds for the backlight are controlled by a single pin driving a 2N3904.

The video and photos don't really do it justice -- the pulsing and fading of the LEDs is at times quite subtle and interesting. The backlit glow that casts red light on the wall behind the piece is pretty nifty too. The engine also changes the speed of the patterns over time, so that things always look a bit different. Etc.

This is one of those pieces that comes out nice for the recipient, but was basically a mess from the get-go. See hot glue. See code for re-masking LED outputs because I wired them in a highly inconvenient pin order for patterns. Selah. The nice thing about embedded applications sometimes is that the result counts less than internal elegance.

I didn't realize the video I took was so dark until after I had packaged the piece. You will be able to see the LEDs clearly, but the dragon is nearly invisible. The effect in person is very striking -- the red leds look like the flames coming out of the mouth; the eye is an eye, the red glow in the back pulses, etc. See (dark) video here: www.youtube.com/watch?v=3uzonwWw9ow

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST

Post Edited (Zoot) : 12/4/2007 6:26:11 PM GMT
1147 x 725 - 465K
1200 x 752 - 581K
1200 x 771 - 477K

Comments

  • Shawn LoweShawn Lowe Posts: 635
    edited 2007-12-05 00:49
    Nice- good job, zoot!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Shawn Lowe


    Maybe I should have waited to do that......
  • ZootZoot Posts: 2,227
    edited 2007-12-05 15:03
    Thanks!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
Sign In or Register to comment.