I've always wanted a Larson scanner. Growing up watching shows like Battlestar Galactica, Knight Rider and even the A-Team (there was a gold Cylon in it, Face does a double take at it which was a nice touch!) it's hard not to have fallen in love with the hypnotic bouncing light invention of Glen A. Larson.
Step 1: Gather Your Tools and Components!
- Super Sexy Open Source PCB (see link to github)
- Twelve LEDs of your Choice (choose red they're best for these!)
- Four appropriate resistors (we used 39 Ohm)
- 0.1pF Decoupling Capacitor
- AA Battery Pack (or something to give you at least 3V)
- 3x2 Header
- ATTiny2313 preprogrammed with the good stuff (link to code here too)
All available in a neat package from us at phenoptix
Step 2: Let's Get Cracking!
Got that? Now head back in time about 3 minutes and plug in your soldering iron. You want the tip nice and hot, so it will melt a bit of solder without hesitation, might need to clean the tip a bit with your scouring tip cleaner if you've not used your iron in a while / ever.
Use the tip to heat the pad (that's the metal bit on the PCB) and the leg of the resistor a little bit then push the end of the solder onto where the leg and pad and soldering iron meet. The solder should flow into the hole and around the leg of the resistor. Pictures of that are below. Now repeat for all the legs. You want to get enough heat into the pad and the part to allow you to melt solder in their vicinity. Resistors are hard to damage with heat so get your technique right here. Don't worry though you're going to have more time to practice before we get to anything that you can easily kill with a bit of heat.
Step 3: Just 4 Resistors? It's Charlieplexing!
What is charlieplexing though? Well Wikipedia tells us it's a technique proposed in 1995 by Charlie Allen at Maximum Integrated which uses the tri-state logic of microcontrollers to gain efficiency over traditional multiplexing. Still at a loss? Well lets look at Traditional Mulitplexing.
This is a technique you'll see all over instructables, from the awesome LED matrix to just using a 7 segment display. There is a great instructable on the technique here. Essentially you selectively power specific LEDs by wiring them in a grid pattern. Lighting individual LEDs and relying on persistence of vision to give the illusion of control of the entire matrix at a single time.
In charlieplexing you're doing a similar thing, however now you're relying on the LED working in just one direction and the fact that your microcontroller can switch the direction of the current. Imagine putting two LEDs in circuit in parallel but with opposite polarities (see image ref http://en.wikipedia.org/wiki/File:2-pin_Charlieplexing_with_common_resistor.svg used with thanks).
Now you can light one LED or the other but not both at the same time. Fortunately for us though the microcontroller is quicker than the eye and by switching the polarily of the power supply quickly it can appear that both LEDs are lit.
Expanding that to three pins looks a lot more complex but you can already see the advantages it affords us. A resistor per pin and now we can control 6 LEDs! (picture ref http://en.wikipedia.org/wiki/File:3-pin_Charlieplexing_with_common_resistors.svg)
In this project we've used 4 pins and 4 resistors and the schematic can be found on our GitHub.
Step 4: Let's Add Some Light!
Get your lovely big LEDs and insert them so the shorter leg is on the outside edge of the board. Now turn the board over and bend the legs back like you did with the resistors. Repeat another 11 times. Now it's time to introduce them to your soldering iron. 24 perfect (or at least functional) joints later and we're ready to turn the page.
Step 5: Pop a Cap in It...
Step 6: Header It In...
Step 7: I Got the Power
Flip the board over and solder the wires to the pads on the board.
Step 8: Last and by No Means Least!
This is the brains of the operation. If you're going to have to "take down" the Cylon you're building, this is where to aim, it will blind it at least.
Sorry back to the task at hand. You might need to bend the pins together slightly for it to fit into the holes. One method of doing this is to put the pins in on one side and use something straight to bend the other side (you can use another Cylon PCB if you wish). Once you've done this the chip will pretty much stay in place, if not reinsert it and bend over one of the corner pins in the back.
Now get soldering. Try as much as you can to keep the heat you transfer to the chip at a minimum. Solder pins at opposite ends - take a break half way through - heat can be a killer, take your time!
Step 9: The Moment of Truth!
Hopefully all is well and your the "eye" of your Cylon has come alive! If you have a single dodgy LED, check the solder joints on that LED or possibly its polarity. Three LEDs not working at that could be a joint at your resistors.
Now attach it to your favourite tame killing machine.