Halloween Spooky Eyes Decoration


Halloween is coming up, and we wanted to create a simple LED contraption to add eyes to Halloween decorations.

Here's the result:

To get it up and running quickly, we started with our null decoration and it's source code. There aren't that many connections, so starting with just a bare ATTiny13A chip and a perfboard is pretty simple too.

The microcontroller is an ATTiny13A, which has two PWM-capable outputs, just the right amount for adding two LED eyes!

The timer that switches between pattern has been set to use the built-in watchdog timer, which fires an interrupt around every 5 seconds.

Here's the schematic:

Source code available at Github.

Parts list:

  • 1x Attiny13A microcontroller, DIP-8
  • 2x LEDs
  • 2x 500 ohm (depending on the kind of LEDs you use and your desired brightness)
  • Wire and hot glue to mount in a case of your choice
  • A battery box (2 or 3 AA or AAA batteries, make sure to not use more than 5V)

Here's the PCB with IC socket and resistors mounted and wires attached to the LEDs.

This is the decoration we're modifying. It's a cheap decoration from the local dollar store.

The wires of the battery holder are soldered directly to the PCB:

The breathing pattern is based on the code here.

Suggestions for improvements

  • The breathing patterns for the LED can be modified to be smoother.
  • Clever use of sleep mode could reduce power consumption a bit (although most of the power draw is from the LEDs)
  • The LEDs don't turn off completely when the PWM duty cycle is set to 0. This is simple to fix, but we ran out of code space so we left it for now.