LED Lightbox. Created by Sam Clippinger. Last updated on :50:00 AM UTC

Similar documents
Neon LED Signs. Created by John Park. Last updated on :11:09 PM UTC

Feather Weather Lamp. Created by Ruiz Brothers. Last updated on :54:26 PM UTC

i2c/spi LCD Backpack Created by lady ada Last updated on :11:04 PM UTC

NeoPixel Ring Bangle Bracelet

NeoMatrix 8x8 Word Clock

FLORA TV-B-Gone. Created by Becky Stern. Last updated on :32:57 PM UTC

Adafruit VL53L0X Time of Flight Micro-LIDAR Distance Sensor Breakout

Bunny Ears with MakeCode

Trellis 3D Printed Enclosure

NeoPixel Manicure. Created by Sophy Wong. Last updated on :50:38 PM UTC

Solar Boost Bag. Created by Becky Stern. Last updated on :44:55 PM UTC

Crickit Powered Holiday Diorama

Infinity Mirror Valentine's Candy Box

Portable Apple Watch Charger

Mad Science Test Tube Rack

Trinket NeoPixel LED Longboard

Adafruit APDS9960 breakout

Bluetooth Controlled NeoPixel Headphones

3D Printed Camera LED Ring

Adafruit DRV2605 Haptic Controller Breakout

Adafruit Mini TFT " 160x80

Adabot Operation Game

Stumble-Bot. Created by Dano Wall. Last updated on :04:06 AM UTC

LED Eye Prosthetic. Created by Tully Jagoe. Last updated on :00:17 AM EST

FLORA Pixel Brooch. Created by Becky Stern. Last updated on :19:07 PM EST

Adafruit Capacitive Touch Sensor Breakouts

Pushrod Garage. Created by John Park. Last updated on :07:30 PM UTC

NeoPixel Fairy Crown. Created by Erin St Blaine. Last updated on :22:47 AM UTC

Glowing Smokey Skull. Created by Ruiz Brothers. Last updated on :03:40 PM UTC

Adafruit PowerBoost 500 Shield

Paper Airplane Launcher

3D Printed 20w Amplifier Box

Ping Pong Ball Launcher

Adafruit Prototyping Pi Plate. Created by Ladyada

TRON Bag. Created by Becky Stern

Reindeer Mask with Animated Eyes

CPX Mystery Dreidel. Created by Kathy Ceceri. Last updated on :51:40 PM UTC

Adafruit 8x16 LED Matrix FeatherWing

Crickit Carnival Bumper Bot

Adafruit TPL5110 Power Timer Breakout

Milk Jug Glow Skull. Created by John Park. Last updated on :28:36 PM UTC

NeoPixie Dust Bag with Circuit Playground Express

Adafruit Si7021 Temperature + Humidity Sensor

Naughty or Nice Machine

Bike Wheel POV Display

LED Eyes. Created by Ruiz Brothers. Last updated on :50:55 AM UTC

Hammer Time Mini Golf Hazard with Crickit

7 Portable Multitouch Raspberry Pi Tablet

LED Stego Flex Spike Hoodie

Snake Charmer Box. Created by Dano Wall. Last updated on :07:25 PM UTC

3D Printed 20w Amplifier Box

Coffee Detonator: The TNT Plunger Grinder

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

DIY Wireless DDR Dance Pad with Bluefruit EZ-Key

Introducing Adafruit Trellis

Mystical LED Halloween Hood

Tent Lantern. Created by Timothy Reese. Last updated on :17:25 AM UTC

Punk LED Collar. Created by Becky Stern. Last updated on :02:45 PM EST

Clockwork Goggles. Created by John Park. Last updated on :03:10 PM UTC

Celebration Spectacles

Slider Crank Mechanism -- from Cardboard and Craft Sticks

Adafruit MPRLS Ported Pressure Sensor Breakout

Adafruit Mini TFT with Joystick Featherwing

Adafruit Color Sensors

Con Badge with Circuit Playground Express

Monochrome OLED Breakouts

Alohamora Bottle. Created by Erin St Blaine. Last updated on :58:53 PM UTC

No-Sew LED Wristband. Created by Kathy Ceceri. Last updated on :23:40 PM UTC

Interior Purse Light. Created by Becky Stern. Last updated on :41:08 PM UTC

Interactive Gift Box. Created by codingpro. Last updated on :47:40 AM UTC

Adafruit Si5351 Clock Generator Breakout

