Showing posts with label LED Matrix. Show all posts
Showing posts with label LED Matrix. Show all posts

Wednesday, 7 May 2014

MAX7219 and the Arduino

I received my 8x8 LED Matrix with the MAXIM7219 chip that I bought on eBay.
Picture 40
and then I proceeded to try and get it up and running with the Arduino UNO that I have.
A quick search on the Internet didn’t really help me very much, at first. But then I found an Instructable that was actually useful, it makes use of the MakeSpace LEDControl library (LedControlMS.h). There were some other little gotchas along the way too. Like, how the hell do you install a user contributed library into the Arduino IDE? Fortunately, there is a guide on libraries on the Arduino website, so I was able to get the library and install it.
The library comes with an example sketch, so I used that as a starting point and started to scratch around in the code to see what I could do.
Picture 41
The example contains three very useful lines of comment:
pin 12 is connected to the DataIn
pin 11 is connected to the CLK
pin 10 is connected to LOAD
Apart from that, you connect GND on the board to GND on the Arduino and VCC on the board to 5V on the Arduino, compile and load and you are away!
The LED Matrix running after a little tinkering with the sketch.
The upshot is, the use of an LED Display Matrix is very easy. If I need to have a display happening on any of my electronic projects, I know what I’m going to use.
Also, I’ve had a look around the Internet for DIY LED Display Matrixes, and there are some projects out there that I might very well undertake for myself and see how far I can push it. One or two projects out there using tri-colour LED, they look pretty cool.

Tuesday, 6 May 2014

LED Desk Light – 4 x 5 Matrix – PCB – Part 2

I’ve completed the etch of my 4 x 5 LED Matrix PCB and there are two gaps in the circuit.
PCB_Etched
The trace gaps are marked with red boxes. The gap in the negative trace was found using my multimeter using the continuity test function and verified visually. The gap in the connection from the LED cathode to the resistor can be plainly seen. This gap was where there was a missing trace in the laser printout that I “fixed” using the permanent marker, clearly, the marker wasn’t permanent enough. I think that it would have been OK if I had gone over that resist line a couple of times. Well, that’s a good lesson for me.
To fix the break, I intend to over-solder the negative trace gap and to solder in a jumper on LED 8.
PCB_Etched with LED numbers
My next task will be to drill and solder in the power at the bottom right of the PCB and then connect LED 1 along with it’s resistor. That should be proof enough that the trace is working.
After that, it will be a matter of plodding on with the remaining LED and resistors.
Now that I’ve populated the PCB and given it power … I can see that there were some other problems with the traces. LED 11 and 16 are non-responsive. When I test them with the multimeter, they respond, but not when the board is powered. Oh well … it’s a prototype.
Picture 39
Picture 38
With that done … I’m going to try another board and see if I can work out the bugs in the traces before I populate it. What a pain in the butt.
I’m going to order some SMD resistors and LED and get on to the SMD version of the 4 x 5 LED Light.

Monday, 5 May 2014

LED Desk Light – 4 x 5 Matrix – PCB – Part 1

Now that I have completed the perf-board prototype of the 4 x 5 LED matrix, it’s time to start work on the printed circuit board version.
I’ve laid the board out, pretty much the same as for the perf-board version, although I want to try something slightly different with the positive and negative traces so that I don’t have to use any jumper leads to do the column joins.
The new layout is below
Fritzing 5 x 4 LED Array_etch_copper_bottom_mirror_thumb[1]
The above is the bottom layout in mirror reverse. You can see that all of the positive traces connect at the bottom of the columns and the negative traces connect at the top. It’s no longer simply a bent parallel line of LED, but an integrated parallel circuit. I think that this layout will work, theoretically, but I’m not sure if it will, practically. Note the missing trace in the middle of the board!
I also found out that I can make Fritzing lay out the resistors in a horizontal alignment by changing the pin spacing … simple, really, and something the Fritzing team already though of.
Fritzing Resistor_thumb[1]
This makes the Fritzing layout very similar to the perf-board layout.
I’ve printed the bottom layer out and transferred it to my single layer F4 copper clad board.
The transfer is OK
Picture 33_thumb[1]
although it is a little bit … bitty. I still need to print this out on some decent paper. However, with the traces “mostly” there, I can go over the circuit with my trusty permanent marker.
Picture 37_thumb[1]
Using a ruler and reading glasses, it becomes better.
The pads are probably a little bit blobby, but that’s OK too. This is still just a prototype. I think I need a finer permanent marker … or better eyes.
From here, I’m going to etch the board. But that’s a job for tomorrow night.

Thursday, 1 May 2014

LED Desk Light – n x n matrix – Je suis fini

