Switching to Different Relays

Let's take a look at the pros and cons of traditional mechanical relays vs solid state relays.

Favorited Favorite 2

SparkFun will soon be releasing a solid state relay board! We currently offer several boards with mechanical relays, and due to demand we are releasing a board with solid state relays. What is a relay used for and which one would work best in your project? Join us as we discuss relays!

Relay Kit

What is a relay and what is a switch?

In general, a relay is an electrically-actuated switch. A switch is characterized by its ability to connect or disconnect a conductive path of a circuit. Switches are further characterized by their number of poles (a contact point) and throws (a specific contact-to-contact connection). A relay allows for the disconnection or connection of a circuit without having to manually do so, like pushing a power plug into an outlet.

We see here a diagram of what is called a SPDT (single pole, dual throw) switch. There is one contact point at a time (the pole) and two configurations for contact-to-contact connections (throws).

Mechanical Switch

A SPDT switch

You are probably familiar with push button switches or the light switch on your wall - both take physical effort and time to actuate. Flipping a light switch can often take upwards of 1000 milliseconds, assuming you are even close to it!

Relays can be a great and safe way to control higher power systems with an isolated low power signal, and quickly disconnect or connect circuits. There are several different types of relays and their functions are slightly different.

Mechanical relay

The most common relays are known as mechanical relays or electro-mechanical relays (EMR).

A typical mechanical relay sends current through an inductor magnet that pulls a flexing conductive plate from one switch contact to another. We can see in this example below the inductor and its relation to the switch. The magnetic field generated by current going through the coil pulls the throw from one pole to another.

SPDT Relay
An inductor using magnetic force throw a switch

In general, mechanical relays are designed for higher currents and have slower switching speeds, typically around 50 milliseconds - about 20 times faster than flipping that light switch ourselves. They are relatively simple in their construction, so they are often less expensive and easier to replace. They create the familiar relay clicking noise when the conductive contact moves from one pole to another.

There are several issues that arise from using an inductor that need to be addressed in designs using relays:

  • Due to having physically moving parts, they are more likely to suffer damage over time.
  • When changing relay states, one must carefully apply voltage across the leads on the inductor. Too much voltage can result in damage to the inductor, and too little will not be enough to properly move the conductive plate, resulting in either no switching or erratic behavior.
  • There is an audible clicking as the relay switches.
  • They are more prone to interference - either magnetic or vibration.
  • Another issue that arises comes from removing the current from the inductor, which is acting as an inductor. This sudden collapse of the magnetic field can cause a surge in voltage and current that will damage the inductor and nearby components. If you are curious about preventing these sudden spikes from causing havoc, I recommend looking at the flyback diodes on our relay boards.

Solid state relay (SSR)

Solid State Relay

Solid state relays do not have moving parts, as the name implies they exist in a solid state. They are intended to be used in the same way as mechanical relays but have a number of important differences. They connect or disconnect a circuit by applying a separate voltage across a semiconductor junction, often an opto-isolator or a MOSFET, instead of using an inductor to physically move a component. This allows a low power signal to turn on a high power system with just a couple mA’s, while being able to isolate the control side of the relay from the switching side.


In the orange box we can see the use of an opto-isolater to connect or disconnect an isolated circuit.

Solid state relays work well for a wide range of currents and have extremely fast switching times, often around 50 nanoseconds - about 20,000,000 times faster than flipping that light switch ourselves.

Solid state relays are more complicated in design, and require more sensitive components. There are a few drawbacks to using a SSR:

  • They are often much more expensive than mechanical relays.
  • They are very difficult to repair due to their complex assembly.
  • There is no audible clicking.

Which is best?

Which relay is right for your project depends largely on the needs of the project. Mechanical relays offer a low-cost way to remotely control a circuit using roughly 25 percent of the max control voltage rating of the relay.

Solid state relays offer a reliable and fast way to connect and disconnect a circuit using only miliAmps at a higher price point. They are less likely to be negatively effected by nearby magnetic interference or vibrations.

We are starting to see a shift toward solid state relays as their price comes down. Their solid state nature means fewer mechanical errors and increased longevity of the part. This is similar to the change in hard disk drives (HHDs) and solid state drives used in memory storage.

We will be releasing our own SSR boards soon, ready to be actuated at your heart's content. Check back soon to get your own!

What are you using your relays for? Is there any love for reed switch relays these days? Let us know what you think in the comments.

Comments 6 comments

  • woodr / about 4 years ago / 3

    You might want to mention that there are different kinds of SSRs to switch different loads (AC, DC, AC/DC). While obvious after the fact, one can waste a lot of time planning to substitute an SSR for a relay before realizing that most of them are for AC switching. ...uhhh, not that it ever happened to me...

  • Member #134773 / about 4 years ago * / 2

    "Flipping a light switch can often take upwards of 1000 milliseconds, assuming you are even close to it!"

    and later on

    "extremely fast switching times, often around 50 nanoseconds - about 20,000 times faster than flipping that light switch ourselves."

    Uh, my math suggests that 1000 milliseconds (aka one second) is "about" 20,000,000 times 50 nanoseconds...

    (I can't get the format stuff to drop out of "quote" mode...)

  • Member #134773 / about 4 years ago / 2

    A few other points (from someone who's been using relays for more than half a century):

    Although you alluded to it near the end, mechanical relays DO have a finite life when it comes to number of cycles, although depending on the design, this can range from a few tens of thousands to several millions of cycles. (I've run into this in some industrial machines where the relays can switched every second, 24 hours a day... it doesn't take long to kill a cheap one!)

    Solid state relays will often have a (small) voltage drop (think "one diode drop"), where as mechanical relays will have a specific (though small) resistance (think milliohms) across the contacts when closed. For switching "power", neither really matters, but when doing things like multiplexing (muxing) for an ADC, it can be a significant difference.

    Some solid state relays won't do well if the "output" side is DC, others won't do well if the "output" side is AC. (Some are also restricted as to whether the "input" is AC or DC.) Although most mechanical relays are specified as either DC or AC for the input (coil) side, most will work with either DC or AC on the outpoint (contacts) side, though they almost always have much lower voltage AND current ratings for DC than for AC. (Another minor point is that many mechanical relays that are rated DC on the coil don't care about polarity, though most solid state relays do.)

  • Member #1762839 / about a year ago / 1

    I tried solid state relays and had many issues. One that was supposed to handle 120v did but there was about a 10 second delay in switching. Others would just latch on and stay on when given a DC source to control. I hope Spark Fun are better at it than the majority of electronics makers.

  • Member #1608672 / about 4 years ago / 1

    Please be aware that most SSRs ( If not all ) have a leakage current so there is a voltage present on switched side of the SSR even when it is in the off condition. This is not a problem for low impedance loads since the current carrying capacity of the SSR in the off state is very low but for voltage sensitive very high impedance loads it can cause a problem and will cause voltage sensing equipment used by electricians to detect "hot" circuits to indicate unsafe.

    Also cheap SSRs can have a very significant series impedance. If used with high current loads ( such as a motor or heating contactors ) a carefully selected heat sink must be used with fan forced cooling ( if needed ).

    One last (??) note SSRs need to have an internal or external "snubber" ( series RC add on ). A rapid transient on the load side of the SSR can trigger it to an "ON" state.

    It is necessary to read the specs and app notes before applying SSRs. ( But it is always necessary to read and understand the specs and app notes for everything - [ don't ask me how I know ] ).

Related Posts

Recent Posts


All Tags