First off, employing an ATMEGA32 for basically a two discrete output food dehydrator is absurd. But a couple years ago I modified an existing project on a breadboard to 1) turn on a lamp for five minutes, 2) turn off the lamp, and run a fan for five minutes, 3) repeat indefinitely. This worked great for drying my homegrown hot chili peppers; the lamp heats the peppers, the fan blows and cools. (I could have bought a better appliance, but this was more fun.)
Wanting the breadboard back I recently undertook building a permament solution. Two output pins drive two separate relays via NPNs; one relay connects a 500ma PC fan to 12V, and the other closes a 120V outlet to a lamp. Snubber diodes included as well as a couple buttons and LEDs for debug and funzies.
I use a prototype board with scads of 5-holes connected with conductor. Lesson1: next time mount the components from the underside so the terminals can be soldered onto the conductor. I've had some more expensive boards with conductor extending inside the holes, but this didn't have that.
Since the fan consumes 500ma, the relays about 100ma each, I used a 12V/1.2A wall wart (7805 for 5V to AVR). Initially, when the power was applied, the fan would attempt to turn, apparently draw too much current and reset the AVR. It would click/reset about 20 times and finally start up. Lesson2: I replaced the cap between Vcc and Gnd with a beefier electrolytic, and added one to the 12V supply. Clicking/resetting gone.
I put a fuse inline with the AC powered lamp, added a power switch, all in a notebook sized metal enclosure. Been running for several hours. Of course I won't need it until next Fall when (hopefully) the habos will be ripe!
While overkill, the code (C++) will serve as a basis for upcoming projects. Rough schematic as shown.