Sewable NeoPixels. Created by Becky Stern. Last updated on :50:14 PM EDT

Circuit Playground Digital Input

Adafruit Pi Cobbler Kit

Wind Blowing Emoji Prop

Adafruit AMG8833 8x8 Thermal Camera Sensor

Cup o' Sound. Created by Becky Stern. Last updated on :30:06 PM EST

TSL2561 Luminosity Sensor

Learning with LEDs. Created by Rick Winscot. Last updated on :39:11 PM UTC

Remote Controlled LED Tea Light Sconce

3D Printed LED Knuckle Jewelry

Adafruit TPL5111 Reset Enable Timer Breakout

Magical Mistletoe. Created by Leslie Birch. Last updated on :45:29 PM UTC

Circuit Playground Express Laser Tag

Crickit Powered Mini Chair Swing Ride!

Adafruit 8x16 LED Matrix FeatherWing

Crawling Animatronic Hand

0.96" mini Color OLED

Adafruit MMA8451 Accelerometer Breakout

Trinket-Powered Conference Room Occupancy Display

Jewel Hair Stick. Created by Leslie Birch. Last updated on :47:17 PM UTC

Adafruit DRV2605 Haptic Controller Breakout

Flora Brake Light Backpack

Dauntless Dotstar Gauntlets

Adafruit LED Sequins. Created by Becky Stern. Last updated on :02:00 AM UTC

Bandolier of Light. Created by Becky Stern. Last updated on :16:17 PM EST

Steven Universe Cosplay Shirt & Gem Created by Erin St Blaine. Last updated on :54:25 PM UTC

Adafruit 1.27" and 1.5" Color OLED Breakout Board

PyPortal NeoPixel Color Picker Created by Kattni Rembor. Last updated on :42:41 PM UTC

Simple LED Unicorn Horn

Transcription:

LED Lightbox Created by Sam Clippinger Last updated on 2016-09-03 01:50:00 AM UTC

Guide Contents Guide Contents Overview TL;DR Skill Level Parts List Yellow sticker reads: "Bad planning on your part does not constitute an automatic emergency on my part." Knives and Drills Wiring and Code Wiring Testing Final Assembly 2 3 4 4 6 6 10 15 15 18 19 Adafruit Industries https://learn.adafruit.com/led-lightbox Page 2 of 22

Overview When I was young, my family had a lightbox as part of our holiday decorations. No one could remember where it came from, probably a garage sale or something. It was extremely simple -- just six old-fashioned "blinker" Christmas tree lights behind a pane of textured acrylic that turned each light into a diamond pattern. The lights blinked on and off at random intervals. Each light was always the same color and there were only six of them, but something about it was... hypnotic. One year it fell to the floor and broke. No big loss, everyone said, yet I'd never seen another one like it. Since then, I've always wanted to find another one. Years later, when I saw Adafruit's strings of 12mm LED pixels, I knew exactly what I wanted to make... Adafruit Industries https://learn.adafruit.com/led-lightbox Page 3 of 22

Of course, this lightbox does much more than the original ever could. The RGB LEDs can create any color. And because it's all controlled by an Arduino, they can create different coordinated patterns instead of just blinking. Read on for descriptions of what the code already does, or you can edit the code to add your own new patterns. This project's code randomly displays many different patterns. The video below shows specially modified code to demonstrate all the patterns in the following order: Blinker bulbs, if old-fashioned blinkers could also fade to different colors, fade to new locations or flicker on/off. Random blinking is the default mode when no other effects are running. The video shows only a 2 second delay between each on/off effect; the unmodified code imposes a random delay. Tracers that chase across the field and bounce off the edges. The video first shows one tracer alone, then three simultaneously. Rapid scrolling of the entire field. The video shows this happening very suddenly, normally it doesn't follow so closely on the heels of a previous pattern. Conway's "Game of Life" (sorta), where each LED lights or fades based on the number of lit neighbors. A starfield, which lights all LEDs with a dim background color and random LEDs flare bright white. Blinkenleitz (for lack of a better name), where random LEDs flare brightly in random colors against a black background. A game of 2048, played randomly. Unfortunately for my ego, random play is nearly as successful as my own. Waves of random colors, spreading from a random point and consuming the entire field. Undulating/twinkling waves of colors, spreading across the entire field. The effect may remind you of looking up at the light through the surface of rippling water, or a flickering bed of coals in a dying fire, depending on how you like to spend your free time. TL;DR Blinking lights are pretty! Skill Level Adafruit Industries https://learn.adafruit.com/led-lightbox Page 4 of 22

