Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to use transistor(2N3906) to turn on relay?

Status
Not open for further replies.

babboy12345

New Member
my output from microcontroller's is around 2v,so it cannot to turn on my 5v relay.By using PNP transistor,can i get it on by transistor? please provide me the circit diagram and the resistor value,thx
 
If your PIC has a 5V supply then its output voltage is 5V when the load current is low.
It can drive the base of a PNP or an NPN transistor through a series current-limiting resistor.
 
As what u say,so what value of resistor should i put at my PORTB ??
Use 330 ohms to limit the current to 10mA. Then the relay's coil can be as low as 50 ohms.
Use a reverse-connected diode in parallel with the relay's coil to clamp the high voltage spike it will try to produce.
 
I would start with a 1k resistor to save power in case you need it for other I/O lines. If the transistor gets hot try the 330ohm one, but PIC's have a limited maximum amount of current for the whole chip, and all those ma's add up fast. Ideally you want a resistor that will be JUST low enough to put the transistor into saturation for the coil load, if you tell us what transistor you're going to use what the relays primary coil resistance is we could give you a more specific resistor value to use.
 
From the title I would assume the transistor is a 2N3906... :)
 
<cough> You might be right mike.
 
To minimize the load current of the MCU you could use a low power MosFet BS170 (N-channel) or BS 250 (P-channel).

They require extremeley low gate current (compared to a bipolar transistor) to conduct fully.

Boncuk
 
To minimize the load current of the MCU you could use a low power MosFet BS170 (N-channel) or BS 250 (P-channel).

They require extremeley low gate current (compared to a bipolar transistor) to conduct fully.

Boncuk
With the caveat that these MOSFETs are just barely ON with a 5.0V gate voltage. They should usually be OK with a light load and the full 5V Vcc, but it Vcc is less than 5V (e.g. 4.5V) these MOSFETs aren't guaranteed to turn on.
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top