Maker Pro
Maker Pro

Help select suitable Mosfet for driving relay.

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
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.
That sounds like an excellent idea! I had forgotten about out discussion vis a vis the counterfeit MAXIM MAX232 back in 2016.

Not to hijack this thread, but this topic of counterfeit Asian parts came up in the Flashlight thread when the OP purchased a counterfeit PICkit 3 programming pod for his PIC microprocessor. Fortunately, he was able to return it and get his money back, but who needs that kind of trouble? I have run into a similar problem with counterfeit RS-232-to-USB converters. These are legitimately made in Taiwan using a chip designed there, but counterfeits from mainland China abound. Some work, but later software drivers would "brick" those chips if the software "discovered" their use. When I purchased, about a year ago, a converter module (my laptop PC has no serial ports) I bought it from Amazon and have had no problems with it.
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
similar problem with counterfeit RS-232-to-USB converters
Yes, that was another story and if I remember that particular mob was forced to pull it's head in and issue a fix for it's deliberate actions.
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Should i add a gate resistor to make sure that no current will go back to the microcontroller in case the mosfet fails ?
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
Should i add a gate resistor to make sure that no current will go back to the microcontroller in case the mosfet fails ?

You can, many do.

However it's not to stop any current flow back into the micro.

It is to limit the micro pin current.

I think the usual value is around 120 ohm.
 

WHONOES

May 20, 2017
1,217
Joined
May 20, 2017
Messages
1,217
MOSFETS are susceptible to parasitic oscillation. The is due to any pcb track or wire inductance that can cause a series resonant circuit in conjunction with the gate - source capacitance which can precipitate oscillation of the Fet. A resistor in series with the gate forms a low pass pole which should negate this effect.
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
so does this resistor have to be close to the relay or it does not matter ?

A resistor in series with the gate forms a low pass pole which should negate this effect.
.
What would be the best resistor value for that ? 120Ohm like suggested by Bluejets ?
 
Last edited:

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
so does this resistor have to be close to the relay or it does not matter ?

.
What would be the best resistor value for that ? 120Ohm like suggested by Bluejets ?

It doesn't matter because the resistor is not connected to the relay. And this is most likely a non-issue for your relay driver. Although parasitic oscillations are the bane of experimental setups, they are generally solved by improving the layout and circuit interconnections.

What @WHONOES is talking about is "rolling off" the MOSFET frequency response at its gate-to-source interface, which in your instance is the Arduino low-impedance output driving the MOSFET gate (or BJT base) through a low-valued resistor. In the case of a MOSFET, there is appreciable gate-to-source capacitance (a few picofarads) and almost infinite gate-to-source resistance because of its insulated, floating, gate construction. It doesn't require much resistance in series with the gate-to-source capacitance to attenuate any undesirable positive feedback signal below a level sufficient to support parasitic oscillation. And, because the MOSFET gate-to-source resistance is so large, any resistor you choose between a few hundred ohms and a few megohms is going to have minimal effect on "how hard" the MOSFET turns on, although it will affect "how fast" the MOSFET turns on (and off) because the charge on the gate-to-source capacitance is moved through this resistance and it is this charge that determines whether the MOSFET is conducting or not conducting. Try a value between one hundred ohms and one thousand ohms to start with.

The situation is slightly different with BJTs because the forward-biased base-emitter junction represents a lower impedance and does not present much capacitance, but the "solution," if it is necessary, is the same: introduce a series-connected RC network between the Arduino output and the transistor base that will "roll off" the frequency response sufficiently to prevent parasitic oscillations.

However, before trying to solve a problem that probably does not exist, use an oscilloscope to verify that parasitic oscillations are actually occurring during the state-transition edges of the Arduino output. Such oscillations will bias the transistors involved into linear regions of operation and may cause excessive power dissipation during the time intervals when the oscillations occur.
 

WHONOES

May 20, 2017
1,217
Joined
May 20, 2017
Messages
1,217
If using a BJT transistor you should include a pull down resistor on the base emitter junction as digital devices generally do not guarantee their output pins to be less than 0.8V for a logic 0. This means that any BJT activated by you device could still be turned on, partially or fully, when a logic 0 is selected.
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
However, before trying to solve a problem that probably does not exist, use an oscilloscope to verify that parasitic oscillations are actually occurring during the state-transition edges of the Arduino output.
I do not have one at the moment but i will.

