At about $1.08 each in small quantities,
the PIC12F629 is just begging to be used in small and strange projects.
The original yoyo was equiped with 2 LEDs that lit up when the device
was spinning. I decided to add a micro to give it some extra pazazz.
The trick here
is to make the unit work without a power switch. The mercury switch
is positioned so that it supplies power when the unit is spinning.
After about 20 seconds, the PIC shuts down in sleep mode (see
listing). That way, if the switch is still on
when the device is put away, the power can never be stuck in the 'on'
The circuit was designed on a
small circuit board to fit inside caseing. The mercury switch is
mounted off the board to connect to the battery.
The battery shown is a 4.5 volt made out of cells from a 12 volt key-fob
battery (under $1 from Walmart). The battery comes appart into 8
cells. Three of them are put together with heat-shrink tubing.