Switching: FET vs. Analog Switch IC vs. Relay

I have been thinking about switching, and I have come up with at least three ways to accomplish switching: with an FET, with an analog switch IC, and with a relay. Frankly, I'm a little overwhelmed, and I wonder if anybody could help me understand what qualities differentiate these devices, that would cause someone to choose one of them over another.

The two specific applications I'm considering are 1) replacing a manual NO switch in a device with a switch that is controlled by the Arduino, and 2) feeding a PWM input to a switch to cause a parallel resistor to cycle in and out of circuit, thereby approximating a digital pot via the PWM duty cycle. But I would like to have a broader understanding of when the use of each of these types of devices is appropriate.

EDIT TO ADD:
2.2 volts / 4 mA for the NO switch.
2.7 volts / 1 mA for the pot.

Here is what I already (think I) know:

Relays, especially mechanical relays like the solenoid in your car, excel at switching large currents. They can be designed such that there is a very large difference in voltage between the control circuit and the switched circuit. They are usually larger and more expensive than ICs. The relays I have seen also seem to have slower switching speed than the other two: the solid state relays seem to have switching speeds in the ms, where the others have switching speeds in the tens of ns.

FETs are, in a simple sense, like a SPST switch. That is basically all I know about them.

Analog switch ICs come in a wide variety of designs, with multiple switches and multi-pole/multi-throw configurations. They also have both a NO and an NC output, whereas an FET, by itself, is either NO or NC, but not both. So I could see that in a more complex switching application (3P2T), or an application where you needed a lot of switches, an analog switch IC would make sense because of its compactness and simplicity.

Other than these characteristics, I'm not sure what else might differentiate these devices. In the two examples I list above, what would you use, and why?

Not enough info provided yet. What are the voltages and currents in play for these 2 examples?

Mechanical relays are not good for driving with PWM.
Having a resistor switched in & out could play havoc with current & voltage levels. You may be better off with a digital potentiometer instead.

The FET is a simple switch that have depletion mode or enhancement mode. The depletion mode FET is normally a conductive switch, even if the gate is not driven to a voltage away from its other terminals' voltages (nc). To stop it from conducting, its gate must be driven beyond the voltage on its source. Enhancement mode FETs are (no), normally open and the gate usually needs its gate driven by a control circuit for it to conduct, depending on circuit details.

A relay can also be conductive without being enabled by electrical control. For example, a relay control circuit can lose power, but the load current can still flow through the normally closed relay terminals (nc). Or relays can have a (no) construction. Or they can have a latching construction so they remain closed or open even if the control circuit is not powered up. Magnets and mechanical gripping circuits can retain the state of the relay even during a power loss to the control circuit, while the load power is still continuing to draw current and maintain a voltage.

An analog switch uses enhancement mode MOSFETs that are n-channel (NMOS) and p-channel (PMOS) so that a full voltage swing can be conducted. PMOS and NMOS form complementary switches (CMOS). The CMOS analog switch is more sophisticated than single FET switches which often drop a Vt threshold voltage in common circuit configurations. The CMOS switch does not drop a Vt. An FET switch usually drops a Vt voltage from the load so full rail to rail switching is not achieved with simple drive circuits.

I use the CD4016 and CD4051 analog switches for tiny currents. Relays carry the biggest currents. FETs are used when the control circuits are expertly designed. Analog switches have integrated control logic, like level shifters and digital enables so the design task is easier.

1 Like

CrossRoads:
Not enough info provided yet. What are the voltages and currents in play for these 2 examples?

2.2 volts / 4 mA for the NO switch.
2.7 volts / 1 mA for the pot.

Mechanical relays are not good for driving with PWM.

To say the least! :fearful:

Having a resistor switched in & out could play havoc with current & voltage levels. You may be better off with a digital potentiometer instead.

