Microcontroller connect a Relay

Ohh.. Dear, look! I got an idea to automate my water tap valve.
I got this crazy goal in mind, just too lazy to pour water to
my many fruit-on-pot-plants. After did some research, **Ding**.

I now come up with an abstract sketch, a microcontroller (Atmega8)
a relay (HKE 12V, NC-NO, 230V 6A, 230V 10A) and 2 electric PVC
valves (SANKING, 3/4" - 3/4") would do, well if i am not too lazy,
the 2 valves could be minimized to just 1. But lets skip the
optimization, since it is an evil, so i bought these materials with
the diode and transistor refer to this.
Actually i already have this Atmega8 along with the USB Programmer

the K-125R.

Ok first-thing-first, i have to drive the relay... **BUMP**
The problem begins, i am a total newbie in electronic things.
And got this huge goal, never mind.. calm down.. internet is
a best friend.

Finally got this as my reference. Lets do it! i connect the coil
points on my breadboard. This is how i arrange it in minimum
configuration just to see, actually hear, the relay switching..

**Click** Yeah! As you could see in the video that the relay
still active even that i switch my DC power source down to 4.5V
and not below that. So i think the relay would still working
if the power source set to 9V as my atmega8 requires 9V to
operate (well the LM7805 step it down to 5V though)

*) Edited :
I know this is an old post. But to clarify that the Relay does not work
if i power it up with 4.5V of high-end power supply. In the video
my PSU was set to 4.5V but when i check it with my digital meter
it shows 8.1V, so this is PSU failure.

Well that is the relay part, will share the experience to
drive the electric valve in the next article.

Happy electrifying... ^^