Step 1: The new hardware - Controller board schematic
BETTER DRIVERS
My original clock used discrete transistors to drive the array of LEDs. I have realised that while that approach works fine for a project that I have built for myself, it makes it more complex for others to build, so this new clock uses ULN2003A Driver ICs. The ULN2003A contains a set of darlington transistors in a convenient DIP package, so there is MUCH less soldering to do.A NEW PCB
I have also re-designed the PCB to make construction much simpler - The Arduino controller simply plugs into the new PCB. If you want, once you have constructed the clock, you can recover your Arduino board by purchasing an ATMega168 with a boot loader, and populate the PCB with just the new Microcontroller and a crystal.IS THIS JUST A NEW SHIELD?
In the spirit of Arduino development, it would be fair to say that the controller board was a 24 output LED (or relay) driver shield. It is just as happy to turn on a big set of 24, 12 volt relay coils as it is turning on a bank of LEDs.Below you will find the new schematic diagram for the controller board as a PDF file.
Note that you should look at step 4 to understand what resistors to use. Don't simply use 360R and 36R with supply voltages above 10v. You will need to use 680R and 270R instead.
WordClock-Arduino-Schematic-V1.0.pdf(595x842) 64 KB
Step 2: The hardware - Make the controller board
Enough talk - lets start by making the controller board.
If you want to etch your own board, you can download the attached a PDF file and follow the steps I used.
When I made the board, I photocopied the page onto Toner Transfer paper
(Press-n-Peel Blue), then I used an old laminator to transfer the image
onto a piece of very clean PCB stock. I etched the board in a mixture
of Hydrochloric Acid and Hydrogen Peroxide etchant. There is a
brilliant Instructable that describes the process at www.instructables.com/id/Stop-using-Ferric-Chloride-etchant!--A-better-etc/
When you etch ANYTHING - make sure you are wearing safety goggles, and old clothing.
This time, I took buckets of photos of the process - It is very pretty!
I personally really enjoy making printed circuit boards, and I am sure that you can make them yourself. However, if you would like your own controller PCB, I am able to supply blank, or pre-assembled boards. Have a look at the last step for further information.
If you want to etch your own board, you can download the attached a PDF file and follow the steps I used.
TONER TRANSFER IS EASY
When I made the board, I photocopied the page onto Toner Transfer paper
(Press-n-Peel Blue), then I used an old laminator to transfer the image
onto a piece of very clean PCB stock. I etched the board in a mixture
of Hydrochloric Acid and Hydrogen Peroxide etchant. There is a
brilliant Instructable that describes the process at www.instructables.com/id/Stop-using-Ferric-Chloride-etchant!--A-better-etc/
BE SAFE
When you etch ANYTHING - make sure you are wearing safety goggles, and old clothing.CLEAN UP
When the etch process is complete, everything was rinsed very well under running water to remove all traces of etchant. Just before I rinsed everything, the etchant was collected for use with the next project.DRILL HOLES
Once the board had been rinsed and dried, I used a Dremmel to drill the holes, and removed the Press-n-Peel film using some steel wool, detergent anf good old elbow grease.This time, I took buckets of photos of the process - It is very pretty!
I personally really enjoy making printed circuit boards, and I am sure that you can make them yourself. However, if you would like your own controller PCB, I am able to supply blank, or pre-assembled boards. Have a look at the last step for further information.
WordClock-Arduino-PCB-V1.0.pdf(595x842) 37 KB
Step 3: The hardware - Populate the controller board
Now that we have an etched, sized, drilled and cleaned PCB, we need to start mounting components.
Note there there was a small change with the final board version - the two resistors (R2 and R3) are actually mounted below where the photos show them, and jumpers are installed in the corresponding space. Just follow the parts layout for the exact placement.
It was a very restful 30 minutes to do the soldering. Make sure that you use some sort of fume extraction when you solder. To many fumes can end up being bad for you.
Here are heaps of photos, showing the steps I used to populate the board.
POPULATE THE PARTS IN ORDER OF SIZE
I soldered all of the components, using the stencil layout as a reference. I started by mounting the six jumpers that I needed to place because I used a single sided board. Then I soldered the header pins and the IC sockets, Then the resistors, diodes and off board connectors. Finally, I plugged in the Integrated Circuits and the Arduino Board, and that step was done.Note there there was a small change with the final board version - the two resistors (R2 and R3) are actually mounted below where the photos show them, and jumpers are installed in the corresponding space. Just follow the parts layout for the exact placement.
It was a very restful 30 minutes to do the soldering. Make sure that you use some sort of fume extraction when you solder. To many fumes can end up being bad for you.
Here are heaps of photos, showing the steps I used to populate the board.
Step 4: The display board
THINK FIRST
Before you do anything, have a think about the size you would like the project to be. In this version, I used high intensity LEDs. they have a beamwidth of about 10 degrees, which means that I had to mount the stencil about 30mm from the LEDs to get an even illumination. If you purchase 'Flat Top' LEDs, then you can make the clock much thinner.
MOUNTING THE LEDs
I decided to make the display board using a piece of fiberglass
material, with the LEDs mounted into a series of holes that I
pre-drilled. This is a different mounting system than the original, but
I feel that it is probably more accessible, as it doesn't rely on
another expensive PCB. The LEDs are soldered on the back of the board
to a piece of 26 way ribbon cable that is terminated with a 26 way IDC
socket.You can use a piece of thin plywood, or acrylic if you like - Just use whatever material you can that will hold the LEDs stable.
MAKING IT (Hey thats a great name for a magazine :-)
I started with a square of fibergless sheet, upon which I measured a
12cmx12cm square. I divided that into a grid that was 13 dots x 9 dots
(which turned out to have a spacing of 1cm x 1.5cm), and drilled starter
holes using a small drill.DRILL HOLES
Then I measured the LEDs, and they were indeed 5mm diameter, so I drilled LOTS of 5mm holes.....Before I started drilling, I was aware that there was going to be a very big mess. There was board material everywhere. I did the drilling outside, and made sure I wore a dust mask.So many little holes....
MOUNTING LEDs
Once that was done, I slid each led into a hole, being careful to make
sure that they were all oriented the same way. A drizzle of hot melt
glue was useful in holding the leds in place. When assembling, I
mounted every second row on the board, and gently folded the leads down
as time came to mount the final sets of rows.
SOLDERING IT TOGETHER
Then I trimmed the leads, and soldered in the current limiting
resistors, and soldered the LEDs together, following the layout diagram
exactly. When you are following the diagram, remember that you are
working on the BACK of the board, so you need to mentally reverse the
layout. Also - don't forget to use 36R resitors (see below) when you
are connected to a set of 3 LEDs and 360R (see below) resistors when you
are connecting to a set of 2 - It alters the current flow to make the
LEDs a uniform brightness.DO I *REALLY* USE 360R AND 36R RESISTORS?
As an update, I have been using Blue Flat Top LEDs, with a forward voltage drop of about 3.3v @ 20mA. The supply that I was using was about 10.5VDC. With the original design, with 2 LEDs, the voltage drop across the LEDs was 6.6v, meaning that 3.9v was being dropped across the resistor (11-6.6). With a 360R resistor, this limited the current to 10.8mA, and with 3 LEDs, the voltage drop across the LEDs was 9.9v, meaning that 0.6v was being dropped across the resistor (11-6.6). With a 36R resistor, this limited the current to 16mA.What I have subsequently discovered is that with supply voltages of 12V, the current through the leds ends up being way too high (15 & 58mA), which is a problem.
In my most recent versions, I have setled on 680R for the 2 Leds and 360R for the 3 Leds, providing 7.9 and 7.8 mA respectively. Much lower current, and still ample illumination.
ADD A RIBBON CABLE
When everything is finished, prepare and solder on the ribbon cable with the 26 way connector.The connector plugs into the controller board. (But I guess you figured that out!)
The photos below should show the process that was used.
To be completely honest, I think next time I will simply use the display board from the first WordClock that I built. Yes, it would mean making another circuit board, but it was so much simpler to make, and the result looks much nicer.
WordClock-Arduino-LED-WIRING.pdf(595x842) 34 KB
Step 5: Make the time changing buttons
Next,
we need to mount a couple of push buttons onto a piece of board
material. I wired some short lengths of wire to the buttons, ready for
connectint to the terminal block on the controller board.
In my case, I used a red and a black button. I found some ribbon cable that had red and black wires, so I used red for the forward button, and black for the backwards, with grey as the common.
Have a look at the photos to show you how the buttons were connected.
In my case, I used a red and a black button. I found some ribbon cable that had red and black wires, so I used red for the forward button, and black for the backwards, with grey as the common.
Have a look at the photos to show you how the buttons were connected.
Step 6: Program the Arduino and test the displays
Next, we need to use the Arduino sketch editor to program the controller.
Open the attached sketch file in the editor, connect the controller using a USB cable, and press the 'Upload' button. This is the cool bit about using an Arduino - everything works just by itself!
The sketch will be transfered, and it should start executing immediately. In this step is a startup animation as a Gif image. This is what the startup should look like. You may notice that there are a few dark LEDS in the picture where all of the LEDs are lit. These are the LEDs that are not connected.
I have included a debug function in the software that prints the time out every time that it is updated via the Arduino serial port, as well as flashing the Digital13 Pin every second. Simply use the Arduino serial monitor to see the time being displayed.
It is important to note that you will not see LEDs lighting up when the controller is being powered by the USB cable, as the LEDs are powered by the external power connection. So to test the unit, lets connect the device to a DC power supply. When the unit is plugged in, every word should light up in sequence, and the clock should start running. If one of the words fails to light up, or part of a word doesn't light, check the orientation of the LEDs, and their wiring.
I brought a set of 500 LEDs from eBay, and was disappointed with an 8% failure rate when I used them. Some vendors are awesome, and others are not. But - they were cheap!
Open the attached sketch file in the editor, connect the controller using a USB cable, and press the 'Upload' button. This is the cool bit about using an Arduino - everything works just by itself!
The sketch will be transfered, and it should start executing immediately. In this step is a startup animation as a Gif image. This is what the startup should look like. You may notice that there are a few dark LEDS in the picture where all of the LEDs are lit. These are the LEDs that are not connected.
I have included a debug function in the software that prints the time out every time that it is updated via the Arduino serial port, as well as flashing the Digital13 Pin every second. Simply use the Arduino serial monitor to see the time being displayed.
It is important to note that you will not see LEDs lighting up when the controller is being powered by the USB cable, as the LEDs are powered by the external power connection. So to test the unit, lets connect the device to a DC power supply. When the unit is plugged in, every word should light up in sequence, and the clock should start running. If one of the words fails to light up, or part of a word doesn't light, check the orientation of the LEDs, and their wiring.
I brought a set of 500 LEDs from eBay, and was disappointed with an 8% failure rate when I used them. Some vendors are awesome, and others are not. But - they were cheap!
WordClock-v1.0.pde12 KB
Step 7: Make the word stencil and baffles
Finally, we need to make the word stencil for the front of the clock.
I used a piece of PCB material, which I etched using the pattern shown below. I simply followed the same press-n-peel process that I used to make the controller board. This time, I intended to use the copper layer on the side closest to the LEDs, but created the stencil the mirror image to what it needed to be - so for this one, the copper is on the outside.
I have on order some 1/32" PCB material which I intend to use. I will be careful to get the stencil the correct way around, (with the copper towards the LEDs), and I expect to have a bright, clear display, and I should end up with much less bleed through than I experienced with the original project, because I will make sure that the copper is on the inside of the display..
Prior to using the display, I cut up some more PCB stock to use as 30 mm baffles, and glued the baffles in place with hot melt glue. If you have used 'FLAT TOP' Leds, then you won't need 30mm high baffles, you can probably get away with 10mm or so. Just hold the stencil over the lit display and move it up and down till you are happy with the illumination, measure the height, and make the baffles that height :-)
Others who have built my previous clock have used acrylic as a display material with cut vinyl as the lettering. That probably looks awesome! In one case, they have used glass!
I used a piece of PCB material, which I etched using the pattern shown below. I simply followed the same press-n-peel process that I used to make the controller board. This time, I intended to use the copper layer on the side closest to the LEDs, but created the stencil the mirror image to what it needed to be - so for this one, the copper is on the outside.
I have on order some 1/32" PCB material which I intend to use. I will be careful to get the stencil the correct way around, (with the copper towards the LEDs), and I expect to have a bright, clear display, and I should end up with much less bleed through than I experienced with the original project, because I will make sure that the copper is on the inside of the display..
Prior to using the display, I cut up some more PCB stock to use as 30 mm baffles, and glued the baffles in place with hot melt glue. If you have used 'FLAT TOP' Leds, then you won't need 30mm high baffles, you can probably get away with 10mm or so. Just hold the stencil over the lit display and move it up and down till you are happy with the illumination, measure the height, and make the baffles that height :-)
Others who have built my previous clock have used acrylic as a display material with cut vinyl as the lettering. That probably looks awesome! In one case, they have used glass!
Wordclock-Arduino-Stencil.pdf(595x842) 23 KB
Step 8: Making a simple enclosure
I
had some spare time before I had to be somewhere else, so I decided
that while the saw was out for cutting baffles, I would make a simple
enclosure.
Before you do anything, remember the basic workshop safety rules - wear safety goggles, keep fingers clear of rotating saw blades, and generally don't be stupid.
I used chipboard, because (you guessed it) there was some in the garrage.
I trimmed the board to a uniform width for the top, bottom and sides. Next I cut the bottom and top to length. Once I was happy with the size of the bottom, I cut a couple of grooves for the display and stencil PCBs to sit in. Then I measured and cut the sides. I glues the bottom and sides together and used chipboard screws to hold them together. Note that I didn't glue the top - you need to be able to remove the top if you want to extract the display or stencil PCBs.
Next, I cut a piece of thin ply as the back. Then I mounted some back supports into the box soI had something to screw the back into. Next, I mounted the Controller PCB, being careful to use washers between the back of the board and the wood, so I didn't put stress on the solder connections.
Finally, I routed the cables through holes I had previously cut in the back, mounted the button board on the back of the case, and closed it up.
WHOOT - It works, and looks great.
Before you do anything, remember the basic workshop safety rules - wear safety goggles, keep fingers clear of rotating saw blades, and generally don't be stupid.
I used chipboard, because (you guessed it) there was some in the garrage.
I trimmed the board to a uniform width for the top, bottom and sides. Next I cut the bottom and top to length. Once I was happy with the size of the bottom, I cut a couple of grooves for the display and stencil PCBs to sit in. Then I measured and cut the sides. I glues the bottom and sides together and used chipboard screws to hold them together. Note that I didn't glue the top - you need to be able to remove the top if you want to extract the display or stencil PCBs.
Next, I cut a piece of thin ply as the back. Then I mounted some back supports into the box soI had something to screw the back into. Next, I mounted the Controller PCB, being careful to use washers between the back of the board and the wood, so I didn't put stress on the solder connections.
Finally, I routed the cables through holes I had previously cut in the back, mounted the button board on the back of the case, and closed it up.
WHOOT - It works, and looks great.
Step 9: Bill of Materials
Here you will find the complete parts list you need to create the project yourself.
Arduino Duemilanove module
ULN2003A Driver IC * 4
4094 Shift Register * 3
5mm red Led * 2
1K Resistor * 4
1N4004 Diode
2 Pin PCB Mount Screw Connector
3 Pin PCB Mount Screw Connector
26 way header
8 way header * 2
6 way Header * 2
16 Pin IC Socket * 7
Controller PCB
5mm blue LED * 117
360R resistor * 25 (can be 680R - see step 4)
36R resistor * 25 (can be 270R - see step 4)
26 way ribbon cable * 30cm
26 way IDC Connector
150mmx150mm fiberglass / perspex mounting board - or Display PCB
Red Pushbutton
Black Pushbutton
Veroboard - 3cm x 2 cm
wire (3 strand) - 30cm
150mm x 150mm single sided fiberglass PCB material
150mm x 30mm fiberglass PCB strip horizontal baffle * 10
14mm x 30mm fiberglass PCB strip - vertical baffle * 10
Hot Melt Glue
12V DC, 500mA Wall Wart Plug Pack.
Bill Of Materials
Controller board
Arduino Duemilanove module
ULN2003A Driver IC * 4
4094 Shift Register * 3
5mm red Led * 2
1K Resistor * 4
1N4004 Diode
2 Pin PCB Mount Screw Connector
3 Pin PCB Mount Screw Connector
26 way header
8 way header * 2
6 way Header * 2
16 Pin IC Socket * 7
Controller PCB
Display board
5mm blue LED * 117
360R resistor * 25 (can be 680R - see step 4)
36R resistor * 25 (can be 270R - see step 4)
26 way ribbon cable * 30cm
26 way IDC Connector
150mmx150mm fiberglass / perspex mounting board - or Display PCB
Button board
Red Pushbutton
Black Pushbutton
Veroboard - 3cm x 2 cm
wire (3 strand) - 30cm
Stencil board
150mm x 150mm single sided fiberglass PCB material
150mm x 30mm fiberglass PCB strip horizontal baffle * 10
14mm x 30mm fiberglass PCB strip - vertical baffle * 10
Hot Melt Glue
Power Supply
12V DC, 500mA Wall Wart Plug Pack.
Step 10: Next Steps
Where to next?
Well, I will continue to be working on the following things in the ensuing months;
1. I have ordered some ATMega168 with bootloader chips from eBay. When they arrive, I will program and install the chip, and recover my Arduino for another project.
2. I will continue experimenting with better display options. The secret is in getting a diffused light to light the back of the letters. Some suggestions have been vinyl cut letters on a sheet of white acrylic or glass. That should be fun.
3. Ideally there should be some way to add battery backup. I would like to add that.
4. Automatically setting the clock. WOW - Here in Australia, we don't have any useful time sources that can be used for automatic clock setting. In the USA and Europe, there are VLF time sources that can be used, but here in OZ, we just have to rely on GPS. That would be a cool addition, a GPS receiver that could get the current time to keep it accurate.
So Many Options! But then, that's what Arduino is about!
Well, I will continue to be working on the following things in the ensuing months;
1. I have ordered some ATMega168 with bootloader chips from eBay. When they arrive, I will program and install the chip, and recover my Arduino for another project.
2. I will continue experimenting with better display options. The secret is in getting a diffused light to light the back of the letters. Some suggestions have been vinyl cut letters on a sheet of white acrylic or glass. That should be fun.
3. Ideally there should be some way to add battery backup. I would like to add that.
4. Automatically setting the clock. WOW - Here in Australia, we don't have any useful time sources that can be used for automatic clock setting. In the USA and Europe, there are VLF time sources that can be used, but here in OZ, we just have to rely on GPS. That would be a cool addition, a GPS receiver that could get the current time to keep it accurate.
So Many Options! But then, that's what Arduino is about!
Step 11: Whats been hapening these last few months....
Update:
As an update, I have redesigned the Arduino clock controller board - I decided that in reality all I needed was the ATMega Chip itself, and that placing an entire module was a waste of PCB space.
I have further updated it to version 3 - supporting a RTC chip, and reducing the size of the PCB.
Here is a photo of the v2 and v3 boards, and an assembly manual, (which I have been sending out with my kits) - That should make assembly easier for anybody who wants to make one themselves.
The new PCB
The new PCB that I designed has larger tracks, and larger pads, making assembly easier. When you look at the PDF, you will see that there are large copper masses 'directly over' existing tracks. Please don't worry - that is normal - it is a ground plane, and the track that it is over is the ground track. All of my boards try to use ground planes so that I have to etch less copper from the board.
Programming the new board:
One Idea I got from EvilMadScience.com, was to use one of their programming cables, instead of using an entire Duemilanove module. It is really cool - you pay $20, and you can use the cable for many many projects - all you have to do is include a trivial programming header on the PCB. The cable is available from: evilmadscience.com/partsmenu/130-usbttl
A New Display PCB
I have been designing a new display PCB - I can etch it on 2 6x6 inch pieces of single sided PCB stock - the neat thing about the new display, is that it gets cut into a set of "LED Strips", with each strip being used to illuminate a word. the spacing between LEDs is about 23mm, so I can use these strips to make BIG WORDS (Much larger than the 6 inch displays i have been making). The clock size that I am making currently will be about 240mm x 240mm for the word plane, set into a total display that is about 320x320, making a really nice wall clock - It will take a couple of weeks, but as soon as I have something more tangible to display, I will put it up here.
I etched the PCB over the Easter weekend, and am looking forward to making a bigger display.
Another side effect of the LED strips, is that you are not limited to English words - we can modify the software for any language, and you can use whatever size strips you need behind words to make the clock work!!!
Updated Software to allow the brightness to be reduced at night
I have modified the software to allow the brightness of the clock to be automatically adjusted based on the time - At 7pm, it will reduce the brightness, and at 7am, it will increase it again - This was to allow the clock to be less intrusive in my daughters bedroom.
Attached is the software that allows that to happen, and Matt Sparks DS1302 library. It is in the file Wordclock-reduced-brightness.zip attached to this step.
As an update, I have redesigned the Arduino clock controller board - I decided that in reality all I needed was the ATMega Chip itself, and that placing an entire module was a waste of PCB space.
I have further updated it to version 3 - supporting a RTC chip, and reducing the size of the PCB.
Here is a photo of the v2 and v3 boards, and an assembly manual, (which I have been sending out with my kits) - That should make assembly easier for anybody who wants to make one themselves.
The new PCB
The new PCB that I designed has larger tracks, and larger pads, making assembly easier. When you look at the PDF, you will see that there are large copper masses 'directly over' existing tracks. Please don't worry - that is normal - it is a ground plane, and the track that it is over is the ground track. All of my boards try to use ground planes so that I have to etch less copper from the board.
Programming the new board:
One Idea I got from EvilMadScience.com, was to use one of their programming cables, instead of using an entire Duemilanove module. It is really cool - you pay $20, and you can use the cable for many many projects - all you have to do is include a trivial programming header on the PCB. The cable is available from: evilmadscience.com/partsmenu/130-usbttl
A New Display PCB
I have been designing a new display PCB - I can etch it on 2 6x6 inch pieces of single sided PCB stock - the neat thing about the new display, is that it gets cut into a set of "LED Strips", with each strip being used to illuminate a word. the spacing between LEDs is about 23mm, so I can use these strips to make BIG WORDS (Much larger than the 6 inch displays i have been making). The clock size that I am making currently will be about 240mm x 240mm for the word plane, set into a total display that is about 320x320, making a really nice wall clock - It will take a couple of weeks, but as soon as I have something more tangible to display, I will put it up here.
I etched the PCB over the Easter weekend, and am looking forward to making a bigger display.
Another side effect of the LED strips, is that you are not limited to English words - we can modify the software for any language, and you can use whatever size strips you need behind words to make the clock work!!!
Updated Software to allow the brightness to be reduced at night
I have modified the software to allow the brightness of the clock to be automatically adjusted based on the time - At 7pm, it will reduce the brightness, and at 7am, it will increase it again - This was to allow the clock to be less intrusive in my daughters bedroom.
Attached is the software that allows that to happen, and Matt Sparks DS1302 library. It is in the file Wordclock-reduced-brightness.zip attached to this step.
Arduino-Controller-Assembly Manual-email.pdf(595x842) 695 KB
Wordclock-Arduino-V2-Overlay.pdf(595x842) 24 KB
Wordclock-Arduino-V2-PCB.pdf(595x842) 61 KB
Wordclock-Arduino-V2-Jumpers.pdf(595x842) 20 KB
0 comments:
Post a Comment