Continue to Site

Welcome to EDAboard.com

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.

uC sourcing relay, a single darlington transistor or something else?

Status
Not open for further replies.

peterpops

Junior Member level 3
Joined
Mar 17, 2010
Messages
26
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Sweden
Activity points
1,492
Hi EDA!

I want to switch a relay with my uC. What options do I have? I'm new to transistors (and electronics in general =])

I'm using a PIC18F4550 and the relay I want to switch is a V23026A (TE-Connectivity).

1. I guess I can use the uC directly to switch the relay since it is possible to source/sink a current up to 20mA and the relay needs around 5V/330Ohm = 15mA. In this case do I need any protective circuits and is there something I should have in mind?

2. A friend told me I can use darlington transistors for this. Is there a unit which has all protective circuits already include in the package? or do I still need some discrete components?

3. Is there another simple way to do this? MOSFET? Again any protective circuits needed for this?

I don't want something big because I'm running out of space on my PCB.. because when I search for Darlington transistor I find a Darlington array ULN2803A with 6 and 8 outputs with all the protective ciruits included. But I don't have need for the other 5 or 7 outputs.. Can't find an equal single darlington with the same protective circuits include

Thanks in Advance!
/Peter
 

Although the values doesn't exceed the absolute maximum ratings, there's no guaranteed maximum voltage drop for PIC IO-pins with 20 mA load current. An external driver is recommended.

The standard solution is a BJT transistor (no darlington because it has too high voltage drop for a 5V relay) with base series resistor or a MOSFET, together with a freewheeling diode.

You can save the freewheeling diode by using a BJT in common collector circuit, provided the 5V supply doesn't drop more than 5%, you get sufficient margin above the required 3.75 minmal relay pull-in voltage.
 

Although the values doesn't exceed the absolute maximum ratings, there's no guaranteed maximum voltage drop for PIC IO-pins with 20 mA load current. An external driver is recommended.

The standard solution is a BJT transistor (no darlington because it has too high voltage drop for a 5V relay) with base series resistor or a MOSFET, together with a freewheeling diode.

You can save the freewheeling diode by using a BJT in common collector circuit, provided the 5V supply doesn't drop more than 5%, you get sufficient margin above the required 3.75 minmal relay pull-in voltage.

So the BJT does not need a freewheeling diode? Or do both BJT and MOSFET need a freewheling diode?
What is the purpose of the base series resistor?

I'll look up thet common collector circuit

Thanks FvM
 

Hey again!

Don't mind post #3 I now know the answer to most of my questions. Except one..

You wrote that in case of the BJT in a common collector circuit I could skip the freewheeling diode.
When I google relay + bjt 99% of the circuits i find are common-emitter (got that right?). But if you need less circuits in the case of a common collector circuit.. why isn't that the most common way to do it? What are the draw backs?
 

You wrote that in case of the BJT in a common collector circuit I could skip the freewheeling diode.
When I google relay + bjt 99% of the circuits i find are common-emitter (got that right?). But if you need less circuits in the case of a common collector circuit.. why isn't that the most common way to do it? What are the draw backs?

Well, it wouldn't be a good idea to skip the freewheeling diode anyway as it might still damage the transistor if the inductive spike is >Vce(off).

As for why common collector isn't often used, it's because you do not saturate the transistor, it operates in linear mode and the voltage at the emitter is ~(Vcc-1) --> The voltage across the coil is 4v, as compared to a saturated NPN common emitter with voltage at the collector ~0.3v --> The voltage across the coil is 4.7v. This leads to higher losses as the voltage across the transistor is higher, and less power for the relay as the voltage across the coil is lower. (This is for a npn transistor).
 

As for why common collector isn't often used, it's because you do not saturate the transistor, it operates in linear mode and the voltage at the emitter is ~(Vcc-1) --> The voltage across the coil is 4v, as compared to a saturated NPN common emitter with voltage at the collector ~0.3v --> The voltage across the coil is 4.7v. This leads to higher losses as the voltage across the transistor is higher, and less power for the relay as the voltage across the coil is lower. (This is for a npn transistor).

According to transistor datasheets, the base-emitter voltage won't be higher than 0.7 V, or 0.8 V at a negative temperature of -25 °C. Power dissipation matters generally, but not for a small relay. The common collector circuit is only useful if you drive the relay from the 5 V logic supply, and the driving logic is CMOS without noticeable voltage drops.

All in all, there are many reasons why the circuit isn't used so often. But as the OP asked for minimal part count, I thought the solution should be mentioned. Standard solution is of course NPN + base resistor + free-wheeling diode.
 

Well, for minimal part count and pcb footprint, it might be a good idea to use a mosfet or a "digital transistor" (with builtin bias resistors). If you're using a mosfet, make sure it's a logic level fet (i.e. RdsOn is spec'ed at 5v or 4.5v).
Still will need a clamp diode though.

About as small as you can get it is a SOT23 + some small diode you can find, make sure it's a fast diode (e.g. schottky). Personally i like whatever cheap N-channel power mosfet (in sot23) i can buy and a PMEG3020 (or series) diode because i can prototype those on perfboard, there may be smaller solutions though...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top