<div dir="ltr">Brian,<div><br></div><div>I wanted to put my two cents out there about pros versus cons for relays and MOSFETs.</div><div><br></div><div>Relays do not care about AC vs DC and tolerate abuse better than MOSFETs. Relays are also great when you need an A vs B switch (SPDT) or to switch multiple conductors (two pole and four pole are common). You can also use the coil voltage as a system input, very handy when you want to know when your wall voltage is present. For example you could use a 120VAC coil DPDT relay to connect your load to an AC inverter when the power is lost with one pole and use the other pole to send a logic signal to your Pi to let you know the AC went off.  But relays are mechanical devices with a finite lifetime and a require a real amount of power to remain in the on-state. You may or may not care about the power wasted and heat generated. You can also get relays in easy to use form factors that do not require a printed circuit board for set up and testing.</div><div><br></div><div>MOSFETs have a much longer expected life in number of cycles IF they are not abused. They also are very flexible and allow you to do pulse width modulation to vary your output, such as motor speed, lamp brightness or heater output. You can also adjust your gate drive and capacitance to control how hard or how fast the MOSFET turns on to meet your needs (reduce fan noise for example). MOSFETs require virtually zero power to maintain their on state and adding just a resistor and BJT can provide active current limiting to your load (allowing short circuit or overload protection). But MOSFETS do not do well handle turning on large, low impedance capacitive loads (I killed over half a dozen recently doing this!) without extra circuitry and they die faster than relays if subject to voltage spikes when interrupting high current. Relays will also die from current induced voltage spikes and arcing, they just die slower.</div><div><br></div><div>Let me know if I have given you more questions than insight. </div><div><br></div><div>Shane</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 8, 2015 at 11:04 AM, Martin Brooke via TriEmbed <span dir="ltr"><<a href="mailto:triembed@triembed.org" target="_blank">triembed@triembed.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">couple of additional details</p>
<p dir="ltr">Relays click when they work.  Drove docs in operating room crazy in one system I built.</p>
<p dir="ltr">Vds can be made as low as you want.  You just need a "big" enough MOSFET.  You may have to use PMOS or NMOS or both (CMOS) devices if you want to switch close to the power supply.</p>
<p dir="ltr">MOS FET devices all have some small leakage current when off check the data sheets.  You get what you pay for with this.  Generally relays are very low leakage unless they get dirty.</p>
<p dir="ltr">Cheers,</p>
<p dir="ltr">---</p>
<p dir="ltr">Martin Brooke <br>
Associate Professor, <br>
and Philip Baugh Scholar<br>
Department of Electrical and Computer Engineering<br>
Box 90291<br>
Duke University<br>
Durham, NC 27708-0291</p>
<p dir="ltr">Phone: <a href="tel:%28919%29%20660-5504" value="+19196605504" target="_blank">(919) 660-5504</a><br>
Secretary:  <a href="tel:%28919%29-660-5252" value="+19196605252" target="_blank">(919)-660-5252</a><br>
Fax:   <a href="tel:%28919%29-660-5293" value="+19196605293" target="_blank">(919)-660-5293</a> <br>
E-Mail: <a href="mailto:mbrooke@ee.duke.edu" target="_blank">mbrooke@ee.duke.edu</a><br>
On Dec 8, 2015 7:00 AM, <<a href="mailto:triembed-request@triembed.org" target="_blank">triembed-request@triembed.org</a>> wrote:<br>
><br>
> Send TriEmbed mailing list submissions to<br>
>         <a href="mailto:triembed@triembed.org" target="_blank">triembed@triembed.org</a><br>
><br>
> To subscribe or unsubscribe via the World Wide Web, visit<br>
>         <a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
> or, via email, send a message with subject or body 'help' to<br>
>         <a href="mailto:triembed-request@triembed.org" target="_blank">triembed-request@triembed.org</a><br>
><br>
> You can reach the person managing the list at<br>
>         <a href="mailto:triembed-owner@triembed.org" target="_blank">triembed-owner@triembed.org</a><br>
><br>
> When replying, please edit your Subject line so it is more specific<br>
> than "Re: Contents of TriEmbed digest..."<br>
><br>
> Today's Topics:<br>
><br>
>    1. Re: MOSFET or Relay (Brian)<br>
>    2. Re: MOSFET or Relay (Brian)<br>
><br>
><br>
> ---------- Forwarded message ----------<br>
> From: Brian <<a href="mailto:triembed@undecidedgames.net" target="_blank">triembed@undecidedgames.net</a>><br>
> To: <a href="mailto:triembed@triembed.org" target="_blank">triembed@triembed.org</a><br>
> Cc: <br>
> Date: Mon, 7 Dec 2015 10:44:54 -0500<br>
> Subject: Re: [TriEmbed] MOSFET or Relay<br>
> Adam's responses are good.  One more considration:  Voltage drop.  Even in saturation ("on"), a semiconductor will have a current-independent voltage drop (known as Vsd) across it that will likely be a good bit* larger than the drop across the relay's contacts.<br>
><br>
> To summarize:<br>
><br>
> MOSFET -<br>
>  - Fast switching (nanoseconds)<br>
>  - Very low drive current (gate current)<br>
>  - Very small "on" resistance (Rds - 10s of mOhms)<br>
>  - Fairly large "on" voltage drop (Vsd - ~1.5 V)<br>
><br>
> RELAY -<br>
>  - Slow switching (micro- to milliseconds)<br>
>  - Much larger drive current (coil current)<br>
>  - Larger "on" resistance (contact resistance - 100s of mOhms)<br>
>  - Negligible "on" voltage drop<br>
><br>
><br>
> Personally I'd rather have seen amazing strides on the Philadelphia Experiment!<br>
><br>
> -B<br>
><br>
> On 12/7/2015 8:41 AM, Grawburg via TriEmbed wrote:<br>
>><br>
>> Just for my future information. Presuming that current draw is not an issue, given the choice between using a MOSFET or a suitably opto-isolated relay to switch 12V, is there any significant advantage of one over the other? The MOSFET seems more 'elegant', but that hardly seems like a good answer.<br>
>><br>
>> BTW, there should be some kind of law against so many people helping guys like me. :-)  Imagine if the Manhattan Project had a group like TriEmbed.<br>
>><br>
>><br>
>> Thanks,<br>
>> Brian Grawburg<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Triangle, NC Embedded Computing mailing list<br>
>> <a href="mailto:TriEmbed@triembed.org" target="_blank">TriEmbed@triembed.org</a><br>
>> <a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
>> TriEmbed web site: <a href="http://TriEmbed.org" target="_blank">http://TriEmbed.org</a><br>
>><br>
><br>
><br>
><br>
><br>
> ---------- Forwarded message ----------<br>
> From: Brian <<a href="mailto:triembed@undecidedgames.net" target="_blank">triembed@undecidedgames.net</a>><br>
> To: <a href="mailto:triembed@triembed.org" target="_blank">triembed@triembed.org</a><br>
> Cc: <br>
> Date: Mon, 7 Dec 2015 11:05:37 -0500<br>
> Subject: Re: [TriEmbed] MOSFET or Relay<br>
> One important note on SSRs: If you're switching DC, make sure you get a DC-rated SSR.  Many AC-rated SSRs have zero-cross circuits to minimize switching noise; this means that once the drive signal is received, the relay waits until the voltage across its "contacts" crosses zero before it actually turns on.  Obviously with a DC supply, the voltage never crosses zero, so the relay would never turn on.<br>
><br>
> As a side note, zero-cross circuits also have the effect of making most AC SSRs useless for triac-style dimming.  The relay won't turn on until the next zero-cross, and the silicon won't turn off until another zero-cross.<br>
><br>
> On 12/7/2015 8:50 AM, Adam Haile via TriEmbed wrote:<br>
>><br>
>> A FET is going to be WAY faster at switching than a relay. Multiple<br>
>> orders of magnitude faster. Relays will often carry far more current for<br>
>> less cost. Then there is the weird in between of the two... the Solid<br>
>> State Relay. Also, not that a mechanical relay is true on/off. Whereas a<br>
>> FET or SSR (which is usually just an opto isolated FET in a nice<br>
>> package) are /generally/ on/off, but there's fancy things you can do to<br>
>> actually have the output voltage vary... or if you supply way to much<br>
>> voltage in it will just allow it through and short out. I don't really<br>
>> understand that part... I just ensure I read the datasheet and stay<br>
>> within the specs.<br>
>><br>
>> here's a good comparison of mechanical relays vs SSRs:<br>
>> <a href="http://electronicdesign.com/components/electromechanical-relays-versus-solid-state-each-has-its-place" target="_blank">http://electronicdesign.com/components/electromechanical-relays-versus-solid-state-each-has-its-place</a><br>
>><br>
>> On Mon, Dec 7, 2015 at 8:41 AM, Grawburg via TriEmbed<br>
>> <<a href="mailto:triembed@triembed.org" target="_blank">triembed@triembed.org</a> <mailto:<a href="mailto:triembed@triembed.org" target="_blank">triembed@triembed.org</a>>> wrote:<br>
>><br>
>>     Just for my future information. Presuming that current draw is not<br>
>>     an issue, given the choice between using a MOSFET or a suitably<br>
>>     opto-isolated relay to switch 12V, is there any significant<br>
>>     advantage of one over the other? The MOSFET seems more 'elegant',<br>
>>     but that hardly seems like a good answer.<br>
>><br>
>>     BTW, there should be some kind of law against so many people helping<br>
>>     guys like me. :-)  Imagine if the Manhattan Project had a group like<br>
>>     TriEmbed.<br>
>><br>
>><br>
>>     Thanks,<br>
>>     Brian Grawburg<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>>     _______________________________________________<br>
>>     Triangle, NC Embedded Computing mailing list<br>
>>     <a href="mailto:TriEmbed@triembed.org" target="_blank">TriEmbed@triembed.org</a> <mailto:<a href="mailto:TriEmbed@triembed.org" target="_blank">TriEmbed@triembed.org</a>><br>
>>     <a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
>>     TriEmbed web site: <a href="http://TriEmbed.org" target="_blank">http://TriEmbed.org</a><br>
>><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Triangle, NC Embedded Computing mailing list<br>
>> <a href="mailto:TriEmbed@triembed.org" target="_blank">TriEmbed@triembed.org</a><br>
>> <a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
>> TriEmbed web site: <a href="http://TriEmbed.org" target="_blank">http://TriEmbed.org</a><br>
>><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> TriEmbed mailing list<br>
> <a href="mailto:TriEmbed@triembed.org" target="_blank">TriEmbed@triembed.org</a><br>
> <a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
><br></p>
<p dir="ltr">---</p>
<p dir="ltr">Martin Brooke <br>
Associate Professor, <br>
and Philip Baugh Scholar<br>
Department of Electrical and Computer Engineering<br>
Box 90291<br>
Duke University<br>
Durham, NC 27708-0291</p>
<p dir="ltr">Phone: <a href="tel:%28919%29%20660-5504" value="+19196605504" target="_blank">(919) 660-5504</a><br>
Secretary:  <a href="tel:%28919%29-660-5252" value="+19196605252" target="_blank">(919)-660-5252</a><br>
Fax:   <a href="tel:%28919%29-660-5293" value="+19196605293" target="_blank">(919)-660-5293</a> <br>
E-Mail: <a href="mailto:mbrooke@ee.duke.edu" target="_blank">mbrooke@ee.duke.edu</a></p>
<br>_______________________________________________<br>
Triangle, NC Embedded Computing mailing list<br>
<a href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a><br>
<a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" rel="noreferrer" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
TriEmbed web site: <a href="http://TriEmbed.org" rel="noreferrer" target="_blank">http://TriEmbed.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><div style="color:rgb(0,0,0);font-family:HelveticaNeue-Light,'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:16px">A blog about some of my projects.  <a href="http://fettricks.blogspot.com/" target="_blank">http://fettricks.blogspot.com/</a></div></div></div></div></div></div></div>
</div>