Maker Pro
Maker Pro

Help select suitable Mosfet for driving relay.

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Hello !

I want to drive a DPDT relay (FEME LCA 002 12 57) from my arduino mega board. So far i used a BC337 transistor but after running it for a day or two having the relay continuously engaged, i found the transistor shorted. The relay coil will draw 45-50ma and has a resistance of 265 Ohms. The relay coil does get warm but i am not sure if that is normal or not. I replaced the relay with a new one of the exact same brand and model and got the same outcome (shorted transistor not blown open).

To be honest i dont know why the transistor shorted since it is supposed to be able to handle up to 500ma of load current. I do use a 1n4001 flyback diode to protect the transistor. Could it be that the 1n4001 is not sufficient to protect the transistor ? Should i use an 1n4004 for example ?

Now i am thinking to replace it wit a mosfet. Any suggestion which one to use or how to select one?

P.S.
I think it might be worth mentioning that i bought the transistors from ebay-china but i would like to upgrate to something more durable anyway so the question about mosfet selection still stands.

THANK YOU!
 
Last edited:

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
IRL540 is a logic gate version I use.
M.
Yes. It looks very interesting.

2N7000 is also a common choice for driving relays from Arduino.
The 2n7000 can handle up to 200ma instead of the 500ma that the BC337 can. i am not sure why to select that over the BC337.

Depends how hard you turn it on.
Well it is controlled by the Microcontroller. I write the commant to turn it on and the pin goes from 0V to 5V through a 1K resistor. Now if you are asking about me pulsing the transistor on and off fast then that is not the case.
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
No, not asking about pulsing,
1K0 may be too high on 5v.
I'd normally use 330R just to make sure it's hard on.
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
i am not sure why to select that over the BC337.

To avoid the problems selecting the right base resistor and the transistor getting cooked perhaps...??

If you decide to go with a mosfet, don't forget the gate to ground 10K resistor.
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
A 1N4001 flywheel diode should protect the transistor. Why consider a 1N4004 when you can get a 1N4007 for the same price or very little more?

Measuer the voltage across the transistor to check that it is turned on fully (under 0.5V).
Is the transistor hot?
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
No. The transistors do not run hot at all. i will measure voltages and let you know.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
This is really strange: AFAIK it should not happen if the BC337 NPN transistor base is driven hard enough from a digital (NOT ANALOG!) output port bit to cause the collector to emitter voltage to saturate. See @Bluejets post #6 above.

At collector-emitter saturation, there should be 0.7 VDC maximum from collector to emitter. If the BC337 collector-emitter voltage rises above saturation, toward the power supply voltage of the relay coil, because the base voltage is too low, the transistor will be operating in its so-called linear region. Its power dissipation, the product of collector current and the collector-emitter voltage, is much larger than the small amount of power dissipated at saturation. And of course there is no power dissipated if the BC337 is biased off and little to no collector current occurs. You must avoid operating in the so-called linear region.

The datasheet specs a base current of 50 mA for 500 mA collector current at saturation. That seems a bit high to me, but 5 V across 1 kΩ is only 5 mA, and perhaps a lot less, since you also have to forward-bias the base-emitter junction by about 0.7 VDC, which subtracts from the voltage available to drive the transistor base-emitter junction and the current through the 1 kΩ base resistor.

Sometimes leakage paths can develop that prevent a transistor that has no intentional base-drive voltage (Arduino output is OFF) from achieving cut-off. If this unfortunate defect in layout or design occurs, the transistor will be ON and operating somewhere in its so-called linear region when it is supposed to be non-conducting. If you suspect this is a problem, or verify that it exists by making collector-emitter voltage measurements, adding a 10 kΩ resistor from base to emitter will generally be enough to "short circuit" the leakage currents without appreciably attenuating the base drive signal when the Arduino output is ON. But try lowering the value of the base resistor first. The digital I/O ports are capable of providing 40 mA at 5 VDC, so an output pin should be capable of driving 125 Ω. I would try using a 220 Ω resistor instead of the 1 kΩ you are currently using. Check the collector-emitter voltage with the relay coil energized... should be about 0.7 VDC. Check the collector-emitter voltage with the relay coil de-energized... should be the same as power supply voltage applied to the relay coil. Finally, make sure the diode is wired as close as possible directly across the relay coil terminals, not six or twelve inches away. Diode cathode to power supply positive, diode anode to transistor collector.

Report back here with your voltage measurement results.
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Ok, here are the readings.

The supply voltage is 11.97V and the readings on the transistor (emitter to ground) with the relay engaged AND A 1K base resistor are as follows:
VCE = 0.09V (positive terminal to collector)
VBE = 0.75V (positive terminal to base)
VBC = 0.66V (positive terminal to base)
VBE with the relay disengaged is exactly the same as the supply voltage = 11.97V

Why on the arduino forums they suggest an 1k base resistor ?
https://forum.arduino.cc/index.php?topic=493559.0

The picaxe manual also recommends 1K base resistor.
 
Last edited:

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
I have one other question. if i use the mosfet to drive the relay then i suppose i can add one more relay in parallel. there should be no problem right ? Like in the attached diagram.
 

