I've tried all the advice give, with no joy, BUT I think I found the problem
The +12V I'm using is coming from a source which I don't any control over. It's part of an existing power supply which is a given, and not something I can change. I discovered that as soon as the relay try to operate, the +12V drops to +9.2V, which is not sufficient to operate the relay, and that is why it's working when I replace the Relay with LED's , because the LED's don't use as much power as the Relay. So, the circuit is working with LED's but not using the relay. This relay uses about 1.2A (1200ma) to operate, and the existing 12V source can only handle 300ma, and this is where the problem comes in.
I'm busy building an irrigation computer where each of the 32 output ports of the AT89S52 will drive a 12V Relay, which itself switch through 220V/5Amps on the relay contacts.
My other option is to use a SCR i.e C106D which i can connect to the AT89S52, and which can switch through th2 220V 5Amp. From what I understand about SCR's - NEVER worked with them before - is that the microcontroller will be able to switch it on/of as it requires very little Amps to the gate to be able to activate/deactivate it.
Question: Like I've said, I never worked with SCR's before. What can be used between the AT89S52 and +5V (p0.0 is ON when it is at a low) that can operate from the +5V, and also be able to switch through about 5A for the irrigation pumps ? SCR or triac or Thyristor ? I don't know what is the best option to be able to google it myself
Any feedback highly appreciated
Kind Regards