UPDATE Aug 7th 09 : You can get the Eagle CAD files here.
UPDATE Oct 2nd 08 : You can grab the source code and circuit diagram for this project from this blog post.
I’ve been working on a variant of the circuit I developed for my Lego beacon. It’s the same basic circuit but this time with 12 rather than 8 LEDs and rebuilt into a circular 40mm dia (1.5 inch) double sided disc.
The idea is to use this as a simple “lighthouse” that when powered up will rotate the beam around the 12 LEDs. I’m not sure why I’m building it, I have no real need of a lighthouse… Maybe it could be useful for a model railway or something similar. But I kind of like the idea of it and had some neat OSRAM SIDELEDs in my parts box that were calling out for some use.
This is the prototype circuit and as such has a couple of features that don’t really need to be there other than for the prototype. The first feature being a full size ICSP connector, the second, a socketed DIP version of the PIC12f683. Actually I used a DIP rather than SOIC pic because I happened to have a bunch of them hanging around and space isn’t so much of an issue here as it was in the Lego thing.
The circuit works fine to a point, but I’ve spotted a couple of problems that I need to resolving. The main problem is that I planned to program the device using ICSP but didn’t allow proper isolation of the DAT/CLK lines which means that my Pickit 2 doesn’t really like talking to it. The 4R7 resistors on pins 5 & 7 aren’t enough to propertly isolate them and the LEDs interfere with data transfer… Doh! I wasn’t thinking clearly there… I’ll hack this prototype with a scalpel and some fine wire to insert a couple of DIP switches to get it working properly.
12 LEDs is the maximum number of you can charlieplex from 4 tri-state pins. The PIC 12f683 is an 8 pin device that has 5 GPIO plus the MCLR pin which can be used as an input. I’ve decided to keep one GPIO spare, GPIO 4 which also happens to be an analog port so I could maybe add a light sensor that turns the lighthouse on when it gets dark (It’s got a button on it at the moment)
I made it using my normal toner transfer technique and it turned out pretty well. The smallest trace is 24mil although there is a tiny bit of 16mil in between the pads of the PIC. Once I’ve debugged this one I might have a go at one about 30% smaller as there’s quite a bit of space especially if I used a SOIC pic and dropped the trace size down to 16 or 12 mil. This version has an LM317 regulator on the back so can be driven from 12V or whatever but I am toying with the idea of making a smaller version that is driven from a 2032 coin cell mounted on the back which wouldn’t need a regulator.
Anyway, here are a few more photos until next time…
Top side of the circuit after etching
Bottom side of the circuit. Alignment was pretty much spot on.
Drilling later on was not quite so good… )
Populated top side.
Populated bottom side with LM317 (sot223 package)