Thursday, November 12, 2015

Codebug - Flashing LED tree made with conductive paint

Last year I made some conductive paint using this Instructable.  For me 50:25 by weight, paint to graphite powder works great. Make sure to stir in slowly otherwise the graphite powder will fly.
With this mix the paint is easy to apply yet has good conductivity.
It worked great and I used it at a Raspberry Jam to make flashing LED eyes for Halloween.

Since then the paint has been abandoned until my eldest daughter mentioned she was making circuits in school yesterday and I said I'd try to make them flashing LED Christmas Tree pictures.
This got a thumbs up from my daughters so the pressure was on.

Using Inkscape I drew a simple Christmas Tree with a place to put 7 LEDs.
Nice and simple and easy to print on A4 card.  I made the baubles the shape of a physical LED so you can see which way to place the LEDs on the sheet. All the negative (ground, cathode) sides in the middle making it easier to connect all to GND later.
PNG Version.
Links to PDF and SVG 

With the drawing done I added the LEDs.  6 to the green tips and a yellow one in the star.  I had 2mm LEDs to hand so that's what I used.  For the real thing I plan to use 5mm as the effect should be better.

I found pre-bending the LED leads at right angles so they are pointing down when in places made it easier to  get the LED to stand up at the front.  I also made small holes using a pin to push the LED leads through.  It's hard to push LEDs through 300gsm card as the leads don't have a point.

Once this was done I turned over the card.  Left the ground side for each LED pointing down and turned the positive side (anode) out at right angles pointing to the edge.  Once done I used a small piece of tape to keep the LEDs in place.
Tip.  Push the leads down to they push against the card. It's means the leads lie flat making them easier to hold on with just paint.

Back of the card
As I mentioned the conductive paint had spent the last year drying so was a bit sticky meaning the paint job is less than smooth.  I have since revived the paint with a little bit of water so for the kids it should be much easier to paint.

The bar down the middle is the ground tied to all the LEDs.  The other lines are for the positive side of each LED.
If you want all wires to be at the bottom then you may have to adjust the SVG in Inkscape to only print one Tree per A4 landscape card.

To test I thought I'd use a Codebug I got in the Kickstarter and hardly used it since. They are no on sale at CPC Farnell
With the help of Twitter people (I didn't declare the legs as outputs at the top of my code) I put together the following program. Link to CodeBug site for project

CodeBug code
Once all this was done the LEDs flashed. Yeah!.

For this project I wired up the LEDs so the top and bottom on one side are paired with the middle one on the other side and vice versa and the star LED on a leg of it's own.
This only uses three  (3) legs on the CodeBug,s o the 4th one (3) in the code is redundant.  I just left it in there in case I can figure out a more exciting way to use 4 outputs to flash 7 LEDs.

Very Short video of the final tree.


Next I want to wire up to a Raspberry Pi to enable interactive input and independent control of all the LEDs and maybe play a Christmas tune as well.

Sidenote; Some might be asking where the current limiting resistor is.  It's the paint.  The conductive paint has a higher resistance than wire and so it is acting like the current limiting resistor.