Saturday, 18 May 2013

6. Building and Testing the Matrix of LEDs

We are now about to start assembling the matrix of LEDs.  To do this we are going to:

  • Insert the LEDs into the wooden jig
  • Bend the cathodes (negative wires)
  • Solder them together
  • Bend the anodes
  • Solder them together
  • Test each assembled 'plane' of 64 LEDs
  • Insert each plane into the PCB and test it again

Before we start, it's very important to mention something about heat and LEDs...

SOLDERING LEDs - IMPORTANT!

LEDs don't like getting too hot - if they do they lose their intensity - so try to be very quick when doing your soldering.  Here is the plan I recommend:
  • Get your LED legs lined up as best you can.
  • Get into a comfortable position so that your hands will be resting on something as you do the soldering (hard for later bits of the cube)
  • Hold the solder wire about 2 inches from the end
  • Have the soldering iron set on about 320°C (this is only my best guess but it worked ok for us)
  • Get 'lined up and ready to go'
  • In one smooth and quick action, do the following:
    • clean the tip of the soldering iron on your damp sponge
    • put a tiny bit of solder on the tip to wet it
    • heat the join point with the side of the tip of the iron to heat the wires
    • apply the solder (it will run between the wires)
    • take the heat away as quickly as possible
    • blow on the joint to cool it.
The actual soldering of each joint must be done as quickly as possible.  If you have the heat on for more than about 3 seconds, pull away, let it all cool down and try again.  The solder has flux in it and if it all burns/boils off then the joint will oxidise and you'll have a problem.  Speed and precision are the key!!

Bending and Soldering the Cathodes
This is pretty easy.  Try to get the bend close the LED itself otherwise the wire may be touched by the anode wires (as you will see in the next step).  Solder them in lines of eight on the wooden jig, remembering to keep them from getting too hot.

Bending and Soldering the Anodes
The instructions say that you should use a 5mm thick ruler to use as a bending thickness guide.  However, a wide thing like a ruler stops you from forming a good bend so I would recommend a 5mm bar like the one we are using here (a bit of old brass hex rod I had in my metal store):


My 12-year old daughter soldered every one of the LEDs - over 1,000 connections!


Testing

It's a good idea to test the LEDs before installing them on the PCB.  If you don't know about LEDs read the 'Slightly Technical Bit' below.  If you're comfortable with electronics then it's enough to say that 5 mA is quite enough to test the LEDs so, assuming you have a 5 volt supply then you just need a 1000 ohm series resistor.

Slightly Technical Bit
LEDs are not like little light bulbs - you can't just put the leads across the terminals of a battery to test them.  If you do that you'll destroy them because LEDs have an extremely low resistance and simply connecting them to a battery will allow too much current to flow causing their internals to be destroyed.  You must have a 'series resistor' to limit the current.  (There are no series resistors on the PCB because the ICs that drive the LEDs are special current-limiting gadgets that don't need external resistors).
 
The set-up you will need will look something like this:

Just replace the 9 volt battery shown above with your 5 volt power supply and use a 1000 ohm resistor.  (Because volts/current = resistance then you can work out that if you have 5 volts and a current of 5mA (my guess as a good value to use) then you can see we get 1000 ohms as the value of the resistor.)  The precise value of the resistor is not critical but since I don't know the maximum current allowed by the supplied LEDs I'd advise caution and use 1000 ohms or higher.

Installing the LED Planes on the PCB and Testing
Undoubtedly a very exciting bit of the whole construction process is the part where you insert your tested LED 'planes' into the PCB and see what happens.  Getting each plane into the PCB is a bit of a fiddle but it will go in in the end.  Make sure you insert the planes as shown below with the anode sticky-out-bit above the row of anode connectors on the PCB.

You'll need some sort of test lead to hook up the anode wire on the plane to the anode on the PCB.  If you have several you can do what we did and test lots of them in one go.

Make sure nothing is touching anything it shouldn't, plug in your 5 volt supply and see what happens!


If you see lots of pretty patterns you know you're heading in the right direction.

Make sure that all the LEDs are (at some point) lighting up with the pre-programmed sequence.

At this point my daughter and I looked at each other and said "Only seven more planes to go!"...

Spacing Jig
We made the second plane and fitted it to the PCB so that we could test it and solder its rearward pointing LED legs to the first.  However, we realised that it was going to be quite difficult to make sure all the planes were the correct distance apart.  We therefore made a jig using a piece of 1/2" square balsa, cut at the same intervals as the matrix.  We used a junior hacksaw to make the cuts, to the same depth as the junior hacksaw blade (an easy way to get them all the same).


The photo above shows the jig being slotted downwards onto the wires but we found it was actually easier to bring it up from under the wires because then you could see the wire and guide them into the slots when necessary.

It occurred to us that the left-hand side of the cube (i.e. the one with the joined common anodes) would probably be relatively strong but there would be nothing to secure the rest of the cube.  We therefore decided to add a piece of 24 SWG tinned copper wire along the top right edge, using our spacing jig to get the distances right, to make the other side stronger.  This technique will not guarantee that every LED is exactly in the right place but the distances should average out so it will be about right with no nasty cumulative errors.

Once all the planes were installed and the common anode LED legs were wired together we tested them to make sure they were working by powering the board with 5 volts, clipping one end of a test lead to one of the anode connectors on the PCB and connecting the other end of the test lead each horizontal anode.

Anode Wires
Having installed all the planes and soldered all 8 of them into the cube shape we then created the 8 leads that connect the anode connectors on the board to successive layers on the cube.

To do this, we got some fine, 10/0.1 (10 strands of 0.1mm wire) with black insulation (to make it as unobtrusive as possible), cut them into suitable lengths and soldered a short piece (14mm) of 24 SWG tinned copper wire to one end.  We then inserted this bit of tinned copper wire into the gold connector, measured the length up to the appropriate level on the cube, cut it to length, stripped the end and soldered it to the common anode as shown below.



By powering up the cube with 'Module B' (the one without a jumper on the two header pins) we were able to test all the LEDs at once.  In fact we found one on our cube that wasn't working.  Luckily this was next to where we had soldered one of the vertical anode wires and it was easy to reach.  I imagine we must have overheated it although we took great care not to do this.  Anyway, that was the only LED that didn't work out of all 512 of them.

<UPDATE:  Another one of the LEDs has started to play up.  I'm not sure why.  Sometimes it works fine, sometimes it doesn't work at all.  Luckily it's (again) one of the ones on the outside so it will be easy to replace.>

So, we now have a cube that works - now to have fun with it!

1 comment:

  1. Thanks for a good write up and some very clear photos. Looking forward to seeing the cube work and some details about the code and who that works.

    ReplyDelete