I am trying to build an automatic plant watering system using ATmega16. We are using moisture sensor for our project. The circuit diagram is as follows:
We are using the following 12V relay:
I have no experience of using relay. How I will connect the relay across D1 as shown in the circuit. I mean which pin of relay (there are 5 in total) will be connected to the two terminals of the diode as shown in the above figure and which two pins will be connected to a dc motor so that I can drive a dc motor. And how will I test the relay is working properly using multimeter (before connecting the motor) when I am getting 5v or 0v from PC0 as output?