1

Initially I was designing a relay controller for lower powered relay, but since I could not find the optocoupler that is rated for my application, I turned to MOSFETs. and it so happens that the logic level MOSFETs I find are way overkill for my application.

Since the FETs I am using can do more than my original target, I decided to upgrade my circuit so that I may use it again in the future more versatility.

So here is what I have so far, I decided to use 2 out 4 channels of my controller using NMOS and the other 2 using PMOS. I did this because I thought in the future if I ever need it to power something else that needs to be referenced to the same ground. Although this might not happen but why not when you can.

The FETs I am planning to use are the:

Here is basically how each channel would look like in the schematic:

enter image description here

I have decided that the absolute limit that my controller should carry is 50V 1A DC. I don't know if relays like that even exist, but nonetheless that is my target. What other things I should look out for when powering this big of a load relay? Is there a chance that that power might surge back to GPIO pins?

JYelton
  • 32,302
  • 33
  • 134
  • 249
Jake quin
  • 1,884
  • 1
  • 20
  • 40

1 Answers1

1

You have not mentioned the relay solenoid current.
Your 1M resistors are too large to be useful here, you should reduce them to 100k at the most. I would actually suggest a slightly better arrangement:

schematic

simulate this circuit – Schematic created using CircuitLab

Both resistor values can be increased, but they should follow each other's values; if you increase R1 to 1k you should also increase the R2 to at least 22k, so that the driving voltage is not significantly reduced due to voltage divider formed by R1 and R2.
This brings up another issue: is your GPIO output voltage sufficient to turn the MOSFET completely on?

I would be wary of using a resistor in series with a freewheeling diode across a relay solenoid because the current spike is high and could produce a high voltage spike across the resistor which would defeat the purpose of the diode. A zener diode in series with a regular diode would be better because it would only conduct the highest voltage spikes and the relay would function better (a plain diode across relay coils is bad for the relay switch contacts, according to this short article:
Coil Suppression Can Reduce Relay Life).

The zener diode needs to have a voltage rating between the supply voltage and the MOSFET's maximum Vds rating so that the spike never goes above it. For example, if the supply voltage is 24V and the Vds(max) is 60V, the zener voltage should be between 30V and 40V. The power supply voltage should not be reaching the zener voltage (if you have an unregulated power source).
The zener diode should have the highest power rating you can get. 0.5W and 1W will not be enough. You could also use more than one zener and share the voltage drop (as well as the power) across them equally, and then you could use lower power zeners.

Edin Fifić
  • 5,188
  • 7
  • 24
  • I must build it to my target 1A current although although no relays eat that much solenoid on the other hand have some of them. I thought a diode - resistor combo was the best option, Any rating i should look out for selecting the zener and regular diode? or almost any will work? – Jake quin Apr 22 '20 at 00:32
  • without a resistor how would i compute the stress my mosfet is recieving? – Jake quin Apr 22 '20 at 00:57
  • The zener diode needs to have a voltage rating between the supply voltage and the MOSFET's maximum Vds rating so that the spike never goes above it. For example, if the supply voltage is 24V and the Vds(max) is 60V, the zener voltage should be between 30V and 40V. The power supply voltage should not be reaching the zener voltage (if you have an unregulated power source). – Edin Fifić Apr 22 '20 at 07:23
  • I have updated my answer with more information. – Edin Fifić Apr 22 '20 at 07:47
  • the mosfets that i have chosen are specially made for logic level with the 2.5v (PMOS) and 3v (NMOS) thresholds, with your configuration of the resistor though it forms a [voltage divider](https://ibb.co/wYQDQ0Z) so i have to be careful on my values not to go below threshold. I have to accomodate a wide range of voltage supply (5v-50v) and although the supply used is regulated, the voltage can vary, how do i chose the value then ? is higher zener voltage better? and choose lets say 55v ? – Jake quin Apr 22 '20 at 19:55
  • 1
    The zener voltage should be above the absolute maximum DC supply voltage you expect, but it shouldn't be too close to the MOSFET Vds(max) rating because you want to "kill" the spike before it even gets a chance to damage the MOSFET, and because zeners are neither very sharp nor very fast in their response to a transient. You might be better off using a TVS diode because it is so much faster than zener and it absorbs more transient energy. – Edin Fifić Apr 22 '20 at 20:16
  • For the zener is 5W alright or still not enough ? as for the ordinary diode any will do? the 1n4001 can only handle upto 1A continues and 30A pulse is that enough ? – Jake quin Apr 24 '20 at 06:33
  • That sounds about right. – Edin Fifić Apr 24 '20 at 07:17
  • Does the current not taken into consideration when choosing the parts? only in selecting the power rating? Because im planning to bump the current to 2A since 2A solenoids do exist – Jake quin Apr 24 '20 at 12:25