Actuators & Control · Study deck
Relays and Solenoids: Switching Choice and Safety
A relay uses moving contacts to switch a load.
Motor Max is your guide for this deck.
After studying this chapter
Learning objectives
You will be able to:
- Explain: For design margin, a 4 A inductive load is often treated as needing a 10 A to 15 A contact class, plus a snubber, MOV, or other suppression matched to the load.
- Explain: V_spike = -(50×10⁻³ H) × (8A / 5×10⁻³ s) = -80V spike: This 80 V value is a hypothetical inductor voltage under the assumed current ramp, not a measured contact voltage.
- Explain: A triac-output AC SSR may drop about 1.6 V, so at the same 5 A it dissipates 1.6 x 5 = 8 W and needs a thermal path.
Major section
Relay Arc Erosion in Inductive Loads
The mistake: An IoT smart plug design uses a standard 10A mechanical relay, rated for resistive loads, to switch a vacuum cleaner drawing 8A in normal operation.
- V_spike = -(50×10⁻³ H) × (8A / 5×10⁻³ s) = -80V spike: This 80 V value is a hypothetical inductor voltage under the assumed current ramp, not a measured contact voltage.
- A 120 V RMS AC supply reaches about 170 V at its peak.
- Contact erosion and welding risk depend on the specific relay, motor inrush, switching phase, suppression and duty cycle.
- For high-cycle applications or motor loads, use SSRs despite higher cost.
Major section
For Kids: Meet the Actuator Crew!
"How does that work?" asked the LED. "Max can barely power me, and I only need a tiny bit of electricity!".
- "That's my magic trick!" said Relay Ray proudly. "Max sends me a teeny-tiny signal -- like whispering in my ear.
- I'm the finger, and Ray is the switch!".
- Solenoid Sally pushed forward with a "THUNK!" "And I do the pushing!
Major section
Deep Dive: Coil Drivers, Contact Stress, and Kickback Paths
The first sizing check is current.
- The coil resistance is approximately 5 V / 0.08 A = 62.5 ohm, and the coil consumes 5 V x 0.08 A = 0.4 W while energized.
- An ESP32 GPIO pin is a logic signal, not a coil supply.
- The stored energy is easy to estimate.
Major section
Deep Dive: Coil Drivers, Contact Stress, and Kickback Paths (continued)
It gives the stored magnetic energy a local path instead of letting transistor voltage rise sharply.
- The safe pattern is GPIO to transistor or logic-level MOSFET, relay coil to its own supply, and a diode across the coil.
- The GPIO then supplies only base current or gate charge while the actuator supply provides coil power.
- If you assume forced gain of 10, base current is about 80 mA / 10 = 8 mA.
Major section
Deep Dive: Coil Drivers, Contact Stress, and Kickback Paths (continued)
With a forced gain of 10, 80 mA / 10 = 8 mA of base current, which makes 330 Ω a suitable nearby standard resistor for the shown drive.
- Contact ratings are a separate problem from coil ratings.
- Switching technology changes the loss and failure tradeoff.
- A diode clamp changes the time scale.
Major section
Deep Dive: Coil Drivers, Contact Stress, and Kickback Paths (continued)
A diode across a DC relay coil protects the transistor.
- The same 5 V, 80 mA coil might switch a 12 V pump at 2 A, a 24 V valve at 0.4 A, or a mains lamp.
- If a contact says 10 A resistive, that does not automatically mean 10 A motor or transformer load.
- An inductor opposes changes in its current, and its voltage is V = L x (di/dt).
Major section
Deep Dive: Coil Drivers, Contact Stress, and Kickback Paths (continued)
Relays and solenoids look binary in software, but their current, stored energy, contact stress, and fail-safe state are analog design constraints.
- A motor that runs at 4 A may draw 5 x 4 = 20 A for a short startup interval, and an inductive load can arc as the contacts open.
- For design margin, a 4 A inductive load is often treated as needing a 10 A to 15 A contact class, plus a snubber, MOV, or other suppression matched to the load.
- An RC snubber or MOV across relay contacts protects the contacts when the load itself is inductive.
Major section
Deep Dive: Coil Drivers, Contact Stress, and Kickback Paths (continued)
A 12 V latch solenoid drawing 1.2 A for 200 ms uses 12 x 1.2 x 0.2 = 2.88 J per actuation.
- A triac-output AC SSR may drop about 1.6 V, so at the same 5 A it dissipates 1.6 x 5 = 8 W and needs a thermal path.
- For DC loads that need fast PWM, a MOSFET switch is usually the better actuator driver than either relay type.
- That spike punches through the switching transistor or microcontroller pin unless a clamp gives the current a safer path.
Deck summary
Key takeaways
The mistake: An IoT smart plug design uses a standard 10A mechanical relay, rated for resistive loads, to switch a vacuum cleaner drawing 8A in normal operation.
- "How does that work?" asked the LED. "Max can barely power me, and I only need a tiny bit of electricity!".
- The first sizing check is current.
- It gives the stored magnetic energy a local path instead of letting transistor voltage rise sharply.
- With a forced gain of 10, 80 mA / 10 = 8 mA of base current, which makes 330 Ω a suitable nearby standard resistor for the shown drive.
Retrieval practice
Recall check 1 of 5

