Mini-POV Hat

by cheeto4493 in Living > Halloween

14745 Views, 28 Favorites, 0 Comments

Mini-POV Hat

IMG_4464.JPG
IMG_4461.JPG
IMG_4463.JPG
I took the schematic and theory of a MiniPOV2 and adapted it to make a hat for Halloween. It is basically the same circuit as a MiniPOV2 but with a few different components to make it fit the hat better. As usual, I never take the time to document things as I'm building them. I'm just too excited to get the project built. So what you'll see is a retrospect of what I did, and some changes in what I would do again.

Items Needed

Parts these are what I used, but yours may vary depending on what you scrape up.

ATiny2313 www.sparkfun.com

20 pin socket

8 LED's (I used the mini T1's, but probably just about any would work. Make sure they are all the same, I raided mine out of novelty toys and my junk bin and some are brighter than others)

8 100ohm resistors

2032 battery holder and battery

PC mount switch

Fine enameled wire like what is used in hobby motor coils. That is where I got mine, tore apart an old non-functioning motor

Stiff wire I used .025" music wire, but in hindsight I needed something bigger, like a thin clothes hanger

Heat shrink tubing or electrical tape this insulates the LED's from the wire, and contains all the thin wires together in a bundle.

Perf board about a 1-1/4" x 3" piece

5 pin header optional, but I don't have to pull the chip out to change signs

Small hobby motor I couldn't find any specs on the one Ii used (found it in my junk box of motors) I think it was originally meant to run on 6 or 12 volts, because at 3 volts it only pulled about 20mA, and runs fairly slow, which is good.

2 "AA" battery holder with switch, or separate switch

Tools
Soldering iron
solder
Hot glue gun
tweezers
pliers/wire snips
small needle nose pliers
super glue
Dremel (optional but makes cutting perf-board easy)
small drill bit the size of the motor shaft "mine was 5/64"

Making the Light Wand

IMG_4475.JPG
IMG_4476.JPG
IMG_4491.JPG
IMG_4492.JPG
This is the part that spins around the hat carrying the LED's. I used .025" music wire from the hardware store to make the frame, but it was too weak. When it spins around the centrifugal force bends the wire out of its normal shape. A thin clothes hanger might work better, as long as its thin enough to pass between the leads of the LED's with heat shrink tubing or electrical tape around it to insulate the LED's

Cover about 2 inches of the end of the wire with heat shrink or electrical tape, and then push the LED's over this. (I used a pick to punch holes in a piece of card stock to help space the LED's and hold them in position. Make sure they are all oriented the same direction with the negative pins all on one side. I used super glue to help hold the LED's in place while getting everything soldered up. But be sure not to breathe or get the Super glue fumes in your eyes when soldering. Use good ventilation.

Bend the negative pins over and solder together, attach one wire to the end of this. This will be the common ground point for all of the LED's Make sure to keep this wire separate from the rest. I left mine about twice as long as the others.

Attach one wire to the positive side of each LED. Make sure to scrape off the enamel to get a good solder contact. Leave about 12" long or so, you don't want this to be too short.

Test that each LED lights when batteries are connected to the wires. And then fill in around the LED's with hot glue to hold them in place and to help protect the wires.

Making the Circuit Board

IMG_4479.JPG
IMG_4495.JPG
IMG_4480.JPG
Arrange the battery holder, switch, socket, and resistors on the perf-board for the best fit.

I basically used the circuit off of Ladyada's minipov2, http://www.ladyada.net/make/minipov2/hardware.html, except instead of using the programming connector and resistors in that circuit. I used this programmer instead.

I made a jumper that went in between the standard 10pin DAPA programming cable, and the 5 pin header on the board. I got by with using only 5 pins, because I used the internal battery to power the chip during programming.

Mounting the Motor and the Circuit to the Hat

IMG_4483.JPG
First of all you need a hat. I got a cheap $2 plastic derby from the Halloween store. I was originally going to buy a top hat, but changed my mind. Find one that fits well. Mine is actually too small and only sits on top of my head. It actually fits my wife better, but there is no way she is going to wear this crazy contraption.

Find the center of the hat. Luckily mine had a molding mark on the inside, so it was easy to locate.
I also had some very tiny screws that would fit the 2 mounting holes of the motor, so I took a stiff piece of black plastic and drilled mounting holes in it. I hot glued this over the center of the hat on top. (Hot glue is your friend, it hardens very quickly, just keep it off your fingers when hot ;-{ ).

I then attached the motor to this and then ran more hot glue around the motor to make sure it doesn't work loose. mount the switch and the battery holder inside as well. Make sure you leave room for your head.

I found the best place to mount the motor to the circuit board was right under the resistors. There were no wires there, so nothing to get in the way. I cut and super glued a scrap piece of perf-board in this area to build up the thickness, and make sure the motor shaft had a good place to sit. Use the drill bit to enlarge the hole in the perf-board big enough that the motor shaft fits snugly.

Mounting the Light Wand to the Circuit Board.

IMG_4496.JPG
IMG_4497.JPG
Decide how high the lights are going to be on the side of the hat, and then form the wire to the shape of the hat. Be sure to use the front or back of the hat, due to the hat being oblong. With the circuit board temporarily mounted on the motor shaft, measure, mark and cut the stiff wire to the correct length.

Thread the enameled wires and the mounting wire through shrink wrap tubing, or wrap with electrical tape. Then bend a small hook in the end of the wire at it catches in the holes in the perf-board and keeps it from pulling away when spinning. attach the loose end of the wire to the perf board with some scraps of wire threaded through the holes. and then hot glue in place.

Use a battery to check which enameled wires go to which LED, and then thread them through the top of the board and solder underneath to the appropriate resistor. NOTE: bottom LED attaches to pin 19, top LED attaches to pin 12. When all wires are soldered in place cover the wires and board in hot glue to keep everything in place and to keep the delicate enameled wires from getting snagged.

Once everything is in place, you need to balance the rig as best as you can. If it's not balanced, your hat might just vibrate off your head, or worse fly apart and hit someone admiring your creativeness. Use more hot glue to attach weight where needed. One great thing about hot glue is that you can reheat it to move the weight around. If you end up using a coin, just hold your soldering iron on it until is starts sliding on the glue. Just make sure the metal coin doesn't short out on the resistors. Once everything is balanced, apply superglue to the motor shaft to permanently attach it to the circuit board.

Programming the Chip and Fixing the Timing

code.gif
I wanted the letters to be nearly proportional, so I did the math, found the circumference that the LED's traveled, divided out the distance by the height of the LED's and found out I could have 133 columns of text.

I use this software to generate the code for the text.

Download and install WinAVR so that you can see the C source code of the MiniPOV2 and edit in your own sign.

When I first got the program downloaded into the ATtiny2313, and spun it up, it was so COOL. The only problem was that the motor was spinning to fast for the text. You'll have to go into the code and adjust the part that says "OCR1A = (uint16_t)1000;" and adjust the 1000 to what best suits your motor, and tastes. I had to adjust mine to 1200 to make it slowly spin.

Video of the Hat.

Here is a video I took, in several lighting conditions. I apologize for the bad camera work, and not editing it. I don't do videos very often, and don't have the software installed to do it properly.


I didn't notice the text spinning around that fast when I took the video. Normally it just floats around slowly. I don't know if it's the camera, or if it was low batteries in the motor part (I took the better batteries to put in the camera, and grabbed some used ones off of my desk).

Made a second video. Downloaded full height fonts so the text is bigger, Also changed out the batteries for the motor.