Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Real simple way to test.
With the AVR out of circuit, with a bit of wire bring the base resistor to GND (relay off) then to 5V (relay on)
If that doesn't work your transistor is either dead or incorrectly wired.
The emitter should be 0V (ground), sounds like there's 5V on it for some reason.
DON'T HOOK 5V STRAIGHT TO THE BASE! You will burn it out.
You might want to try a 2N2222 transistor instead. The relay pulls 100ma or so, what you're using is an audio drive transistor.
The transistor is wired backwards.
You have the transistor connected like a European BC548 but you are using an American Fairchild transistor that has the collector and emitter pins reversed.
Look at the pins in the datasheet the next time.
Measure the current through the relay hooked straight to 12V and tell us what you get.
Then your 1N4004 or relay coil is shorted.
A transisror that drives a short circuit gets extremely hot.