Solenoids, relays and piezo actuators

Solenoid force across an air gap, relay coil drive, contact ratings and solid-state relays, and piezo stack stroke, blocked force and drive current, with relay-driver, solenoid-gap and piezo examples.

Drafted with Aria, reviewed by the AiCanCode.org team. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Solenoids open valves, lock doors and push parts off conveyors; relays let a 5 V microcontroller switch a 230 V motor or heater; piezo actuators position lenses, inject diesel fuel and drive inkjet nozzles with nanometre precision. Sizing these actuators, and driving them safely from electronics, is one of the most common small design tasks in mechatronics.

Key ideas

Solenoid actuators. A solenoid is a coil with a soft-iron frame and a movable iron plunger. Current in the coil sets up flux across an air gap, and the plunger is pulled in the direction that shortens the gap (reduces reluctance). The force is always attractive, whatever the current direction, so a return spring brings the plunger back. Key properties:

  • Force rises steeply as the gap closes (roughly as 1/g² while the iron is unsaturated). The force–stroke curve is therefore far from flat: weakest at the start of the stroke, strongest at the end. Strokes are short, typically a few millimetres to about 25 mm.
  • Pull-in and hold. A large current is needed to start the stroke; far less is needed to hold the closed plunger. "Peak-and-hold" drivers or PWM reduce the current after pull-in to cut heating.
  • Duty cycle rating. Coils are rated for continuous or intermittent duty; running an intermittent coil continuously overheats it.
  • Types: pull, push (a rod through the plunger), latching (a permanent magnet holds the position with no current), rotary, and proportional solenoids (shaped pole pieces give a flatter force–stroke curve, used in hydraulic proportional valves).

Electromagnetic relays. A relay is a solenoid that moves an armature carrying switch contacts. Contact forms: SPST-NO (normally open), SPST-NC, SPDT (changeover), DPDT. Coil data: rated voltage, coil resistance, pick-up (must-operate) voltage, drop-out (must-release) voltage. Contact data: rated current and voltage, different for AC and DC loads because a DC arc does not self-extinguish at a current zero. Relays give galvanic isolation between the control and load circuits.

  • Driving a relay coil. A microcontroller pin cannot supply the coil current, so a transistor (or driver IC such as a Darlington array) switches it. A flyback (freewheeling) diode across the coil is essential: when the transistor turns off, the coil inductance tries to keep the current flowing (v = L·di/dt) and would produce a voltage spike large enough to destroy the transistor.
  • Solid-state relays (SSRs) use a triac/thyristor pair (AC) or MOSFETs (DC) with an optocoupler for isolation. No moving parts, silent, fast and long-lived; zero-cross types switch on at a voltage zero to reduce interference. Drawbacks: on-state voltage drop and heat (heat sink needed), off-state leakage current, and failure usually in the shorted (on) state.
  • Reed relays have contacts sealed in a glass tube, operated by the coil field: fast and low-power, for small signals.

Piezoelectric actuators. Piezoelectric ceramics (usually PZT, lead zirconate titanate) strain when an electric field is applied: the converse piezoelectric effect. One layer gives a strain of only about 0.1 %, so practical actuators are either stacks (many thin layers in series mechanically and in parallel electrically, giving tens of micrometres of stroke with kilonewtons of force) or benders (bimorphs, giving larger motion but little force).

  • Force–stroke trade-off. The free stroke Δx₀ is obtained with no load; the blocked force F_b is obtained when the actuator is clamped rigidly. Between them the relation is linear. Against a spring load the stroke is reduced by the stiffness ratio.
  • Electrically a capacitor. A static position draws almost no current, but fast motion needs current i = C·dV/dt, so dynamic drives need power amplifiers.
  • Non-idealities. Hysteresis of about 10–15 % of stroke and slow creep in open loop; precision stages use strain-gauge or capacitive sensors in closed loop. Stacks are weak in tension and must be preloaded.
  • Typical d₃₃ values for PZT are a few hundred pm/V; take the exact value from the manufacturer's data sheet.

Formulas

B = μ₀ · N · I / g

  • B: flux density in the air gap (T); μ₀ = 4π × 10⁻⁷ H/m (permeability of free space — the gap is air); N: turns; I: current (A); g: air-gap length (m). Assumes the iron reluctance is negligible and the iron is unsaturated.

F = B² · A / (2 · μ₀) = μ₀ · (N · I)² · A / (2 · g²)

  • F: pull force across one gap (N); A: pole-face area (m²). Use only while B stays below saturation (about 1.5 T for soft iron).

F = ½ · I² · dL/dx

  • General form: force from the rate of change of coil inductance L (H) with plunger position x (m).

