I decieded to make my own dot matrix display because they look cool, and none can be found in blue, which is the best colour, so I decided, may as well make it myself.
Step 1: Plan
I built the cuircuit on Eagle so I could see the connections and test the LED matrix. It also enabled me to learn how to light the individual LEDs.
First thing to do is to add all the support stuff for PIC, so I need power supply, download socket and reset. I also need to arrange the outputs in simple to use rows. This defined the size of the PCBs so I spent as much time as I could reducing the size until I couldn't get it any smaller.
The next step was to place the 20 LEDs in the dot-matrix, connectign all the anodes in columns and all the cathodes in rows. This is impossible to do without using link wires unless your using double layer board or double sided board. I wasn't so I will be using link wires.
Step 2: PCB
I designed the PCB on the school computers, which had PCB Wizard 3. Great piece of software, very easy to use but still very powerful. Unfortunately this means while I have the PCBWiz3 files, I don't have them in any other format, and the only pictures I have are the photo-etch masks, always good practice to wrap them up in the photo-etch mask paper for later use, or just documentation. Unfortunately they scanned in rather badly.
However as I redesigned the circuit on Eagle, I've gone and re-made the PCB.
Step 3: Get the Parts
20 Diffused Blue LEDs
1 PICAXE 18X Microcontroller
1 serial socket
1 22kOhm resistor
1 10kOhm resistor
lots of black multicore wire
lots of red multicore wire
I used a PICAXE PIC as I've used them in school, they are very simple. I find them very simple to program, and then download the program to. PICAXE BASIC is of course the only PIC language I know as well, so that limits them. They are meant to be quite easy to find, although in the UK you can just go to
Rapid Electronics - PICAXE
PICAXE manual - It is a .pdf
PICAXE chip data - also a .pdf
I bought the LEDs at the same time, now as I was going for a blue dot-matrix these were my choice, and I paid for that, 48p per LED, so £12 for the whole lot, it was cheaper to buy in a pack of 25. Of course if your going make it you can use what you want, although to use my PCB layouts you'll be wanting a 5mm package.
I needed the 4k7 Ohm resistor for the reset, unless the reset pin (pin 4) is pulled high by the 4k7 ohm resistor then the PIC will constantly reset, which is bad.
I used the stereo socket, 10k ohm resistor and the 22k ohm resistor for the download socket, this means the whole unit is self contained, which is very handy. Also prevents the PIC being ruined becasue I keep having to pull it out and eventually end up snapping the legs off, what a way to waste £4.75...
I had the PCBs etched at school so they were essentially free. However we use poor quality boards so the tracks can be pulled off quite easily, but I didn't think that would be a problem, not yet at least. Oh was I in for pain.
Step 4: Soldering
The first board I began soldering on was the display board. There were a number of reasons, it looked the most boring, it would be great fun to play with once I'd finished, and it would be boring, wait, did I mention that ?
So once I'd cleaned up the tracks with some wirewool I began cutting and attaching link wires. These were damn fiddly and quite hard to make and then fix in place, so in absence of a dutiful ceramic-fingered assistant I used sellotape, which lead me to the discovery, not for the first time, that burnt sellotape is nasty nasty stuff.
Once this was complete I started soldering the LEDs, I started from the top and worked my way down doing them individually, until I got bored and started on whole rows at once. Towards the end it got quite difficult as the LED leads stuck out quite a way. Once all 20 LEDs were soldered, I attacked the back and snipped off all those pesky leads as far down as I could. And true to my earlier thoughts grabbed a spare 6v battery pack and battery clip and began running the wires up and down the connections lighting up columns. This looked pretty good on it's own, infact, the rest of the project may have been worth it just for this look. Of course for some strange reason whole rows were lighting up together but at this point I didn't quite notice...
Step 5: Neaten it up
Remove excess flux:
Flux helps the solder flow and make good contacts however it does look pretty nasty when dried and is best getting rid of for that beautiful look. The best way to do this is you dab at the board with a rag which you've soaked in acetone. Where abouts would you get acetone I hear you cry ? Well you can get it some art shops, you can also buy it at some boating/marine shops as a part of the fibreglass range, however the best source is in fact cheap nail varnish remover. So head down to your nearest cheap pharmacist and start looking for the cheapest nail varnish removers. I'm talking about 49p for 200ml, my past experience shows that this comes in pink bottles.
Clean up the edges of the boards:
This is as simple as sanding the edges of the board down so that they're smooth and flat. It's also quite nice to round the edges.
And that's is about it for the moment.
Step 6: Programming
Ah that'd be a good idea. Becasue of my forthought, I have a download socket already on the PCB, so, just whack in the download cable, plug that into a serial port on your PC, get Programming Editor, and get coding!
Of course it helps if you've programmed a PICAXE before, I've had about 4 years experience so far, GCSE and AS/A level.
The first thing to do is to type:
This just sets up the PICAXE for the program, put the important code between the main and goto main, I do this so I don't forget to do it later. The next task is to set the outputs, which pins do you want high, and which low. The long and time consuming way is to go:
high 1high 2high 3low 1low 2low 3
Or you can be cool and set the states all in one line with:
let pins = %00001110let pins = %00000000
This works by giving each pin a specific digit, so pin 8 is the fist digit, pin 0 is the last digit and so on. We also need to be able to put a time delay in there so the pins are actually left on long enough for the LEDs to light. There are 2 main PICAXE waiting commands, wait and pause, wait 1 waits for 1 second, where as pause 1 waits for 1uSecond, which is what we need.
Those inclined to nit picking will have noticed that there are only 8 pins on the pins=%00000000 command. Yes, the ninth output on a PICAXE18X is infact the serial out pin. This requires a completely new piece of code to set.
poke $05,%00000000poke $05,%00001000
I'm not too sure why this works, or why it's nessesary, but I did get it from the friendly people at the PICAXE Forum
So putting all that together gives us:
main: ' Letter Alet pins = %00011000 'poke $05,%00000000 ' Set SERTXD line lowpause 1 'let pins = %00100101 'poke $05,%00001000 ' Set SERTXD line highpause 1 'let pins = %01000101 'poke $05,%00001000 ' Set SERTXD line highpause 1 'let pins = %10001000 'poke $05,%00000000 ' Set SERTXD line lowpause 1 'goto main '
That should display the letter A on you dotmatrix display
Step 7: The finished thing
And the second image is of a letter B in the dark, these are diffused blue LEDs with a freshly charged 4x AA 2500mAh battery pack, quite bright. But not so bright as so you can't see the display, perfect.
Step 8: Improvements
Well here's a few idea's that have been bouncing around my head.
SMD LEDs, okay, what if the leds were much smaller, that'd drop the total thickness of the project by what, 5mm, smaller is better. Plus SMD is so much cooler looking, geek +5.
SMD PIC, whoa, more SMT goodness, geek +10 at least, okay it'd be un-removeable, but you can still download programs to it while it's on the board. Oh and it'd drop the thickness of the project, at the back by 5mm (don't forget the download socket though).
Professional PCB manufacturing, well, how easy woudl that be, sure it'd cost a bit, but it would mean the boards are perfect, well, as perfect as you made them. You also get to play with fun functions like multi-layers or double sided boards, imagine a double sided PCB, you wouldn't need 2 seperate PCB then. Add to that SMD componants like resistors, LEDs adn PICs and you've got a very classy, but expensive board. Here's a list from CadSoft, the people that made Eagle, PCB Manufacturers .
Larger display, most displays are 5 by 7, mine's a 4 by 5, so making it larger would open up a whole new range of display options. Of coruse you'd need more outputs, I only had 9 available, but if you were to use a PICAXE28X you have up to 17 available outputs, thats an 8 by 8 display. Nice. However if you move away from PICAXEs onto other microcontrollers I'm sure there are ones with different output pins. Another option is to Charlie-Plex the outputs, although you'll need to be able to set output pins as inputs to get that working. I believe this is possible with most non-PICAXE PICs, especially Arduino's.
Hopefully once my website ( TheDarkPlace or just The Dark Place) is up and running, I may be able to sell kits of the 4 by 5 display, with a few options, such as 2 seperate boards, 1 complete board and 1 complete board with 2 layers. That however depends on how many people like it.
Or you can just email me at: pinski1[at] gmail.com
Here's some pictures of the layouts.