This project is very easy to assemble. Depending on what wire you use, you may not even need a soldering iron. In fact, the most important part is measuring carefully so everything looks straight -- more on that later! Adafruit Industries https://learn.adafruit.com/led-lightbox Page 5 of 22

Parts List I didn't take separate pictures of each item I used to build the lightbox, but I'll list everything out below. Yellow sticker reads: "Bad planning on your part does not constitute an automatic emergency on my part." The most important piece is the case. It's what you'll see most, so it should look nice and you should be extra careful not to damage the exterior during construction. If you're handy enough, you can certainly build one yourself. I don't have a woodshop, so I bought a 12"x15" shadowbox from my local hobby store. Whatever you choose, be sure it puts several inches of distance between the glass and the back of the box. If the LEDs are too close the acrylic, their light won't be diffused enough. Adafruit Industries https://learn.adafruit.com/led-lightbox Page 6 of 22

Second most important is the patterned acrylic itself. I like the effect created by the diamond pattern, but don't let that stop you from finding something different! I purchased mine from acrylite-shop.com (http://adafru.it/e8z) because they laser cut it to the exact size needed. (As of this writing, they appear to offer a transparent honeycomb pattern that they didn't have before. It would probably look very nice.) Be sure to remove and measure the glass from your shadowbox, don't just measure the visible portion! Here you can see a few of the different patterns side-by-side. The big sheet at the bottom is the one I actually used. (Notice how the diamonds are quite a bit bigger in the bottom right compared to the top left? That's because the bottom right corner is about 0.3" further away from the LEDs than the top left.) Along the top row, left to right, the small samples are diamond patterned, honeycomb patterned and "stippled". (The small diamond and honeycomb samples also had an iridescent coating that doesn't show up in this photo; acrylite-shop.com calls it "Radiant"). It only looks good in white light; I wouldn't suggest it Adafruit Industries https://learn.adafruit.com/led-lightbox Page 7 of 22

for this project.) Adafruit Industries https://learn.adafruit.com/led-lightbox Page 8 of 22