I started out searching for a digital pot, but I am having a lot of trouble finding one that has the exact parameters that I need. I have a post up about the situation here ( http://forums.adafruit.com/viewtopic.php?f=25&t=43053 ) which is where the PWM-parallel-resistor approach was suggested. (If it is considered bad form to redirect the discussion to another forum post, then I will edit this message to include the relevant details.) In short: I can't find a digital pot that has the exact right impedance value, in addition to other factors, and I'm low on I/O pins, so the idea of running the circuit off of a single PWM pin vs. three SPI pins is appealing.

AmbiLobe:
A relay can also be conductive without being enabled by electrical control. For example, a relay control circuit can lose power, but the load current can still flow through the normally closed relay terminals (nc). Or relays can have a (no) construction. Or they can have a latching construction so they remain closed or open even if the control circuit is not powered up. Magnets and mechanical gripping circuits can retain the state of the relay even during a power loss to the control circuit, while the load power is still continuing to draw current and maintain a voltage.

That's really interesting. I didn't know that--thanks.

I use the CD4016 and CD4051 analog switches for tiny currents. Relays carry the biggest currents. FETs are used when the control circuits are expertly designed. Analog switches have integrated control logic, like level shifters and digital enables so the design task is easier.

I just placed an order for some of these components, so I could play with them and see which worked best for me. Coincidentally, one of the things I ordered was a CD4066, which looks almost identical to the 4016.

joshuabardwell:
I have been thinking about switching, and I have come up with at least three ways to accomplish switching: with an FET, with an analog switch IC, and with a relay. Frankly, I'm a little overwhelmed, and I wonder if anybody could help me understand what qualities differentiate these devices, that would cause someone to choose one of them over another.

A power MOSFET can switch significant power, but is not isolated from its controlling circuit (the source is common
to controlled and controlling circuit). MOSFETs are available capable of handling upto 1000V and 200A... They switch
DC. Small signal MOSFETs are also available for less power.

An analog switch IC is good only for small signal-level switching - no significant power, and the voltage levels must be
within the power supply rails. Control and controlled circuits share the same power rail normally. The signal switched
can be analog or logic and some devices can switch radio frequency signals even (ultimately you need to go to PIN diode switches for that).

A relay has controlling and controlled circuits completely isolated (good to 1000's of volts normally). Mechanical relays
are slow (vastly vastly slower than semiconductors) to switch, take constant power when active, and have contact
"bounce". They can handle any signal or power (subject to limits in the specs) and you can get coaxial relays for
switching RF power.

Other switching devices are PIN diodes as mentioned (RF AC signals only), bipolar switching transistors, IGBTs, thyristors and
for AC triacs. There are exotica for microwave waveguide switching too.

Mark,

Thanks--these are really good points and have really helped.

MarkT:
A power MOSFET can switch significant power, but is not isolated from its controlling circuit (the source is common
to controlled and controlling circuit).

I'm a little confused by this statement. My current thinking is that one property of a FET (vs. a BJT) is that the gate is well isolated from the source and drain, due to its high input impedance. Is that not correct?

An analog switch IC is good only for small signal-level switching - no significant power, and the voltage levels must be
within the power supply rails. Control and controlled circuits share the same power rail normally.

In my example of replacing the manual NO switch in the welder, the controlled circuit would have a different power rail than the switch. Would this be expected to cause problems?

To sum up some of your points: For switching high-power situations, a FET or relay would probably be most appropriate. For switching signal-level, a small FET could be used, and an analog switch IC would also be appropriate. For isolation between controlled and controlling circuit, a relay would be appropriate (although presumably an opto-isolator could be added to the other two).

When thinking about FET or relay, another consideration is that a relay is going to be more robust under some circumstances. FET transistors are very susceptible to static, and I have also read about some welder manufacturers who have switched from MOSFET to IGBT in their welders, because the MOSFETs had poor reliability when subjected to heat. Of course, a relay wouldn't be appropriate for fast-switching scenarios like a welder, but it is an example of a weakness in the MOSFET.