Fun Hackable Speaker Timer
This is a fun speaker timer I made for some upcoming conferences. It uses a 4-digit charlieplexed LED (pseudo 7-segment) display and is driven by a AVR ATMega328 or an Arduino. It allows a default time to be set, can be paused, and will put out 5 Volts on several IO lines when 10, 5, 1, and 1 minutes are remaining. This allows for some fun (say firing up a NERF rocket launcher as you get closer to quitting time).
This is a fun and cheap project that makes use of AVR interrupts. If you are interested in using interrupts with the AVR this project is a good tutorial.
Step 1: Getting Parts
Step 2: Layout the LED Board
The first thing we want to do is create our LED board. We are essentially creating a large 7-segment display using 2 LEDs per segment versus buying an actual 7-segment display this size which would be very pricey. The display is symmetrical so you will want to figure out the distance you want between one side of each digit and the other and then use that value for the spacing of the 3 horizontal segments as well. It may help to draw boxes for the digit segments and then mark the LED locations on each side of your squares as 1/3rd of the square length in from each edge. See the pictures. One of the big time savers in this project is putting the LEDs close enough together that you can twist the leads to create a common connection. Don’t make your display so large that this doesn’t work. If you do use a large display, you might want to increase the number of LEDs as well. I used about 1.5″ spacing.
Once you have everything laid out and double checked, I recommend you use a very small drill bit to drill the initial pilot holes. The nice thing about using a small bit is that even if you are off a little, it will likely not be noticeable in the final project. Now you can drill out the full size holes and get ready to start inserting LEDs.
Step 3: Install LEDs on board
Now that you have your holes drilled in your LED board you are almost ready to install the LEDs. You may want to clean up the holes a bit first depending on the material you selected. LEDs are polarized so it does matter which way they are put in. The longer LED is positive. Also, if you feel around the circumference at the base of the LED the negative side is flat. The timer uses a method known as charlieplexing in order to light up all these LEDs using only 8 wires. While it is theoretically possible to drive this with only 7 wires, I chose to use 8 because it made the wiring simpler which was my primary goal all along. I won’t describe charlieplexing here, but there are lots of articles and tutorials available on the Internet.
The following diagram comes from the C source code file. If you have questions about this project, look there first for answers. If this diagram looks messed up in your web browser have a look in the source file main.c.
/* Each 2 LED segment is activated by applying +5V to one line, grounding another and setting everything else
* to input (high impedence or an open circuit).
* The following diagram shows a REAR VIEW of my board so be warned the leftmost
* digit is the least significant.
* ^^ LED with circuit symbol pointing up (+ on bottom – on top)
* << LED with circuit symbol pointing left (- on left + on right)
* >> LED with circuit symbol pointing right (+ on left – on right)
* ## LED with circuit symbol pointing down (+ on top – on bottom)
* numbers refer to the charlieplexing line (note 0 runs around the the perimeter)
* 0 | | | | | | | | 0
* 0 ^^ ^^ ^^ ^^ ## ## ## ## 0
*0 –>>–1–<<– 3 –<<–4–>>– 2 1 –>>–4–<<– 3 –<<–6–>>– 0
*0 –>>-/ \-<<– 3 –<<-/ \->>– 2 –>>– 1 –>>-/ \-<<– 3 –<<-/ \->>– 0
*0 ## ## 3 ## ## 2 1 ^^ ^^ 3 ^^ ^^ 0
*0 –<<–2–>>– 3 –>>–5–<<– 2 –>>– 1 –<<–5–>>– 3 –>>–7–<<– 0
*0 –<<-/ \->>– 3 –>>-/ \-<<– 2 1 –<<-/ \->>– 3 –>>-/ \-<<– 0
0 ^^ ^^ 3 ^^ ^^ 2 1 ## ## 3 ## ## 0
0 | | | | | | | | 0
Double check the orientation of each pair of LEDs as you insert them. Once you have completed a digit you can twist together the leads in the centers of the 8’s. Just a couple twists is good. Don’t get too crazy or you might break some leads. After all the LEDs are installed, you can install the 8 charlieplexed lines numbered 0-7. Note there there are a couple of jumpers that will also need to be installed to connect clusters of the same number together. See the pictures if you are unsure. I would highly recommend numbering the wires with masking tape, at least until you get everything put together. Solder the connections together then trim any excess leads.
For more detail: Fun Hackable Speaker Timer