Yay … I’ve completed the LED Desk Light 5 x 4 matrix!
That wasn’t so hard. Well … now that I’m sporting a bright shiny new pair of +3 reading glasses (for the princely sum of $15AUD).
The reading glasses made the soldering very easy. Much easier than the desk magnifying glass. I was finding that the focal length of the magnifying glass was too short, and so, the depth of field/operating space was much too limited. The reading glasses give me a much better nose to soldering iron length.
Anyway, enough of me whining about my aging eyes and on to the show and tell.
The main action takes place on the underside of the perf-board.
Picture 30
As I described in the previous post (here) the matrix is really just one parallel run of LED and resistors. I’ve linked the LED anodes with red jumpers and the resistors with black jumpers. The 2 pin header is at the top right of the perf-board and the series runs from there to the left, then down and to the right, down and to blah, blah, blah … as seen in the following image.
series direction
Soldering the jumpers on was a little bit of a pain, the distance between the leads is fairly small so a) stripping the wire was annoying and b) holding the jumpers in place with alligator clips was a pain. Still … all done now, I can move on.
Picture 31
The top side of the perf-board is much more attractive. All of those 5mm LED and their resistors all aligned nicely in a grid. Very nice and uniform. Just to the right, you can see the 2 pin header and the 2 pin Dupont connector that I made up for the 5.7V AC Adaptor. I’m pretty pleased with the adaptor modification. I may have to do a little re-work on the circuit to include a switch, but that can come later. You can also see how the resistors worked out using the paddle pop stick as a bending jig, and also in the horizontal alignment.
Finally, you want to see it all lit up, right? Well, here it is.
Picture 32
All lit up like candles on a birthday cake. It is quite bright but only has a 25o viewing angle. I’m thinking about making a project box with an opaque white cover to work as a diffuser. That should work.. I also need to think about how to mount the light on a stand so that it casts it’s light down (or up if I want). Again … later.
All up, I’m happy with the prototype and I’m going to start planning the SMT edition of the light. All I need to do is find some suitable (and cheap) components on eBay. On reflection, I think I’ll use the 0805 rather than the 0603 it’s enough of a difference in size to make it easier on me and still small enough to make it worth while.
Oh and … in case you are wondering, the perf-board is 50 x 70mm in size.

Wednesday, 30 April 2014

LED Desk Light – n x n matrix

I’ve decided that it’s too dark at my desk using just the overhead light for illumination. Hell, I’m getting old and my eyes aren’t much good in the dark anymore.
What I’m building is a very simple matrix of LED lights soldered to a perf-board. The idea is very simple, a matrix of LED connected in a parallel circuit that kind of snakes around to make a 5 x 4 (20) LED configuration.
I’ve designed a simple 2 x 2 LED circuit that I will simply extend in both the X and Y axis to make my 5 x 4 circuit. The circuit was designed using Fritzing.
Fritzing - 2x2 LED Matrix_pcb
I’m only using this as a design guide, since I’m going to be making it up on perf-board rather than PCB, and I’m orienting the resisters vertically, rather than horizontally to conserve space on my perf-board. The main reason for that is that I want to set my board up in as little space as I can (with a reasonable amount of space, that is) and using through hole components.
The circuit uses 20 x 5mm Ultra Bright White LED, 20 x 150 Ω resistors (120 Ω is the right size … but I don’t have any of them) and 2 x 90o pin headers to attach to power (a 5.7V AC Adaptor). I used a LED Design Wizard (http://led.linear1.org/led.wiz) to help me to design the matrix based on the properties of the LED that I am using (Forward Voltage = 3.3V, Forward Current = 24 mA and a source voltage of 5.7V AC).
Later on, I’m planning on making the same thing using surface mount technology (SMT) with 0603 components.
Fritzing - 2x2 LED Matrix - 0603 SMD_pcb
That’s going to be a bit of an adventure in surface mount by hand for me. I’ve never done any SMT stuff before and this is a simple enough circuit. But that’s for later (I still have to order the parts, and then wait for up to a month for them to arrive).
So far, I’ve soldered up 4 LED and 4 resistors. My LED are spaced about 5mm above  the perf-board and I’ve made myself a spacer that will allow me to position the LED consistently above the board. The spacer is nothing more than a paddle pop stick that I’ve cut down to size. The spacer fits between the LED legs and, when I’ve bent the LED legs, the fit is snug. The spacer allows me to orient the LED rows while I’m soldering and then (with a little wiggling) I slide the spacer out and use it on the next row. I can also use the spacer to set the resistors up, too.
Now that I’ve done the first 4 LED (2 x 2), I can see that I should have started the first row off one row in from the edge so that I can better accommodate the column jumpers. I’ve also noticed that the silk print on the cheap perf-board is not very well laid out. The grid is 5 x 5 then 5 x 6 then 5 x 5 so it doesn’t end up even. Oh, well … I’ll survive. It just looks a bit wrong.
4x5 LED Matrix - LED with Guide
Above is a picture of the LED matrix showing one row of LED aligned using the spacer. This is how the LED legs will be bent evenly so that the LED are all set to the same height above the perf-board.
4x5 LED Matrix - Horizontally Aligned Resistors
And here is a view of the matrix showing the 4 LED that have been soldered to the board. These 4 LED were soldered without the spacer (before I had the idea to use the paddle pop stick as a spacer, at least). You can also see the silk screen grid on the perf-board a little better. Let’s play “Count the Holes!”. The horizontally aligned resistors save me a little space.
4x5 LED Matrix - Solder View
Finally, here is the under side of the perf-board showing the beginnings of the solder grid. The height of the LED above the board has the advantage of setting the length of the leg under the board to the anode of the next LED in the column. This makes it a little easier when I’m soldering and I don’t have to cut any of the anode leg off. The cathode leg of the LED is a different matter, it gets soldered to the resistor and then chopped off. I’ve bent the negative side of the resistor so that the leads from the resistor forms the negative line. The positive and negative  columns then get connected to the next positive or negative column, respectively, with some shielded jumper wire … but we’ll get to that later.
When soldering the LED into the perf-board, I use a heat sink clip on the upper side of the LED to avoid overheating the component. I start by heat sinking the unsoldered anode and then soldering the anode from the previous LED to it. The solder has some trouble forming a good fillet, so I leave the iron against the copper pad and make sure it gets a decent amount of solder flowing in. Some of my soldering is a little messy, but, hey … it’s a prototype, so I can cope with it.
When the anode is soldered, I then solder in the cathode (with the heat sink attached on the other side) and clip the lead where it will intersect with the lead from the resistor. Then it’s a matter of soldering the resistor in place, cutting the crossing lead from the resistor (the one that attaches to the LED cathode) and bend the other lead down into it’s column.
So far, so good.

Paypal Donations

Donations to help me to keep up the lunacy are greatly appreciated, but NOT mandatory.