i have output (5V)DC from microcontroller pic18f but i need to connect it with electric lock need (12V)DC to work(open )..............how can i make (5V)DC output from pic to (12v)DC
Be carefully in using this circuit, check if the outport port that you can think to use is a open collector type, otherwise put a resistor in series to the transistor base in order to limit the transistor base current.