I_coil = V / R_coil, I_B ≥ I_coil / β_min

  • Relay coil current (A) and the transistor base current needed to saturate it (β_min: minimum current gain); use a 2–5× overdrive.

Δx₀ = n · d₃₃ · V

  • Free stroke of a piezo stack (m); n: number of layers; d₃₃: piezoelectric coefficient (m/V, numerically equal to C/N); V: voltage across each layer (V).

F_b = k_A · Δx₀ and Δx = Δx₀ · k_A / (k_A + k_L)

  • F_b: blocked force (N); k_A: actuator stiffness (N/m); k_L: stiffness of an external spring load (N/m); Δx: stroke against that spring.

i = C · dV/dt

  • Current to charge a piezo actuator of capacitance C (F) at voltage slew rate dV/dt (V/s).

Worked examples

Example 1 (standard): driving a relay from a microcontroller. Given: a 12 V relay with coil resistance 400 Ω, driven by an NPN transistor (β_min = 100, V_BE = 0.7 V) from a 5 V logic pin. Use 2× overdrive.

  1. Coil current: I_coil = V/R_coil = 12/400 = 30 mA.
  2. Minimum base current: 30 mA / 100 = 0.3 mA; with 2× overdrive I_B = 0.6 mA.
  3. Base resistor: R_B = (5 − 0.7)/I_B = 4.3/0.0006 = 7.17 kΩ, so choose the next lower standard value, 6.8 kΩ.
  4. Fit a flyback diode (e.g. a 1N4148 or 1N4007) across the coil, cathode to +12 V.

Example 2 (GATE level): solenoid force versus gap. Given: N = 500 turns, I = 2 A, pole-face area A = 1 cm² = 1 × 10⁻⁴ m², single air gap. Neglect iron reluctance. Find the force at g = 2 mm and at g = 1 mm, and comment.

  1. Formula: F = μ₀·(N·I)²·A/(2·g²), with N·I = 1000 A.
  2. At g = 2 mm: F = 4π × 10⁻⁷ × 1000² × 1 × 10⁻⁴ / (2 × (2 × 10⁻³)²) = 1.2566 × 10⁻⁴ / 8 × 10⁻⁶ = 15.7 N.
  3. At g = 1 mm: halving the gap multiplies the force by 4, giving 62.8 N.
  4. Check the flux density: at 1 mm, B = μ₀·N·I/g = 1.2566 × 10⁻⁶ × 1000 / 0.001 = 1.26 T — close to saturation of soft iron, so at smaller gaps the real force rises less steeply than 1/g² predicts.

Example 3: piezo stack against a spring. Given: a 200-layer stack, d₃₃ = 500 pm/V, 100 V per layer, actuator stiffness k_A = 100 N/µm, capacitance 2 µF. Find the free stroke, blocked force, stroke against a spring of k_L = 50 N/µm, and drive current for a 100 V ramp in 1 ms.

  1. Δx₀ = n·d₃₃·V = 200 × 500 × 10⁻¹² × 100 = 1 × 10⁻⁵ m = 10 µm.
  2. F_b = k_A·Δx₀ = 100 × 10⁶ N/m × 10 × 10⁻⁶ m = 1000 N.
  3. Δx = Δx₀·k_A/(k_A + k_L) = 10 × 100/150 = 6.67 µm.
  4. i = C·dV/dt = 2 × 10⁻⁶ × 100/0.001 = 0.2 A during the ramp.

Common mistakes

  • Using the core permeability in the gap-force formula. The energy is stored in the air gap, so use μ₀.
  • Applying F ∝ 1/g² down to zero gap. Saturation, and the residual non-magnetic gap, cap the force.
  • Omitting the flyback diode on a relay or solenoid coil driven by a transistor.
  • Choosing a relay by its AC contact rating for a DC load; DC ratings are much lower at the same voltage.
  • Assuming an SSR is a perfect switch. It drops about 1–1.5 V, needs a heat sink, and leaks current when off.
  • Treating a piezo actuator as a resistive load, or expecting both full stroke and full force at the same time.

For GATE ME

This topic produces short conceptual questions (relay contact forms, SSR versus electromechanical relay, piezoelectric effect, why a flyback diode is needed) and numericals on electromagnetic force across an air gap, relay-coil and transistor-drive currents, and piezo stroke and force. Practise the B²A/(2μ₀) force, the 1/g² scaling, and the force–stroke line of a piezo stack.

