Now I have a bunch of Lego I can make the beacon mounting similar to the one I found online. Luckily my initial guess work for the size of the LED mounting seems to have paid off and the setup I made last time fits perfectly. My beacon consists of the following Lego parts;
- 1 clear 2×2 round drum (3941) milled out to make space for the LED disc.
- 1 black 2×2 round plate (4032) for the base.
- 1 black 2×2 round dish (2654) for the lid.
- 1 black Technic Axle Joiner Offset (6538b) side drilled to pass the wires.
It’s pretty similar to this one, but the difference being that I’m passing 4 pins through the base of the drum and into a hacked up socket glued into the axle joiner that then passes the 4 wires though its side to be connected to the PIC circuit.
It all fits together like this.
I used my trusty Dremel drill press and a routing bit to mill out most of the inside of the 3941 clear drum. I made a few slips and had to polish them out with the buffing disc.
I also drilled through the + shaped hole to leave a circular hole of around 4.5mm (normal Lego circular hole size). Then I drilled through the + hole in the 4032 plate and drilled a small 2mm hole into the side of the 4538b Axle joiner.
I used the tiny gold plated u shaped pins out of a 0.1″ female header strip, some shrink wrap and scraps of plastic to make a socket that would fit inside the top of the Axel joiner. This connects to the pins on my LED PCB disc to allow me to easily disassemble the whole thing without having to de-solder anything.
Partially constructed socket with a bit of plastic to keep the spacing.
The LED disc drops inside the clear drum. It’s pins poke out the bottom through the black plate which is connected the to the axle joiner. It’s easier to see in this series of photos.
Note: in this version the orientation of the pins poking out the bottom of the LED disc isn’t quite right to allow the axle joiner to click into the bottom plate correctly so I had to file it down a bit.
There isn’t much space inside the axle joiner and my socket would only fit one way. Unfortunately this was 45 degrees out from how the pins poked out the bottom of the drum due to the remaining cross of webbing inside the clear drum. This forces the LED disc to be fitted in one of four orientations in order to have enough space for the lower LEDs in between the webs. For newer versions I’ll rotate the group of 4 pins on the PCB by 45 degrees so that they poke out in the correct rotation.
That’s it for now.
I have a sample of 8 pin surface mount PIC12F683‘s on order from Microchip to use as the driver. The 12f683 has an internal oscillator (8Mhz) 6 I/O pins, 3.5Kb program memory and 128Kb RAM. Which should be more than enough and may allow me to add some extra options such as a button to start and stop or change direction.
I’ve ordered samples as PDIP, SOIC and DFN packages. The DFN (Plastic Dual No-Lead) is the tiniest at 4x4mm with pads rather than pins but I might not be capable of soldering it. The SOIC isn’t much bigger at 5x6mm but I know I can solder that size of package, especially as it’s just 8 pins.
I’m in two minds as to how to build the driver. I could try to go for an all in one LED driver that fits inside the beacon perhaps with a slight extension of another black 3941 instead of the bottom plate, then you just supply power and it rotates. It’d be quite a bit of circuitry in a small place. If I could find red/blue bi-colour surface mount LEDs that’d give me the other side of the board to play with.
Or I could go for an external Lego block housing to contain the driver one or more sockets for beacons. This would also give the option of having the block contain the power source too.
I’m not sure what the power drain is of the circuit so far but I would imagine that it is less than 10ma mosty for the LED as the PIC is very low power, so a couple of watch batteries could do the job at least for a few hours.
Anyway the driver circuit will probably need a regulator plus a few caps and the LED resistors too which will probably be a bit too big for the beacon, but we’ll see…
Things left to do.
- Write some decent software. (still).
- Get decent software to work on a PIC12f
- Build a driver circuit as small as I can.
- Get more Lego. Just so I can build a buggy or something to mount the beacon on.
Till next time…
Update: Prototype 1 is built
Pingback: Further work on LEGO lights « Catmacey’s stuff