Wednesday, 11 March 2015
Visit Tagbits to see the full range of tagger products described in this blog.
I finally finished my fully 3D printed proton pack the other week. I've spent the final days implementing the lighting system using a simple Microchip PIC and a charlieplexed array of LEDs.
The traditional circuit for lighting a pack consists of a 555 oscillator to produce a clock, which is then fed into a couple of shift registers, the output of which drive NPN transistors to drive the LEDs. This produces a column of lights that rises then resets.
A decade counter (with transistors) is used to illuminate the LEDs in the 'cyclotron', the 4 large circles at the bottom of the pack.
This seemed a bit over the top to me, as not only being complicated, with around 13 LEDs in the column, the wiring of some implementations is a bit challenging with a cable per LED.
So I designed some circuits to implement the same effects, but with far fewer wires. Not only does this simplify the wiring, fewer wires should also increase reliability.
I created a very simple circuit which brought out the I/O of a PIC (16F684) to a few connectors:
And a second circuit which gave me a charliepxed matrix:
I did this as two separate circuits as the pack has two LED columns, one on the pack and one on the thrower. A smaller PCB is used in the thrower with a second PIC board which means each LED column has a LED board and a PIC one. I chose a board pair solution as there is limited room in the thrower housing where the LEDs are mounted.
Charlieplexing works by utilising the tri-state ability of microprocessor I/O pins, in that only two pins are ever outputs at any one time. To implement this I used two look up tables: One to hold the port I/O register states (e.g. which pins were outputs, and which were not). One to hold the pin values (e.g. which pin high and which pin low).
I also included 16 levels of dimming per LED by implementing PWM in software. With the PIC running flat out at 2mips I can control each LED individually with dimming without flickering:
Here is the finished pack:
And here I am ready for Zuul with youngest as Mr.Stay Puft:
The proton pack parts can be downloaded from Thingiverse. And a few others worldwide have joined me in making this:
Iron Man of Maine.