If using a BJT transistor you should include a pull down resistor on the base emitter junction as digital devices generally do not guarantee their output pins to be less than 0.8V for a logic 0. This means that any BJT activated by you device could still be turned on, partially or fully, when a logic 0 is selected.

Thats right. I also use a pull down resistor on the irl520 in order to keep it open during boot period of the arduino. Other than that i do not think it is needed for logic level mosfets.
 

WHONOES

May 20, 2017
1,217
Joined
May 20, 2017
Messages
1,217
I do not have one at the moment but i will.



Thats right. I also use a pull down resistor on the irl520 in order to keep it open during boot period of the arduino. Other than that i do not think it is needed for logic level mosfets.
Agreed on the mosfet front.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
So, have you figured out why you are bricking BJT and MOSFET driver transistors yet? This business with parasitic oscillations did not occur very often in my experience, but when it did happen it was deadly quick in its ability to kill semiconductors when there was sufficient power available to do so.

You simply cannot operate transistors of any type at excessively high power dissipation in their linear conduction region for very long without exceeding their maximum internal junction temperature. This has nothing to do with how well you have provided a heat sink for the case temperature, because after a certain power level is reached the thermal resistance from junction-to-substrate becomes the controlling factor in determining the junction temperature. You zap enough power into the transistor quickly enough and it melts... period, end of story, end of semiconductor. This would happen even if you could cool the case to absolute zero temperature.
 

WHONOES

May 20, 2017
1,217
Joined
May 20, 2017
Messages
1,217
Absolutely right heavans1944. They need to be hard on in saturation of fully off otherwise they will be subject to high dissipation.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Given the state-of-the-art in Digital Storage Oscilloscopes, and their relatively inexpensive pricing, it is incomprehensible to me why anyone who is serious about electronics today doesn't already own one, along with the knowledge and experience necessary to use it to detect parasitic oscillations, among the many other things for which an oscilloscope is useful. Back in the day, an EICO 460K oscilloscope kit was the second thing I saved paper-route money to purchase, right after an RCA Voltohmyst Vacuum Tube Volt Meter (VTVM) which was the first piece of test equipment I ever purchased. Both were that important to learning electronics. It was many years before I could afford to buy a 20,000 ohms-per-volt multimeter, but recently prices have come down on digital multimeters which have pretty much replaced analog VOMs (volt-ohm-milliammeters), so I now own a few of those, including a wireless Mooshimeter that I read remotely with my iPhone.

Trying to pursue this hobby without the proper tools is a recipe for disaster and disappointment IMHO. Of course your mileage (or kilometers) may differ, and we all must work within a budget so I can understand Constantine's reluctance to spend the money...
 
Last edited:

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Trying to pursue this hobby without the proper tools is a recipe for disaster and disappointment IMHO. Of course your mileage (or kilometers) may differ, and we all must work within a budget so I can understand Constantine's reluctance to spend the money...

I agree. I do have a Tektronix 3012B at work but i can not afford to buy one, i have a wife and two kids :)

I had no time to investigate what happened with the BC337. I replaced them with the IRL520 and works fine so far. I am focused on the Power supply i wanted to make. By the way i wanted to ask about measuring ripple voltage with the Oscope since i have trouble doing so with the Tek 3012B but i want to create a new topic for that.
 

Mark2019

Jul 7, 2019
14
Joined
Jul 7, 2019
Messages
14
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.

Hi with reference to grounding the gate of mos fets with a 10 k resistor This is a far better method of doing this
 

Mark2019

Jul 7, 2019
14
Joined
Jul 7, 2019
Messages
14
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.


There is a better method of doing this as well and thats to opt for a 4-8 pole relay as opposed to using one single relay although there is nothing wrong with what your doing but I would consider driving both with independent fet;'s Pck and IRF 540 to do the job

The relay you want is DS4E-S-DC12V Contacts rated at 2a 3ovdc ,0.6amps at 125AC and 0.6v at 120VDC
 

Attachments

  • DS-SCHEM3.jpg
    19.8 KB · Views: 3
  • 4237775.jpg
    4237775.jpg
    6.2 KB · Views: 1

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Thank you !
Due to restrictions on the borad layout i ended up using 2 DPDT relays with dedicated IRL520 logic gate mosfet.
 
Top