Step 1: Devil in the Details . . .
Just some notes on the design. If it bores you, skip ahead to the next step.
The Atmel Attiny44v AVR is a 14-pin microcontroller with 4K bytes of flash RAM and 256 bytes of SDRAM. The chip has an internal 1 MHz oscillator, 8 and 16 bit counters, and analog to digital converters. It will run with as little as 1.8V. I used the DIP package and a socket so it can be removed for reprogramming. There are several unused ports available for hackery.
The LED eyes are connected to two ports (PA4/PA5) instead of a port and ground. This allows sending juice either way so we can light up bi-colored LEDs (see schematic).
For both sensors, power is supplied via PA1 only when a reading is needed to save juice. ADC readings are taken on PA0 (IR) and PA2 (visible), each with its own voltage divider resistor (R1 & R2).
An IR LED and current limiting resistor are connected on PA3 so it can be lit separate from the eyes.
Sound is generated on PA6 using pulse width modulation from the 16-bit counter and a piezo-electric speaker.
Power is from a CR2032 lithium coin cell which is the cheapest, easiest to find 3V source I could find. From Digikey they are about $0.28. Why they sell them in the store at $4 is beyond me. I included a 0.1uF capacitor to remove noise. It is optional.
A normally open push-button switch is connected to PA7 and used as a pin change interrupt to change modes or power down.
Nothing too terribly tricky or clever. Remember, I’m a beginner. This is my first design. Let’s see if we can build one . . .