White Dwarf

“Dad, I need some blinky lights.”

There’s something Pavlovian about those words.  Immediately you stop whatever it is you’re doing, eating, or watching and snap to attention, ears perked.  For engineers it’s like your kids asking you, “Dad can you please put on some flannel and a tool belt and be ready to do something Dad-manly.”  Why yes, of course.  “What kind of flux capacitor are we building?”   “I wanna be Star Lord for Halloween.”  Now, I am a geek.  There is no doubt.  For me a wild Saturday night is surfing the net in search of ways of getting my code line-count skinny.  But my oldest daughter had me at a disadvantage here.  “A Star-what?”  Cue her anime forehead teardrop.  “Star-LORD.  Peter Quill, one of the Guardians of the Galaxy?”  A blank look is all I could muster.  “Here, I drew a picture.”  She held up a sheet of paper of a normal-looking guy with a really ugly face.  “That’s his mask.”  Oh.  “The eyes glow red.  He has rocket boots and is holding the <something.. something> infinity <something>.”  From there on my engineering ADD kicked in and began decimating and interpolating like a bad cell phone connection.  I did catch all the most important words.  Blah blah orb bl-blah blah.  Wahh-wat wuuaa glows blah wat wah hand bluwat purple wah.  “So can you build one?”  Orb, hand, glows, purple.  Got it.  “Of course.”

Some Field Research

I had a fairly good idea of what we were building to, but it wasn’t until I actually went to see the movie that it became clear.  Guardians of the Galaxy was a good one.  I’ve enjoyed the Marvel series so far and this one delivered as well.  To my teenage daughters it was another chance to see the ‘two-hours-of-Chris-Pratt-in-space” show.  Cue the dad forehead teardrop.

Imagine a purple glowy-stone.
Purple-Glowy Infinity Stone Thing

I started thinking about what would make a good effect.  It was September already so probably not enough time between then and Halloween to make the whole separating L’Eggs mechanism, surprise-in-the-middle thing.  Maybe just use like a translucent sphere with an LED array in the middle.  My daughter suggested a 4″ styrofoam ball and volunteered to take care of decorating the exterior.  Perfect.  I set about to engineering the innards.

Let’s Spray Some Light

To engineers, LEDs on circuit boards are like sprinkles on cupcakes.  Cupcakes are awesome.  Circuit boards are awesome.  What would make circuit boards awesome-er?  Sprinkles, of course.

I can put LEDs on boards. No problem.  I can make them flash.  I can make them fade and pulse.  By golly I can make them dance, Sam-I-Am.  But boards are flat.  For a sphere application, even if you put LEDs on both top and bottom sides of a board you still get a meridian of not-so-much-LED along an edge.  If you look at LEDs on mouser.com you can sort and filter by the LED’s viewing angle.  The angle denotes where the illumination of the LED drops to 50%.  Beyond that angle the illumination isn’t guaranteed to a level.  So even with 180 degree LEDs on the board, top and bottom, you might still get the darker meridian.  What would be better is to mount additional LEDs vertically on the board.  This would require partially tomb-stoning the LEDs, or soldering them standing on their side.  Yuck.  I don’t really like that idea.  What would be ideal is to have a vertical board substrate to support the extra LEDs.  But it has to be inexpensive, and elegant.  Hmm.

Imagine a coffee filter with chicken scratches on it.
My Napkin, Err, Coffee Filter Drawing

Above is my jenious idea for a 3-D board assembly to facilitate vertically-mounted LEDs.  The main board would have a cross routed through the middle.  The two side-boards would feature copper traces which run the length of the vertical members, on both sides.  They would break off, interleave with each other, then assemble through the middle, soldered to the copper traces on the base substrate.  This would yield eight illumination sectors with 16 separate LED nets.  The nets would climb the walls and allow the assembly to have LEDs mounted either horizontally or vertically.  I’m figuring that alternating H vs. V among the sectors would spray LED goodness everywhere.

