2-sided POV Toy
i've spent the last few months working on a persistence of vision (pov) circuit for a bike wheel. this is my first foray into electronics and micro-controllers so, while it works, it's a bit of a hack. in fact, you might just want to skip on down to the "things to fix" section.
the project is based on two of lady ada's plans for pov projects, the minipov and spoke pov. the minipov uses only a single pic16f630 while the spoke uses an amtel micro-controller, an eeprom, and several 74x259 8-bit latches.
i wanted to enhance the minpov to display text on both sides of the bike wheel. i chose to use microchip's pic because they sold a cheap programmer and i had lady ada's working source code. the biggest challenge with displaying text on both sides of the wheel each side needs to read from a different end of the string. if you're displaying ABC the left side needs to start at C and the right side needs to start at A. that meant i needed 16 outputs, four more than the 16f630 has. to work around this i used an 8-bit addressable latch for each side.
the minipov project uses a simple bitmap to determine what to output. i wanted to have separate bitmaps for each character and link them together in a string. i started by modifying the minipov to use two jump tables. the first selected the character from the string, and the second returned individual lines in the character. once that was working, i started trying to figure out how to read it backwards. i wasn't able to think of anything cleaver so i decided to throw memory at it. i duplicated the code in and reversed order.
i went through a hell of a time finding the proper LEDs for this. trying to find bright LEDs that had a wide viewing angle and didn't cost a buck each was hard. i probably ordered ten different kinds from digikey. the ones below are 1500 mcd with a 70° by 40° viewing angle and only cost about 30 cents each.
parts list
| description | quantity | supplier | part number |
|---|---|---|---|
| PCB board | 1 | advanced circuits | custom order |
| PIC16F630 8-bit PIC microcontroller | 1 | digikey | PIC16F630-I/P-ND |
| 14-pin IC socket | 1 | digikey | AE7214-ND |
| 74HC259 8-bit addressable latch | 2 | digikey | 296-8291-5-ND |
| high brightness LEDs | 16 | digikey | 160-1620-ND |
| 3 volt lithium battery with soldering tabs | 1 | digikey | P201-ND |
| SPDT slide switch | 1 | digikey | EG1901-ND |
software
the PIC assembly code is attached below. to assemble it you'll need microchip's mplab IDE or the gnu PIC tools. you'll need something to program the PIC with. i threw down the $30 for microchip's pickit 1 flash starter kit.
hardware
the board layout was done using cadsoft's freeware version of eagle. you can download the board and schematic files below.
things to fix
this is the first board i've ever designed so i made plenty of mistakes :
- i didn't label the board with orientation information (i've corrected this in the version posted here).
- i forgot to put resistors inline with the LEDs. this hasn't been as big a problem as i would have thought because they're being pulsed and because cooling isn't a problem.
- i didn't put a switch on the board forcing me to put it inline on the power cable.
in the next revision i've got several things i'm looking at changing:
- putting a momentary contact switch on the board and having it put the pic into sleep mode.
- adding a hall effect sensor and magnet to determine the speed of the wheel ala the spoke project.
- moving to a higher end pic with more flash space or using an external flash rom chip.
i'll get some more photos up here when i'm making the next set of them.
update: stoked. i got linked to by hack a day. my 15 minutes of internet fame begins.
another update: people have emailed to ask me if i plan to sell these either assembled or as a kit. i do not. my feeling is that you shouldn't sell something unless you can stand behind it. this project is really just a prototype put together by someone who hadn't used a soldering iron since he was 12 years old (i actually had to go down to fry's and buy one). i'm learning it as i go. i was inspired by lady ada and the whole make crowd to stop staring at other people's cool projects on the internet and start making my own.










Spoke POV auto power down
This is an email I got that I wanted to share:
MOSFET ---------- -----------------Power for the | | | spoke POV | ------- BATTERY --- ----- | --- |------------------ ----- | "BUMP" | --- | SWITCH | | o | \ NPN transistor | | | C\ | |-| \| GND | | |__B____To an output o | | of the PIC | /| | E/ | / GND | | GNDNot shown (Because of my impatience drawing with
dashes) are some pull up and pull down resistors, and
some other stuff that I found makes it more reliable.
Anyways, the idea is that the homemade bump switch (or
whatever you call it) will momentarilly pull the gate
of the P channel enhancement mode MOSFET to ground,
which will turn it on, which will power up the Spoke
POV. As soon as the micro powers up, it will put a
high signal on the base of that NPN guy, which will
then keep on pulling the mosfet's gate low even though
the bump switch has long bounced back open.
Not shown also are some resistors that isolate the NPN
BJT from the switch so that the switch's state can be
polled by the PIC.
When the micro decides is a good time to power itself
down, it simply removes the high level voltage from the
base of the BJT and the gate of the MOSFET is pulled
high by an invisible resistor.
Let me known if it works,
Kevin