Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Both are good methods as long as you add a diode across the relay coil as well.
Q1 needs a voltage of Vbe above ground to turn the relay on and Q2 needs a voltage of VCC-Vbe to turn it on. Otherwise they work identically.
Depends on the application. In general I prefer the NPN because it can be driven directly by a logic output. And the VCC of the relay can be higher than the logic level. For example you can control a 12v, 24v (or more) relay with a TTL output.
The PNP is useful when a High side driver is required. It needs an extra transistor or an Open collector output when the VCC of the relay is greater that the logic level. That transistor or OC output should withstand the VCC of the relay.
Dont forget the protecting diode (as mentioned by betwixt) and the resistors at the base of the transistors.
Also notice that one is inverting and the other is not.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.