An ATTiny microc0ntroller would control the dimming, flashing, and general fancy-ness of the LEDs.  Will likely need some sort of current buffer driver to offload the current draw from the microcontroller.

Power Struggle

I chose the Atmel ATTiny88 microcontroller for the brains of the operation.  In small quantities they’re under a buck-fifty and provide enough outputs and amenities to get the job done.  The AVR architecture has built-in clocking, timers, and the TQFP package footprint offers enough GPIO to drive all 16 of the LED nets, and then some.  There’s also an on-board EEPROM if we need it.

The LEDs chosen are a motley mix of different colors, sizes, and rated currents.  All are 3V LEDs.  For worst-case consideration, the microcontroller would need to drive 16 LED nets at 20mA a piece, for a total of 320mA across the VCCIO.  So I’m wondering if the ATTiny88 can handle that kind of load on its output pins.  To find the answer we have to look deep-down in the datasheet, on page 207 in the notes:

Imagine page 207, note 5 of the ATTiny88's datasheet
Navi Says: “Watch Out!”

Basically what this is saying is that although the ATTiny88 can drive enough current on at least one pin to satisfy an LED, if you try to drive several, or in our case 16, outputs to LEDs at the same time, the current load on the microcontroller will be too much.  What would likely happen is rail collapse, which is a fancy term meaning that the power voltage at the microcontroller will droop and the micro would probably reset, or not operate at all.  What we need is a buffer-driver chip between the ATTiny88 and the LEDs.  I chose the 74LVC162244A from NXP.  It has the drive strength to handle a worst-case, continuous-on LED current draw of 100mA x 4 banks = 400mA, while only requiring a total of 20uA x 16 = 0.32mA of current draw from the ATTiny88’s I/Os.


Gerbers Out to OSHPark

Schematic and layout are both complete.  Below is the OSHPark rendering of the top-side:


You can see the two wings that will break off, interleave, and assemble through the middle.  Unfortunately, OSHPark specifies a minimum slot width of 100 mils, while the board thickness is 62 mils.  This leaves roughly a 20 mil gap on either side of the slot.  I hope to mitigate with making the wing-board width the same length as the cross.  Hopefully the rounded ends of the cross will chafe and hold the wings in place during soldering.  For the tabs, I was unsure what would be an acceptable length, so I took a guess.

On the bottom-right corner are three connectors.  J1 is a custom connector I made to fit the JTAGICE3 for programming and debugging the micro. J2 is a spare 100 mil jumper, for whatever.  J3 is the power connector.  The board is designed to operate from a single +3V CR2033 coin cell battery.

At the last minute I also added in an accelerometer, the MMA8653FCR1 from Freescale.  Wonder what I could do with it?

Bare Boards Are In!

Yay purple coasters!  Right away I notice a couple of things with this run:


One, the silkscreen at the center of the base board was removed.  These markings indicated the assembly direction of the LEDs, and named the first eight quadrants.  From the previous picture you can still see them.  I bet OSHPark’s fab house removes any silkscreen not on top of soldermask.  I submitted a ticket to OSHPark so we’ll find out soon.  Edit: Indeed OSHPark subtracts any silkscreen from soldermask stop areas.  TO get around this they recommend copying the silkscreen layer to the soldermask layer.  So you end up with silkscreen element-sized sections of soldermask which allows silkscreen to reside.

Also, on the slots and cutouts page OSHPark warns not expect copper to reach the edge of the slots.  But it looks like it does.  Got away with that one!

The breakaway tabs on the wings are quite durable, and not very breakaway-ish.  Next run I might try some unplated drills in them to make them more pliable.  For now I’ll just use the Dremel.


One thought on “White Dwarf

    […] It’s inspiration came from my oldest daughter’s desire to be a Marvel Superhero this Halloween. Of course, engineer Daddy takes the task to whole new level. […]

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s