How to replace the relay with a MOSFET? - Page 1
Forum section: electronics / beginners

author: Chriss
author_rank: Frequent Contributor
timestamp: March 11, 2020, 08:39:19 pm
content: Hi!I'm trying to replace the relay in this circuit with an N-channel logic MOSFET but I'm confusing how to achieve that.Description of the circuit I draw:I know, there is no diode across the relay. The circuit is just to show what I wish to do.The R6 is an inrush current suppressing resistor.The R5 is a load.The relay is activated after 1-2sec from an Attiny85, so the R6 is shorted out and no more current is passing through.Now, I have some IRL540N MOSFET's and wanna try to replace this relay with that mos.I assume I should put the R6 in the GND line and then short out the relay with the mos.Or what is the correct way to achieve this?Thank you.Update:Here is my idea how to achieve this,pls let me know what is wrong and how could I improve it.The Schematic.jpg represents and idea how I would do my project.PB0 and PB1 are low 0v on startup.PB0 goes high to 5v for lets say 2sec.Current is delivered to the output for 2sec through Q1 and R7 which is in this case 330Ohm.After 2sec PB1 goes to high 5v and PB0 goes to low 0v. Now the current is delivered through Q2 and without the R7 to the output.What do you think? Would this work in real?Thanks.

author: Paul Rose
author_rank: Regular Contributor
timestamp: March 12, 2020, 12:11:21 am
content: Here's my first stab at it.I'm not an expert at this, but it works in simulation.Drive bottom gate +5 to turn on "soft"Drive both gates +5 to turn on "hard"It doesn't work if you put the 330 across the bottom mosfet, because then you can't drive the VGS properly on the top one.The 330 is your value for inrush limiting.The 25 is my random guess for your load.

author: Chriss
author_rank: Frequent Contributor
timestamp: March 12, 2020, 12:21:59 am
content: Hi!Thanks for the idea.Thanks.

author: wraper
author_rank: Unknown
timestamp: March 12, 2020, 01:14:14 am
content: Does the load need to be connected to GND and what is this load to begin with? If the load can be placed on the high side, then single N channel MOSFET on the low side is the only part that's needed.

author: Paul Rose
author_rank: Regular Contributor
timestamp: March 12, 2020, 01:29:47 am
content: Quote from: wraper on March 12, 2020, 01:14:14 amThis original first relay schematic showed that the load was always "on", and the soft-start resistor could be bypassed by the relay to turn on hard.If this is all that is needed, then you are right.But I assumed (maybe wrongly) from his second attempt, that three states were wanted: "off" "on-soft" and "on-hard".That's why I used two MOSFETs, in series, with the load on the high side.

author: wraper
author_rank: Unknown
timestamp: March 12, 2020, 02:06:40 am
content: Quote from: Paul Rose on March 12, 2020, 01:29:47 amYou don't want two MOSFETs in series. Not only due to issues with controlling upper MOSFET gate safely but also due to doubled power loss/ dissipation in ON state. You could simply connect them in parallel.

author: Paul Rose
author_rank: Regular Contributor
timestamp: March 12, 2020, 02:27:04 am
content: Quote from: wraper on March 12, 2020, 02:06:40 amOf course.Like this (attached):+5 on P1 is "soft"+5 on P2 is "hard"0 on both is "off"+5 on both is also "hard"25 represents the load330 is the originally posted inrush limit

author: Chriss
author_rank: Frequent Contributor
timestamp: March 12, 2020, 07:13:45 am
content: Thank you guys so much for the help.I really appreciate that.My best regards.

author: Zero999
author_rank: Super Contributor
timestamp: March 12, 2020, 09:52:20 am
content: Why not use the MOSFET itself as an inrush current limiter? Use one MOSFET, connect a capacitor between the gate and drain and the gate to the MCU, via a resistor. It will slow down the MOSFET turn on time, thus limiting the inrush current.

author: Chriss
author_rank: Frequent Contributor
timestamp: March 12, 2020, 11:15:54 am
content: I was thinking about your idea too.Can somebody give me an idea what could be a correct time delay to delay the mosfet gate opening time to accomplish the inrush current time delay?The mosfet should torn on and off a 12vdc motor with a constant current of approximate 7A. So the inrush current could go maybe ove 25A...I'm searching for an aproximate time delay nothing precise.Thanks.

author: Zero999
author_rank: Super Contributor
timestamp: March 12, 2020, 11:38:36 am
content: 330 Ohm seems like a very high value to use. I doubt it would do much. The motor probably wouldn't even start turning with only 36mA flowing through the armature and draw the full peak current when it's bypassed by the relay. Go for something more reasonable like 1.8Ohms, which will pass near the motor's normal operating current.Regarding the MOSFET soft start. There are two ways of doing it. You could connect the capacitor between the gate and source or gate and drain. I did a simulation, see the link below:https://www.eevblog.com/forum/projects/inrush-current-limiting/msg2949990/#msg2949990A diode can be placed in parallel with the resistor to speed up the off time.As regards to calculating it, the problem is the MOSFET's threshold voltage and transconductance vary, so it's not possible to do it accurately, but I don't think it matters, since the actual current isn't important.

author: wraper
author_rank: Unknown
timestamp: March 12, 2020, 11:42:48 am
content: Quote from: Chriss on March 12, 2020, 11:15:54 amThen you shouldn't use any resistors, and 330 ohm will do nothing. You should use PWM for soft start.

author: wraper
author_rank: Unknown
timestamp: March 12, 2020, 11:47:26 am
content: Quote from: Zero999 on March 12, 2020, 11:38:36 amYou shouldn't do this with motor. Or if you do, IRF540 is not sufficient at all. You need something much more beefier and on heatsink. MOSFETs do not like linear operation.

author: Zero999
author_rank: Super Contributor
timestamp: March 12, 2020, 12:13:05 pm
content: Quote from: wraper on March 12, 2020, 11:47:26 amPlease show your working?That's a bit of a blanket statement. Whether or not this is viable or not depends on the required voltage/current and MOSFET safe operating area.The data sheet gives a maximum power dissipation of 150W for the IRL540. I'm fully aware it will not be able to stand it for long, but I don't see why it won't tolerate it for long enough to get the motor started.https://www.vishay.com/docs/91300/sihl540.pdf

author: wraper
author_rank: Unknown
timestamp: March 12, 2020, 02:14:09 pm
content: Quote from: Zero999 on March 12, 2020, 12:13:05 pm150W at 25oC case temperature...