Attachments

  • 2 RELAY.png
    2 RELAY.png
    13.7 KB · Views: 12

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Ok, here are the readings.

The supply voltage is 11.97V and the readings on the transistor (emitter to ground) with the relay engaged AND A 1K base resistor are as follows:
VCE = 0.09V (positive terminal to collector)
This reading indicates the collector-to-emitter is saturated: a GOOD thing.

VBE = 0.75V (positive terminal to base)
This reading indicates there is plenty of forward-bias drive to the base of the transistor, even with a 1 kΩ instead of a lower-valued resistor: also a GOOD thing.
VBC = 0.66V (positive terminal to base)
This reading indicates the base-to-collector junction is reverse-biased: a GOOD thing.
VBE with the relay disengaged is exactly the same as the supply voltage = 11.97V
This reading makes no sense because the (1) maximum output voltage from any I/O port on the Arduino should be 5 VDC, NOT the relay supply voltage and (2) with relay disengaged the output port voltage applied to the base through your 1 kΩ resistor should be 0 VDC. This reading should have been VCE, NOT VBE with the relay disengaged.

Why on the arduino forums they suggest an 1k base resistor ?
https://forum.arduino.cc/index.php?topic=493559.0
Probably because it generally works if the transistor hfe is reasonably high when an attempt to drive the transistor into saturation is made. I generally start out using 1 kΩ when driving 2N3904 NPN transistor because I have a boatload of both of these resistors and transistors in my bench stock.
The picaxe manual also recommends 1K base resistor.
Your voltages (except for the last one, VBE, look okay, so whatever is causing your transistor to melt down is not obvious. If you measured VBE = 11.97 V, I would expect that to quickly destroy the base-emitter junction and no further "transistor action" would be possible.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
I have one other question. if i use the mosfet to drive the relay then i suppose i can add one more relay in parallel. there should be no problem right ? Like in the attached diagram.
Sure, that should work. But DPDT relays in the same form-factor as SPDT are readily available at virtually the same cost. Or do you just happen to have a lot of SPDT relays on-hand and available for use?
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
If you measured VBE = 11.97 V, I would expect that to quickly destroy the base-emitter junction and no further "transistor action" would be possible.
OOOPS, my bad !!!
It is VCE = 11.97V that was a typographical error. SORRY.
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Sure, that should work. But DPDT relays in the same form-factor as SPDT are readily available at virtually the same cost. Or do you just happen to have a lot of SPDT relays on-hand and available for use?
Actually i was too lazy to look for the DPDT symbol in the drawing software :p
Again like you said it the same thing, only in my case i want to drive two DPDT's with the same MOSFET from one arduino output.

Your voltages (except for the last one, VBE, look okay, so whatever is causing your transistor to melt down is not obvious.

The cause is probably ebay-china... What else could it be huh ?
 
Last edited:

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Um, that means the transistor is fully off. How about readings when it is on?

Bob
That was reported in post #11:

The supply voltage is 11.97V and the readings on the transistor (emitter to ground) with the relay engaged AND A 1K base resistor are as follows:
VCE = 0.09V (positive terminal to collector)

My response to that was to add comments (in red) inside his quote, which upon review was probably not a good idea. The editor truncates the display of quoted texts unless the reader explicitly expands the displayed text. I suppose this is a "good" idea, since it prevents cluttering up the screen with previous posts, but it makes responding to multiple points a real PITA if each point must be replicated again to distinguish individual responses.

Anyhoo, based on the readings Constantine reported (and later corrected), I can find no reason why his original circuit destroys BJTs. He blames it all on eBay and Asian merchants in his post #17, but I think there is something else going on that we don't know about yet. <sigh> And now, if I read post #17 correctly, he wants to drive two DPDT relays (paralleled coils) instead of just one 4PDT relay. Again, that should work with either BJT or MOSFET drivers.
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
He blames it all on eBay and Asian merchants in his post #17, but I think there is something else going on that we don't know about yet.
I understand your thinking but no. not really. Unless there is something i am not aware of like a pcb defect. Again dont think so since all readings are good.
Come to think about it i can buy a few BC337's from my local electronics shop and run them for a few days to see what happens. I know for sure that they get the parts from reputable importers which in turn import only original parts.

P.S.
Generally speaking i am very happy with the parts i get from ebay - china but it hapens from time to time to run into malfunctioning parts like the MAXIM MAX232 back in 2016 where they would overheat and burn without obvious reason(they where counterfeit).
Sir if you are curious enough i have the link for you. You even answered me back then
https://www.electronicspoint.com/fo...ilover-circuit-upgrade-attempt.278866/page-12
post #222 states the problem
Posts #242 through 244 are the answer.

nd now, if I read post #17 correctly, he wants to drive two DPDT relays (paralleled coils) instead of just one 4PDT relay. Again, that should work with either BJT or MOSFET drivers.
That is correct. I can not use one 4PDT relay because of the physical locations of the components on the PCB. I can always use two different mosfets with their gates connected on the same arduino pin to drive each relay but since one mosfet can safely handle more than one relay then i dont see the reason why not.
 
Last edited:
Top