Sunday, 27 April 2014

Another quick weekend project that got out of hand

I've been doing a lot of coding lately. Real work sometimes interferes with nerding about but every now and again it's nice to get away from the screen for a few hours and do something else. As part of a recent clearout, I found we had no less than 9 pairs of 3D glasses in our house. These are from the days when glasses were given free with the first screenings of the first 3D movies (and I obviously "forgot" to put them back in the box on leaving the cinema).


So, looking for a quick-and-easy weekend project, I thought I'd pop the lenses out of a pair of glasses and replace them with some SMT-LED-covered PCBs, to create some cool funky video-specs. There are a few similar projects on the 'net like this, but they use pre-fabbed, multi-layer circuit boards, and masses of resistors and ribbon cables (and are quite expensive to buy, even in kit form). I thought I'd try to design a PCB which could be made by anyone at home, with the simplest of equipment (some press-n-peel and a bit of ferric chloride at least).


My idea was to lay out a matrix of SMT LEDs and control them from a single MAX7219 chip (each lens would be controlled from the same chip, making each one a mirrored copy of the other). This seemed like a great idea, so I used the ever-so-scientific method of laying out my LEDs, printing them out onto paper, lining them up with the glasses, moving the LEDs and repeating this process, until they fit in the frames.

I only have through-hole versions of the MAX7219 chips, not SMT versions, so I called on Jason to see if he had any in his massive library of components. It turns out that he does, but he also had some really interesting SMT RGB LEDs that I couldn't turn down.


WS2812 LEDs are usually found in addressable RGB strips - and Jason has used them to great effect in his 1D pong game. He also had a load of them available individually, and they seemed like a really great idea: provide 5v and ground, and use a daisy-chained data line (the data out from one LED goes to the data in on the next in the chain, and so on) - what a simple, easy way to build a matrix of LEDs which require just three wires to connect them to a microcontroller and power source.

Determined to get a working project in a weekend, I put together a design using these LEDs and discovered that, because of the peculiar 6-pin arrangement, I could only get a 4x4 grid on each lens of my 3D glasses; less of a wearable video display, and more like geeky specs with a few flashing lights on them!

A quick Google later, and a visit to eBay, and there are some WS2812B LEDs winging their way over from China. These are just like the LEDs Jason gave, except they have only 4 pins (removing the need for the external capacitor and resistor required on the WS2812 modules).




However, the physical dimensions of these mean we still can't fit more than four  either across or down on each of our lenses. The answer?
Well, the project started out because I had a load of 3D glasses that could be re-purposed to make cool funky shades - and has somehow become an RGB video display "visor". If the 3D glasses are not going to be big enough to hold the 5mm square LEDs, maybe the answer is to do away with the 3D glasses! Which means designing a single-sided PCB that can be used as the front of a pair of shades (with the arms being mounted on to the edges).

Here's what I came up with:



The 2mm pads on the left-hand side of the image are for holes to be drilled into the "shades" (there should be the same on the right-hand "lens" - just forgot to draw them in) to allow the wearer to see out - albeit with a severely limited viewing field!

Hopefully the LEDs will arrive from China within the next few weeks, and I can solder up a test pair of video-shades and publish the PCB layout PDF very soon.....