Full parts list: shadowbox patterned acrylic panel Arduino Uno (http://adafru.it/50) 12mm Diffused Flat RGB LED Pixels (strand of 25) (http://adafru.it/738) 5V 2A switching power supply (http://adafru.it/276) 2.1mm female DC power jack (http://adafru.it/e8a) posterboard or foamboard (black) razor knife wire cutters heat shrink tubing OR electrical tape yardstick OR meterstick (depending on where you live) pencil hot glue gun or epoxy wire drill with 0.5" and 0.25" bits small phillips screwdriver calculator and notepad computer and USB cable Pictured but not used: hammer (if frustration levels rise too high) Adafruit Industries https://learn.adafruit.com/led-lightbox Page 9 of 22

Knives and Drills The LEDs will be mounted in foamboard (or posterboard) just inside the back panel. If you're using a purchased shadowbox, it will come with a panel for mounting the display items (probably covered in cloth). Remove that panel and cut a piece of foamboard to replace it. In my shadowbox, the Arduino is too big to stuff between the foamboard and the back panel, but it'll fit nicely along the side. So I cut a hole in the foamboard Adafruit Industries https://learn.adafruit.com/led-lightbox Page 10 of 22

for it. The Arduino has some onboard LEDs of the boring non-rgb variety, which don't really fit with the theme of the project. Worse, some of its components are shiny and will reflect the other LEDs. So to hide it from view, I created a little "tent" out of some extra foamboard and glued it in place. Don't glue the Arduino down. It needs to remain removable so you can plug in the USB Adafruit Industries https://learn.adafruit.com/led-lightbox Page 11 of 22

cable and upload code. Use a calculator to determine the spacing you need and draw out the grid. For 25 pixels, you'll need 7 lines horizontally and vertically. The LEDs will go on every other intersection. Mark the points you're going to cut, otherwise you'll cut the wrong place when you're almost done. Having to start over will reduce your enthusiasm. (Trust me.) Cut the holes with your razor knife. I found it was easiest to cut square holes with the knife, then round them out by using a 0.5" drill bit as a hand tool (not in the drill). Adafruit Industries https://learn.adafruit.com/led-lightbox Page 12 of 22

Take extra special care to measure very carefully when cutting these holes! A crooked line or sloppy cut will put an LED (slightly) out of line and will be VERY noticable in the end product. Create a hole for the power jack by drilling from the inside. The 2.1mm jack is bigger near the posts than it is at the tip, so I used the drill to make the inside Adafruit Industries https://learn.adafruit.com/led-lightbox Page 13 of 22

of the hole wider than the outside. Don't glue it in place yet -- wait until you have all the wires connected! Adafruit Industries https://learn.adafruit.com/led-lightbox Page 14 of 22

Wiring and Code The Arduino code for this project can be downloaded here https://github.com/samclippinger/lightbox (http://adafru.it/e8b) Almost all of the tweakable values are set using #define commands near the top. For example, if you want to change the chance of a starfield effect appearing, look for STARFIELD_CHANCE_PERCENT. The comments should help explain what each value does. Wiring Very little wiring is needed to make this project work. To start, the plugs on the ends of the LED strand are useless here, so go ahead and cut them off. With only one of strand of LEDs, the "output" end isn't needed. I just folded the wires over and covered them in heatshrink. (I didn't want them to accidentally touch and short out some day.) If you want to make this project bigger and use more LEDs, you'll need to connect the strings and (if you have more than 50 LEDs) provide additional power midstrand. For more details on wiring up these pixels, check out the main guide for them at https://learn.adafruit.com/12mm-led-pixels (http://adafru.it/dgr) Before cutting any wires, carefully check your LED strand's markings to be very sure which end is "input" and which is "output". Adafruit Industries https://learn.adafruit.com/led-lightbox Page 15 of 22

On the "input" end of the strand, the "serial data" and "serial clock" lines will need to connect to the Arduino. The wires in the LED strand are multi-strand, which makes them nicely flexible but very difficult to mash into a breadboard (or an Arduino). I solved problem this by splicing them to a short piece of 20 gauge solid-core copper wire, which fits easily into an Arduino hole. After twisting the wires together, I dribbled a bit of solder on the connection to hold it. As a last step, I covered each junction with heatshrink so no one can see how bad I am at soldering... The 5V and ground lines were already each split into two lines, but I decided I needed three: two to the Arduino and one to the power jack. Again, heatshrink makes it look very professional. Adafruit Industries https://learn.adafruit.com/led-lightbox Page 16 of 22

On my LED strand: Red is the 5V line Blue is the ground line Yellow is "serial data" Green is "serial clock" For more details on wiring up these pixels, check out the main guide for them at https://learn.adafruit.com/12mm-led-pixels (http://adafru.it/dgr) Check your LEDs carefully to figure out your own wire colors -- they may be different from mine. Connecting 5V to the wrong line could destroy your LED strand! Connect the 5V line to both the positive post on the power jack and the "Vin" hole on the Arduino. Connect the ground line to the negative post on the power jack and the two "GND" holes on the Arduino. Connect the "serial data input" line to the Arduino's digital pin 11 Connect the "serial clock input" line to the Arduino's digital pin 13 Adafruit Industries https://learn.adafruit.com/led-lightbox Page 17 of 22

Testing Before you go any further, plug in the 5V power. Then connect the Arduino to your computer with a USB cable. (Don't plug in the USB first, or the Arduino will try to power the LEDs from the USB power, which could damage the Arduino.) Use your computer to upload this project's code to the Arduino. If everything is wired correctly, you should see some of the LEDs light up and start to blink and/or fade between colors. The patterns won't be distinguishable while the LEDs are in a pile, but that's OK. If they light up, your wiring is correct. Adafruit Industries https://learn.adafruit.com/led-lightbox Page 18 of 22

Final Assembly Nearly done! The Arduino is going to remain unglued so it'll be easy to remove and upload new code. But since you don't want the connections to work free, it's not a bad idea to secure them with some hot glue. Next, glue the LEDs into the foamboard. Be sure to follow the same layout as in the picture below! If they're installed in a different order, the animations won't work correctly. Adafruit Industries https://learn.adafruit.com/led-lightbox Page 19 of 22

Adafruit Industries https://learn.adafruit.com/led-lightbox Page 20 of 22

Install the acrylic panel, glue the power jack in place and tuck the Arduino into its little cave. Lastly, close up the back panel, apply a sticker and you're done! Hang it on the wall, put it on your desk or give it as a gift! Every time you have more than a Adafruit Industries https://learn.adafruit.com/led-lightbox Page 21 of 22

minute to watch it, you'll end up hypnotized by it. Adafruit Industries Last Updated: 2016-09-03 01:49:59 AM UTC Page 22 of 22