Motor Max says: answer from memory, then check your reasoning.
Q1A 12V relay coil switches a 120V AC heater. If the relay fails with contacts welded closed, what happens?
Show answer
Answer: B Welded relay contacts stay closed even when the coil is de-energized.
Retrieval practice
Recall check 2 of 5

Motor Max says: answer from memory, then check your reasoning.
Q2A microcontroller switches a 12 V DC relay coil through a transistor. The transistor's steady-current rating and supply have been checked, but failures occur when the coil is switched off and there is no suppression path. What is the mechanism and fix?
Show answer
Answer: A see answers page
Retrieval practice
Recall check 3 of 5

Motor Max says: answer from memory, then check your reasoning.
Q3A smart plug uses a 12 V DC-coil relay rated to switch 10 A at 120 V AC. It switches a 1,500 W resistive heater (12.5 A) and its contacts later weld closed. Which documented mismatch is the strongest cause?
Show answer
Answer: C see answers page
Retrieval practice
Recall check 4 of 5

Motor Max says: answer from memory, then check your reasoning.
Q4A lock uses one 200 ms, 2 A solenoid pulse per cycle from eight 1.5 V AA cells in series, each rated 2,500 mAh. For pulse-energy arithmetic only, assume all rated capacity is usable and ignore standby draw and voltage sag. About how many cycles are possible in this ideal model?
Show answer
Answer: A see answers page
Retrieval practice
Recall check 5 of 5

Motor Max says: answer from memory, then check your reasoning.
Q5Place each relay or solenoid responsibility where it lives so you can trace a safe logic command across the coil boundary to the switched load.
Show answer
Answer: A Place each relay or solenoid responsibility where it lives so you can trace a safe logic command across the coil boundary to the switched load.
Retrieval practice
Recall check 5 of 5

Motor Max says: answer from memory, then check your reasoning.
Q6Complete the relay control code with safety features:
Show answer
Answer: A Relays are initialized as output pins starting LOW (value=0) for safety.
Print reference
Answers 1 of 4
Answer key.
- B · Welded relay contacts stay closed even when the coil is de-energized.
- A · A coil's stored energy produces V = L(di/dt) on turn-off, a large spike that kills drivers; a reverse-biased flyback diode across a DC coil (or an RC snubber/MOV across AC contacts) safely dissipates the collapsing current.
Print reference
Answers 2 of 4
Answer key.
- C · For the stated resistive heater, 1,500 W / 120 V = 12.5 A, above the relay's 10 A contact rating. That overload is a documented mismatch and a credible cause of contact damage and welding. Choose a properly rated relay for the actual switching duty and provide independent protection against a heater stuck on.
Print reference
Answers 3 of 4
Answer key.
- A · One pulse uses 2 A × 0.2 s / 3600 = 0.000111 Ah, or about 0.111 mAh. Eight cells in series provide 12 V nominal while retaining 2,500 mAh rated capacity, so the ideal pulse-only count is about 22,500. This is not a practical battery-life prediction; pulse sag, standby draw, temperature, ageing, and reserve capacity need measurement.
- A · Place each relay or solenoid responsibility where it lives so you can trace a safe logic command across the coil boundary to the switched load.
Print reference
Answers 4 of 4
Answer key.
- A · Relays are initialized as output pins starting LOW (value=0) for safety.