Quick check

  1. Why is a solenoid's pull force smallest at the start of its stroke?
  2. A 24 V relay coil has a resistance of 960 Ω. What is the coil current?
  3. What does the flyback diode across a relay coil protect?
  4. A piezo stack has a free stroke of 20 µm and stiffness 50 N/µm. What is its blocked force?
  5. Name one drawback of a solid-state relay.

Answers: 1. The air gap is largest there, and force varies roughly as 1/g². 2. 25 mA. 3. The driving transistor, from the L·di/dt voltage spike at turn-off. 4. 1000 N. 5. Any of: on-state voltage drop and heating, off-state leakage, fails short.

Try answering each one aloud before you open it.

  1. 1.What is a solenoid and how does it work?Concept

    A solenoid is a type of electromagnetic actuator that converts electrical energy into linear mechanical motion. It consists of a coil of wire wrapped around a movable metal core (plunger). When an electric current passes through the coil, it creates a magnetic field that pulls the plunger into the coil, creating motion. This motion can be used to perform work, such as opening a valve or moving a lever.

  2. 2.Explain the working principle of a relay.Concept

    A relay is an electrically operated switch that uses an electromagnet to mechanically operate a switch. When a small current flows through the coil of the relay, it generates a magnetic field that attracts a lever and changes the switch contacts. This allows a larger current to flow through the other circuit. Relays are used to control a high-power circuit with a low-power signal.

  3. 3.What is a piezo actuator and where is it commonly used?Concept

    A piezo actuator is a device that uses the piezoelectric effect to produce a small displacement with high force capability when an electric voltage is applied. It is commonly used in precision positioning applications, such as in optical devices, microelectronics, and medical instruments, where precise control of movement is required.

  4. 4.Why are solenoids used in automotive starter systems?Application

    Solenoids are used in automotive starter systems to engage the starter motor with the engine's flywheel. When the ignition key is turned, the solenoid receives an electrical signal, creating a magnetic field that pulls a plunger. This action closes the circuit to the starter motor, allowing it to draw power from the battery and start the engine. Solenoids provide the necessary force to engage the starter gear with the flywheel reliably.

  5. 5.What happens if a relay coil is supplied with a voltage higher than its rated value?Application

    If a relay coil is supplied with a voltage higher than its rated value, it can cause excessive current to flow through the coil, leading to overheating and potential damage to the coil insulation. This can result in the relay failing to operate correctly or even becoming permanently damaged. It is important to use a relay with a coil voltage rating that matches the supply voltage to avoid such issues.

  6. 6.How does a piezo actuator differ from a solenoid in terms of motion and applications?Application

    A piezo actuator differs from a solenoid in that it provides very precise and small displacements with high force, whereas a solenoid provides larger linear motion with less precision. Piezo actuators are used in applications requiring fine control, such as in optics and micro-positioning, while solenoids are used in applications requiring more substantial movement, such as in valves and switches.

  7. 7.A solenoid has 500 turns carrying 2 A, a pole-face area of 1 cm² and a single air gap of 2 mm. Neglecting iron reluctance, estimate the pull force.Numerical

    The force across an air gap is F = μ₀·(N·I)²·A/(2·g²), using μ₀ = 4π × 10⁻⁷ H/m because the energy is stored in the air gap. With N·I = 1000 A, A = 1 × 10⁻⁴ m² and g = 0.002 m, F = 1.2566 × 10⁻⁶ × 10⁶ × 10⁻⁴ / (8 × 10⁻⁶) ≈ 15.7 N. Halving the gap would quadruple the force, until the iron begins to saturate.

  8. 8.What are the advantages of using a relay over a direct switch in high-power applications?Application

    Relays offer several advantages over direct switches in high-power applications. They allow a low-power circuit to control a high-power circuit, providing electrical isolation between the control and power circuits. This reduces the risk of electrical shock and damage to sensitive components. Relays also enable remote operation and can handle higher currents and voltages than typical manual switches.

  9. 9.Explain how a piezo actuator can be used for vibration control in mechanical systems.Application

    Piezo actuators can be used for vibration control by actively counteracting unwanted vibrations in mechanical systems. When integrated into a system, they can respond to vibration signals by expanding or contracting, thereby generating forces that oppose the vibrations. This active control helps in damping vibrations, improving system stability, and reducing noise, which is particularly useful in precision engineering applications.

  10. 10.A relay is rated for a coil voltage of 12 V and a contact current of 10 A. What happens if the contact current exceeds 10 A?Application

    If the contact current exceeds 10 A, the relay contacts may overheat and become damaged due to excessive current flow. This can lead to contact welding, where the contacts fuse together, preventing the relay from opening or closing properly. It can also cause the relay to fail prematurely, affecting the reliability of the system it controls.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?