Throbbing Apple Logo Sticker using PIC10F206 microcontroller




Throbbing Apple Logo Sticker

This little gizmo adds the iconic “sleeping Mac throb” to an ordinary Apple logo decal.
Throbbing Apple Logo Sticker
The idea for this came about when passing by the Apple Store in Palo Alto, California late one night. After hours, when the store is “asleep,” the lighted logos out front pulsate just like the power indicator on a sleeping Mac, and I just about fell over laughing. Unrelated, the following day a friend showed me his new Toyota Yaris, an adorable little economy car whose resemblance to the original “jelly bean” iMac was made even more apparent by the Apple logo decal he’d placed on the back window. The two just screamed to be combined…

Step 1

The Device

Throbbing Apple Logo Sticker 1

I’d been trying to cook up any sort of simple project using one of Microchip’s PIC10 microcontrollers, a minimalist programmable device costing less than 70 cents apiece. Just a few parts are required:

– The microcontroller itself. In this case I used a surface-mount PIC10F206 as it’s what I had on hand, but just about any simple microcontroller will do provided you have the facilities to program it.
– A white LED. I’ve made throbbers using both surface-mount and 3mm through-hole varieties.
– A 3 volt lithium coin cell (CR2032 in this case).
– Battery holder.
– Circuit board to contain the components. Since I was using surface-mount parts, I opted to etch something for the occasion. If using through-hole components, the design is simple enough that a small piece of PCB perfboard with wire jumpers is likely sufficient.
– A clear rubber suction cup; pack of six from local hardware store.
– Glue of some sort. Hot-melt glue, silicone adhesive or cyanoacrylate “Krazy Glue” should all work fine.
– Apple logo decal adhered to a clear glass window.

Two components that typically appear in microcontroller and LED projects are conspicuously absent: there’s no current-limiting resistor for the LED (the lithium watch battery used is intrinsically limited in current), and there’s no decoupling capacitor across the microcontroller’s power leads (simply wasn’t needed in this noncritical application).

Step 2

The Code

Here’s the PIC assembly source code for the project.

The intensity of the LED is varied using pulse width modulation (PWM). Other Instructables and tutorials elsewhere already cover this in much better detail than I could. No offense intended in suggesting searching around elsewhere if you’re not yet familiar with the theory.

The PWM duty cycle does not ramp up and down linearly. Gamma correction creates an exponential ramp that the eye perceives as a near-linear increase in brightness. Because I’m lazy and because so little program space was being used, rather than work out an exponentiation function I simply have a big table of precomputed gamma-corrected values. The PIC10F206 had enough space to contain this table, but a more constrained device might not have this luxury and actual math code will be needed.

One pin from the PIC (GP2) is used for output. This pin was chosen as I might later decide to use this chip’s comparator function (available on pins GP0 and GP1) to detect nighttime or shade and enable the throb only when sufficiently dark. As it is, the device just throbs endlessly when the battery is installed, regardless of environment. The exponential PWM duty cycle means the LED is off most of the time, and a fresh battery can run the device continuously for a couple of weeks.

For more detail: Throbbing Apple Logo Sticker using PIC10F206 microcontroller




Current Project / Post can also be found using:

  • microcontroller based battery charger
  • battery supply for pic12
  • battery 12 v charging circuit pic ic programing
  • smart car battery charger micro pic

Leave a Comment

*
= 4 + 0

Read previous post:
Augustus’s Lab Notebook using pic microcontoller

Week 01 January 10, 2012 (1 hour): Met as a team after class to discuss preliminary project proposal. January 12,...

Close
Scroll to top