The Cylon - Larson Scanner Kit - With Charlieplexing!

by phenoptix in Circuits > LEDs

39196 Views, 183 Favorites, 0 Comments

The Cylon - Larson Scanner Kit - With Charlieplexing!

2013-10-16 13.46.19.jpg
Copy_of_The_Cylon_Larson_Scanner_Kit.gif
This instructable covers building the kit that is the result of several builds, and many iterations. If you want to learn more about previous attempts and or the design process comment below and I'll dig out the older (and much much smaller) versions and also go through the design and manufacture process too. But this is really a kit build but of a kit I've built.

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.

Gather Your Tools and Components!

2013-10-16 12.10.01.jpg
2013-10-16 12.07.16.jpg
Tools.jpg
For this instructable you're going to need: Also:
  • 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




Let's Get Cracking!

2013-10-16 12.10.48.jpg
2013-10-16 12.11.13.jpg
2013-10-16 12.11.36.jpg
2013-10-16 12.11.57.jpg
2013-10-16 12.12.12.jpg
2013-10-16 12.13.36.jpg
2013-10-16 12.13.44.jpg
2013-10-16 12.18.06.jpg
2013-10-16 12.18.13.jpg
2013-10-16 12.18.20.jpg
2013-10-16 13.18.32.jpg
2013-10-16 13.18.40.jpg
2013-10-16 13.19.13.jpg
2013-10-16 13.19.49.jpg
2013-10-16 13.19.59.jpg
2013-10-16 13.20.01.jpg
First grab those resistors! They're the blue things with the stripes. You'll want to bend them like in the picture below, then push them through the board where it has rectangles with Rs in them. Once they're through bend the legs back so they stay in the holes without too much movement. Do this for all four resistors and for your own sanity line them up the same way, or make a conscious effort to alternate them. It will probably annoy you if you don't. Worse it will annoy me, so please make sure you arrange them nice!

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.

 

Just 4 Resistors? It's Charlieplexing!

2-pin_Charlieplexing_with_common_resistor.svg.png
Yes only 4 in this project and those take care of all 12 LEDs due to the way the LEDs are wired. As mentioned at the start of the instructable the LEDs are charlieplexed. 
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.


Let's Add Some Light!

2013-10-16 13.21.03.jpg
2013-10-16 13.21.06.jpg
2013-10-16 13.21.13.jpg
2013-10-16 13.21.19.jpg
2013-10-16 13.21.56.jpg
2013-10-16 13.23.16.jpg
2013-10-16 13.23.52.jpg
2013-10-16 13.24.03.jpg
2013-10-16 13.26.37.jpg
2013-10-16 13.26.42.jpg
2013-10-16 13.28.02.jpg
2013-10-16 13.29.17.jpg
2013-10-16 13.28.22.jpg
2013-10-16 13.30.00.jpg
Or lights to be precise!

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.

Pop a Cap in It...

2013-10-16 13.30.46.jpg
2013-10-16 13.30.58.jpg
2013-10-16 13.31.30.jpg
Next we add the ceramic capacitor. This is a decoupling capacitor, it's just there to make sure everything plays nice electrically. It's not polarised (or polarized for you z obsessed colonists!) so can go either way. Push it through the board as shown, bend the legs back, solder in place and snip off the legs!

Header It In...

2013-10-16 13.31.50.jpg
2013-10-16 13.32.39.jpg
2013-10-16 13.32.42.jpg
Now attach the programming header. You'll want this for reprogramming the Cylon. A handy tip for soldering these in is to hold a single or even two of the pins of the header with your finger tip, whilst soldering a pin that you're not touching! Solder all six pins whilst not holding the one you're heating up.

I Got the Power

2013-10-16 13.32.57.jpg
2013-10-16 13.33.05.jpg
2013-10-16 13.33.43.jpg
2013-10-16 13.34.11.jpg
2013-10-16 13.37.19.jpg
2013-10-16 13.37.24.jpg
and so do you! Now we're attaching the battery pack. There are strain relief holes on the board so thread the wires through from the back leaving plenty of slack and push the tinned ends into the holes marked + and -. Plus is for the red wire and minus for the black. It tends to follow the rule that the lighter colour is positive. 
Flip the board over and solder the wires to the pads on the board.
Almost there!

Last and by No Means Least!

2013-10-16 13.35.36.jpg
2013-10-16 13.35.51.jpg
2013-10-16 13.36.16.jpg
2013-10-16 13.36.49.jpg
2013-10-16 13.37.19.jpg
2013-10-16 13.37.46.jpg
2013-10-16 13.38.19.jpg
2013-10-16 13.38.23.jpg
2013-10-16 13.38.41.jpg
2013-10-16 13.38.45.jpg
2013-10-16 13.38.48.jpg
2013-10-16 13.38.52.jpg
2013-10-16 13.38.55.jpg
2013-10-16 13.38.57.jpg
2013-10-16 13.39.40.jpg
Now you're an expert soldersmith / solderizer with all the other joints you've soldered we're going to attatch the ATTiny2313!
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!

The Moment of Truth!

2013-10-16 13.40.00.jpg
2013-10-16 13.40.17.jpg
2013-10-16 13.40.23.jpg
2013-10-16 13.40.30.jpg
2013-10-16 13.40.46.jpg
2013-10-16 13.41.46.jpg
2013-10-16 13.41.54.jpg
2013-10-16 13.46.04.jpg
2013-10-16 13.46.19.jpg
Add two AA batteries to the battery box and switch on!
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.