I use 12v relay in this circuit which is activated by controller 8051.controller o/p is given to base of transistor BY BC547 .i use base resister of 2.7k.but relay was not on.
only transistor was on.but when i gave 12v supply from directly lm317 to base of transistor then relay was on.
why?
if you have the transistor in common collector mode then there is no voltage gain - The controller is supplying 5V? You need to have both voltage and current gain.
Do you understand 8051 port operation? They are open drain with or without a weak pull-up (depends on the port). None of them is sourcing sufficient current to drive a NPN switch transistor without additional pull-up resistor.