In this instructable I will show you how to make a scrolling LED display and how to install it in a hard hat. It also plays pong!
Step 1: Materials
-2 10k potentiometers
- 3 4.7 kOhm resistors
-4 SPST toggle switches
-1 5x7 bicolour LED display
-1 8 pin dipswitch
-1 atmega168 microcontroller (or arduino)
-1 28 Pin 'skinny' socket
-1 3.7V lithium polymer battery
-Hot Glue Gun
-Plexiglas Cutting Knife
- Microcontroller Programmer (optional)
Step 2: Solder the Display
For the next step I used switch 8 for a 'travel mode'. This is so the hat isn't accidentally turned on in a bag and drained.
Step 3: Solder the Power Connections
Step 4: Attach the LEDs to the Board
Step 5: Solder Switches
For each switch, it is one contact of the switch connected to the corresponding microcontroller pin and the other to the positive voltage. There is also one resistor from the input pin to ground for each switch.
Step 6: Solder the Potentiometers
What side you solder the positive and negative lead on matters, it affects what way you turn the pot to move the paddle up or down. The best way to figure what side to solder it to is to solder the positive lead on the bottom when the 3 pot leads face the display from the side they will be mounted on. Or just guess and change it later.
This is also a good place to solder the speaker, attach one side to pin 15 on the microcontroller and the other to ground.
Step 7: Program the Microcontroller
Load the program attached to this step (or in the intro) onto the microcontroller (the .hex file in the applet folder can be loaded onto the microcontroller in place of the bootloader). When burning the bootloader, set the chip to use the 8MHz internal crystal, unless you want to use an external crystal (the extra speed isn't really needed). If you do re-compile the code be sure it is at the correct clock speed for what you will be using.
Once it's programmed, put the chip into the socket on the breadboard.
Step 8: Testing and Debugging
If it didn't work, I'll try to give some debugging tips:
if a line is missing from the display, it is a loose connection or a shorted wire.
is nothing is happening, first check the power and the switches. If it is getting the proper voltage and still doesn't work (and the chip is plugged in the proper way), test all of the components one by one.
If it powers on, but the screen isn't displaying properly, ensure that you have the proper type of display, 5 cathode rows and 7 anode columns (the labeling of the rows and columns can vary from data sheet to data sheet).
If it still doesn't work, leave a comment and I will try to help.
Step 9: Operation
In display mode it will show UOIT (my university) and if you flip switch 3 it will show ERTW (bonus points of you figure this one out).
In Pong mode, turn the potentiometer to move the paddles. Flip switch 2 to change from 1 player to 2 player and if you are finding it too easy, flip switch 3 to speed it up.
Step 10: Prepare the Hat's Display Hole
Start by tracing a template of the display and cut it out. Tape the cut-out to the hat where you want the display to go, then trace it with the hobby knife. Be vary careful at this part, it is easy to slip when cutting hard curved surfaces. Now with the outline on the hat, take the plastic cutting knife and trace along the lines until you poke through. Now finish the hole by cutting out the remaining joining plastic with the hobby knife.
Step 11: Drill the Switch Holes
Start by making small Xs, one for each switch and accessory. Tape these to the helmet with the middle of the X where you want the hole.
Now select the appropriate drill size and drill each hole.
Step 12: Finish the Hat
All that is left to do is show it off!
Since you've read this far, you must be at least interested, so please rate it!