2  Actuators

2.1 Overview

While sensors allow IoT systems to perceive the physical world, actuators enable them to affect it. Actuators convert electrical signals into physical action - movement, light, sound, or heat. They are the “hands” of IoT systems, executing commands based on sensor data and control logic.

This comprehensive guide to actuators is organized into focused chapters for easier learning.

2.2 Learning Objectives

After completing this series, you will be able to:

  • Classify actuators by type, operating principle, and application domain
  • Interface common actuators with microcontrollers using appropriate driver circuits
  • Control motors (DC, stepper, servo) for precise motion
  • Implement relays and switches for high-power control
  • Drive displays and visual indicators
  • Design actuator control systems with feedback loops
  • Implement safety mechanisms for actuator systems
  • Select and size appropriate actuators for specific IoT applications
In 60 Seconds

Actuators are the physical output side of IoT — they convert electrical signals into mechanical motion, light, sound, and heat, completing the sense-decide-act cycle. The three most common motor types cover most IoT needs: DC motors for continuous rotation (fans, wheels, pumps), servo motors for precise angular positioning (robotic arms, pan-tilt systems), and stepper motors for precise discrete positioning (3D printers, CNC machines). Never connect any actuator directly to a GPIO pin — always use a driver circuit.

Key Concepts
  • Actuator: A device that converts electrical energy into physical action — motion, light, sound, heat, or switching of a high-power circuit — enabling IoT systems to affect the physical world in response to sensor data
  • Sense-Decide-Act Cycle: The fundamental IoT control loop: sensors perceive the environment, the microcontroller decides on a response based on logic and sensor data, and actuators execute the physical action; actuators are the ‘act’ stage
  • Driver Circuit: Electronic circuitry (transistors, MOSFETs, H-bridges, relay modules) that amplifies a low-current GPIO control signal to the high current required by an actuator; essential because GPIO pins source only 20-40 mA while actuators require 100 mA to several amps
  • PWM for Actuator Control: Pulse Width Modulation varies average power delivered to an actuator by switching on and off rapidly; controls DC motor speed, servo position (via pulse width), LED brightness, and heater temperature
  • H-Bridge: A circuit of four switches enabling bidirectional current flow through a DC motor or other actuator; allows both forward and reverse rotation from a single power supply; essential for any application requiring motor reversal
  • Flyback Diode: A reverse-biased diode across any inductive actuator (relay coil, solenoid, motor) that absorbs the voltage spike when coil current is switched off; prevents destruction of the driver transistor or MOSFET
  • Actuator Selection Criteria: Five parameters: output type (motion, light, sound, heat, switching), force/torque requirement, operating voltage and current, positioning precision requirement, and duty cycle (continuous vs. intermittent operation)
  • Back-EMF: Voltage generated by a spinning motor acting as a generator in reverse; must be managed by driver circuits through freewheeling diodes or active braking to prevent voltage spikes from damaging electronic components

2.3 Minimum Viable Understanding

If you only have 5 minutes, here are the absolute essentials about actuators:

  1. Actuators are the output side of IoT – they convert electrical signals into physical actions (motion, light, sound, heat), completing the sense-decide-act loop that makes IoT systems useful in the real world.
  2. Three motor types cover most needs: DC motors for continuous rotation (fans, wheels), servo motors for precise angular positioning (robotic arms, steering), and stepper motors for precise discrete steps (3D printers, CNC machines).
  3. Never connect actuators directly to microcontroller pins – always use driver circuits (transistors, H-bridges, relay modules) because actuators draw far more current than GPIO pins can supply (20-40 mA vs. hundreds of mA or amps).

Bella the Buzzer explains to her friends:

“Think of actuators like the arms and legs of a robot! Sensors are the eyes and ears – they notice things like temperature or light. But actuators are the parts that actually DO something about it!”

Sammy the Temperature Sensor adds: “When I notice a room is too hot, I tell the system. But it is Spinny the Fan Motor who actually blows cool air to fix the problem. Without actuators, I would just keep saying ‘it is hot!’ and nothing would happen.”

Real-world example: Imagine your house has a smart thermostat. The temperature sensor (like Sammy) reads the room is 30 degrees Celsius. The brain (microcontroller) decides that is too hot. Then the actuator (the air conditioner motor) turns on and cools the room. Sensors detect, brains decide, actuators act!

Key idea: Sensors and actuators are a team. Sensors without actuators can only watch. Actuators without sensors just do the same thing over and over without knowing if it is working.

An actuator is any device that converts an electrical signal into a physical action. If you have ever used a device that moves, lights up, makes sound, or generates heat in response to a command, you have interacted with an actuator.

Common actuators you use every day:

  • Motors in fans, washing machines, and electric car windows
  • LEDs on your phone, laptop, and traffic lights
  • Speakers in headphones and smart assistants
  • Solenoids in door locks and vending machines
  • Heating elements in kettles and toasters

In IoT systems, actuators are controlled by microcontrollers (small computers). The microcontroller reads sensor data, makes a decision, and sends an electrical signal to the actuator to perform an action. This is called the sense-decide-act cycle.

Why can’t we just plug actuators into the microcontroller directly? Most actuators need much more electrical power than a microcontroller pin can provide. A typical GPIO pin outputs only 20-40 milliamps, but a small motor might need 500 milliamps or more. That is why we use driver circuits – they act as power amplifiers between the microcontroller and the actuator.

2.4 How Actuators Fit into IoT Systems

The following diagram shows where actuators fit within the classic IoT control loop:

IoT control loop diagram showing sensors feeding data to a microcontroller which processes the information and sends commands to actuators that affect the physical environment, forming a closed feedback loop.

2.5 Actuator Classification Overview

Actuators can be classified by the type of physical output they produce:

Mind map showing actuator classification into five categories: Mechanical (motors, solenoids, pneumatic, hydraulic), Visual (LEDs, displays, projectors), Audio (buzzers, speakers, haptic), Thermal (heaters, Peltier coolers, fans), and Electrical (relays, solid-state switches, triacs).

2.6 Chapter Guide

2.6.1 Getting Started

Chapter Topics Time
Introduction to Actuators What are actuators, sensors vs actuators, why drivers are needed, beginner-friendly explanations 20 min
Classifications and Comparison Actuator types, motor comparison, selection decision trees, application guides 15 min

2.6.2 Motor Control

Chapter Topics Time
DC Motors PWM speed control, H-bridge drivers, L298N/TB6612, PID control, BLDC basics 35 min
Servo Motors Pulse width positioning, multi-servo control, robotic arms, pan-tilt mechanisms 25 min
Stepper Motors Step sequences, 28BYJ-48/NEMA 17, AccelStepper library, microstepping 25 min

2.6.3 Switching and Output

Chapter Topics Time
Relays and Solenoids Relay control, solenoid valves, SSR, flyback protection, high-voltage safety 20 min
Visual and Audio Actuators LEDs, NeoPixels, LCD/OLED displays, buzzers, speakers 25 min

2.6.4 Control and Safety

Chapter Topics Time
PWM Control Interactive PWM calculator, duty cycle formulas, frequency selection, ESP32 configuration 20 min
Safety and Protection Flyback diodes, watchdog timers, fail-safe design, common pitfalls 20 min

2.6.5 Practice and Assessment

Chapter Topics Time
Hands-On Labs Wokwi simulations, DC motor lab, servo gripper, multi-actuator projects, PID control 60 min
Assessment and Reference Interactive quiz, quick reference cards, troubleshooting guide, summary 30 min

2.7 Actuator Selection Decision Flow

Selecting the right actuator for an IoT application depends on the type of physical action needed:

Flowchart guiding actuator selection based on the required action type. Starting from the question What action is needed, it branches into Motion (leading to DC, servo, or stepper motors), Switching (leading to relays or solenoids), Visual Output (leading to LEDs or displays), and Audio Output (leading to buzzers or speakers).

2.8 Worked Example: Smart Greenhouse Actuator System

Real-World Scenario: Designing the Actuator System for a Smart Greenhouse

Problem: A school wants to automate their greenhouse. They need to control temperature, lighting, and watering based on sensor readings. Your task is to select and size the actuators.

Requirements gathered from sensors:

Parameter Sensor Reading Target Range Action Needed
Temperature 35 C 20-28 C Cool the greenhouse
Soil moisture 15% 40-60% Water the plants
Light level 200 lux (cloudy) 500-1000 lux Supplement lighting
Door status Open Closed at night Lock the door

Step 1: Match each action to an actuator type

  • Cooling: 12V DC fan motor (continuous airflow needed, so DC motor is the right choice)
  • Watering: 12V solenoid valve (open/close water flow – linear push/pull action)
  • Lighting: LED grow light strip controlled via MOSFET (PWM dimming for brightness)
  • Door lock: 12V solenoid lock (linear push/pull for latch mechanism)

Step 2: Determine power requirements

Actuator Voltage Current Draw Driver Needed
DC fan motor 12V 350 mA L298N H-bridge or MOSFET
Solenoid valve 12V 800 mA TIP120 transistor + flyback diode
LED grow light 12V 1.5 A IRLZ44N MOSFET
Solenoid lock 12V 600 mA TIP120 transistor + flyback diode

Total current: 350 + 800 + 1500 + 600 = 3,250 mA = 3.25 A at 12V

Power supply selection: A 12V 5A power supply provides adequate headroom (never use a supply at more than 80% rated capacity for reliability).

Step 3: Safety considerations

  • Flyback diodes (1N4007) across both solenoids and the DC motor
  • Watchdog timer to shut off water solenoid if microcontroller crashes (prevents flooding)
  • Current-limiting resistor (220Ω) for LED MOSFET gate protection
  • Fail-safe: solenoid valve is normally-closed so loss of power stops watering

Result: The system uses four actuator types, all driven from a single 12V supply with appropriate driver circuits and safety components. Total bill of materials for actuators and drivers is under $25.

Let’s calculate the exact power budget and verify the 5A power supply can handle simultaneous operation:

Interactive Power Budget Calculator:

Try adjusting the actuator currents below to see how they affect total power requirements and operating costs:

Static Calculation (Default Values):

Running Current Scenario (All Actuators Active at Steady State):

\[I_{total} = I_{fan} + I_{valve} + I_{LED} + I_{lock}\]

\[I_{total} = 350mA + 800mA + 1500mA + 600mA = 3.25A\]

Power dissipation:

\[P = V \times I = 12V \times 3.25A = 39W\]

Safety margin with 5A supply:

\[\text{Margin} = \frac{5A - 3.25A}{5A} = 35\% \text{ headroom}\]

This exceeds the recommended 20% safety margin, accounting for inrush currents when solenoids and motors first energize (typically 2-3× running current for 50-200ms).

Note on Peak Current: The above calculation shows steady-state running current. During startup, the DC motor could briefly draw 1.05-1.75A (3-5× the 350mA running current), pushing total peak demand to 4.2-4.9A. The 5A supply can handle this momentary surge, which is why the 35% safety margin is critical – it accommodates these transient events.

Daily energy consumption (assuming 10% duty cycle):

\[E_{daily} = 39W \times 0.1 \times 24h = 93.6 \text{ Wh/day}\]

At $0.12/kWh: 0.0936 kWh × $0.12/kWh = $0.011/day or $4.10/year to operate.

Architecture diagram of a smart greenhouse actuator system showing an ESP32 microcontroller connected through driver circuits to four actuators: a DC fan motor for cooling, a solenoid valve for watering, an LED grow light for supplemental lighting, and a solenoid lock for the door, with sensor inputs from temperature, soil moisture, light, and door sensors.

2.9 Common Pitfalls

When controlling high-power actuators (heaters, pumps, motors, lights), you must choose a switching technology. This framework helps you select the right one based on load characteristics and requirements.

Selection Criterion Mechanical Relay Solid-State Relay (SSR) Power MOSFET (Example: IRLZ44N)
Voltage Switching AC or DC up to 250V AC or DC up to 480V DC only, up to 55V (varies by model)
Current Rating Up to 10-30A Up to 40-100A Up to 40-100A with heatsink
Switching Speed 5-20ms (slow) <1ms (fast) Microseconds (very fast)
Lifespan (Switching Cycles) 100,000-1,000,000 100,000,000+ (no wear) Unlimited (solid-state)
Electrical Isolation Yes (optical isolation) Yes (optical isolation) No (common ground needed)
On-State Voltage Drop Near 0V (contacts closed) 1-2V (SSR forward drop) 0.03V (very low Rds_on)
Power Dissipation at 10A <1W (contacts) 10-20W (SSR heats up) 3W (I² × Rds_on)
Control Current 70-100mA (coil) 10-20mA (LED) 1mA (gate charge)
Noise Generation Click sound, EMI spike Silent Silent
Cost $2-5 $8-20 $1-3
Best For High voltage AC, infrequent switching Frequent switching, long life DC loads, PWM, low voltage drop

Decision Tree:

Q1: Are you switching AC voltage (110V/220V mains)?

  • YES → Use Mechanical Relay or Solid-State Relay (MOSFETs cannot switch AC)
    • Go to Q2
  • NO (DC voltage only) → Continue to Q3

Q2: (For AC loads) How often does the load switch ON/OFF?

  • Infrequent (< 1000 times/day, like HVAC control) → Use Mechanical Relay (cheapest, isolation, adequate lifespan)
  • Frequent (> 10,000 times/day, like dimmer circuits) → Use Solid-State Relay (no mechanical wear, silent, long life)

Q3: (For DC loads) Do you need electrical isolation between control and load?

  • YES (for safety or different ground domains) → Use Mechanical Relay (galvanic isolation via coil/contacts)
  • NO (common ground OK) → Continue to Q4

Q4: What is the load voltage?

  • High voltage (24V-48V DC) → Use Mechanical Relay or High-Voltage MOSFET
  • Low voltage (5V-12V DC, typical for IoT) → Use Power MOSFET (lowest loss, fastest switching, PWM-capable)

Real-World Application Examples:

Example 1: Smart Home HVAC Control

  • Load: 120V AC central air conditioner (15A)
  • Switching Frequency: 10-30 times per day
  • Choice: Mechanical Relay (Omron G5LE-14 rated 10A @ 120VAC)
  • Why: AC load, infrequent switching (relay lasts 10+ years at this rate), electrical isolation protects ESP32 from mains voltage, low cost ($3)
  • Implementation: ESP32 GPIO → 2N2222 transistor → Relay coil → AC contactor

Example 2: LED Grow Light PWM Dimming

  • Load: 12V DC LED strip (5A continuous)
  • Switching Frequency: 5kHz PWM (5,000 ON/OFF per second)
  • Choice: Power MOSFET (IRLZ44N)
  • Why: Relay cannot switch 5kHz (would arc and fail immediately), SSR overheats at high-frequency switching, MOSFET handles PWM perfectly with only 3W heat dissipation
  • Implementation: ESP32 PWM GPIO → 220Ω gate resistor → MOSFET gate → LED strip

Example 3: Industrial Heater Control

  • Load: 240V AC industrial heater (30A)
  • Switching Frequency: Temperature PID control, switches every 10-60 seconds
  • Choice: Solid-State Relay (Crydom D2D40 rated 40A)
  • Why: Frequent switching (mechanical relay would wear out in months), zero-cross switching reduces EMI, silent operation (important in work environment), heatsink needed for 40A
  • Cost: $25 SSR vs $6 mechanical relay, but SSR lasts 20+ years vs 6-12 months for mechanical

Example 4: Solar Panel Battery Charging

  • Load: 12V battery, charge current 10A
  • Switching Frequency: MPPT algorithm switches 20kHz to regulate voltage
  • Choice: Power MOSFET (IRFZ44N with heatsink)
  • Why: High-frequency PWM for MPPT, very low voltage drop (0.03V) critical for efficiency, battery and controller share common ground (no isolation needed)
  • Efficiency: MOSFET: 99.7% (0.03V drop at 10A = 0.3W loss vs 120W delivered). SSR: 98.3% (2V drop = 20W loss).

Example 5: Water Pump for Agriculture

  • Load: 24V DC submersible pump (8A)
  • Switching Frequency: ON/OFF 4-6 times per day based on soil moisture
  • Choice: Mechanical Relay (automotive relay rated 30A @ 12V)
  • Why: Inductive load (pump motor) benefits from relay’s ability to handle inrush current (MOSFET could fail without proper snubber), electrical isolation protects ESP32 from motor noise, low switching frequency makes relay viable, pump voltage and controller different grounds
  • Protection: Flyback diode across relay coil, snubber capacitor across pump terminals to suppress arcing

Common Mistakes to Avoid:

Mistake 1: Using mechanical relay for PWM or high-frequency switching - Problem: Relay contacts rated for only 100,000-1,000,000 operations. At 1 Hz switching, relay fails within 12-280 hours. - Fix: Use MOSFET for >10 Hz switching, SSR for AC dimming applications

Mistake 2: Using MOSFET without heatsink for high-current loads - Problem: IRLZ44N has Rds_on = 0.022Ω. At 20A, power dissipation = 20² × 0.022 = 8.8W. Without heatsink, junction temperature exceeds 175°C max rating, MOSFET fails. - Fix: Calculate P = I² × Rds_on. If >2W, add heatsink. For 20A, need heatsink with <10°C/W thermal resistance.

Mistake 3: Using SSR for low-duty-cycle loads due to forward voltage drop - Problem: SSR has 1-2V forward drop. For 12V 10A load (120W), SSR dissipates 10-20W continuously even though load is ON only 10% of time. SSR overheats. - Fix: For low duty cycle (<50%), use relay or MOSFET which have near-zero voltage drop when ON.

Mistake 4: No flyback diode on relay coil or inductive load - Problem: Relay coil (inductor) generates voltage spike when turned OFF. Spike destroys switching transistor. - Fix: Always place 1N4007 diode across relay coil (cathode to +V, anode to coil). Also add snubber across inductive loads like motors, solenoids.

Cost-Benefit Summary for 5-Year Lifetime:

Assuming 10A load, 1,000,000 switching cycles over 5 years:

Mechanical Relay: $4 × 10 replacements (fails after 100,000 cycles) = $40 total cost + labor Solid-State Relay: $20 × 1 (lasts entire 5 years) = $20 total cost (no labor) Power MOSFET: $2 × 1 (unlimited lifespan if properly cooled) = $2 total cost

Key Insight: For infrequent switching (<100 cycles/day), mechanical relays are cheapest. For frequent switching (>1000 cycles/day), SSRs or MOSFETs are cheaper over lifetime despite higher initial cost. For PWM or ultra-fast switching, only MOSFETs work.

Common Actuator Mistakes to Avoid

1. Connecting motors directly to GPIO pins Microcontroller GPIO pins can typically supply only 20-40 mA. A small DC motor draws 100-500 mA, and a solenoid can draw over 1 A. Connecting directly will either damage the microcontroller or produce no useful motion. Always use a driver circuit (transistor, MOSFET, H-bridge, or motor driver IC).

2. Forgetting flyback diodes on inductive loads Motors, relays, and solenoids are inductive. When power is removed, the collapsing magnetic field generates a voltage spike that can reach hundreds of volts – enough to destroy your transistor, MOSFET, or microcontroller. Always place a flyback diode (such as 1N4007) reverse-biased across the actuator terminals.

3. Undersizing the power supply Adding up the current draw of all actuators is necessary but not sufficient. Motors have startup (stall) currents that are 5-10 times their running current. A motor rated at 300 mA running might draw 1.5 A on startup. Size your power supply for peak simultaneous demand, not average current.

4. No fail-safe design If the microcontroller crashes or loses power, what happens to the actuators? A normally-open solenoid valve controlling water will stay closed (safe). A normally-closed valve will stay open (flooding). Always think about the failure mode and choose actuator types and wiring that fail safely.

5. Using the wrong PWM frequency DC motors typically need 1-20 kHz PWM. Too low (under 1 kHz) and you hear an audible whine. Too high (over 20 kHz for some drivers) and the driver circuit cannot switch fast enough, causing excessive heat. Standard hobby servos require exactly 50 Hz PWM with 1-2 ms pulse widths – using the wrong frequency will cause erratic behavior or damage (note: some digital servos support higher frequencies).

6. Ignoring back-EMF from DC motors When a DC motor spins, it generates voltage (back-EMF). If you suddenly reverse direction, the back-EMF adds to the supply voltage, potentially exceeding the driver’s voltage rating. Use appropriate braking sequences and allow coast-down time before reversing.

2.10 Knowledge Check

Test your understanding of actuator fundamentals:

2.11 Prerequisites

Before diving into actuators, you should be familiar with:

2.12 Quick Start

New to actuators? Start with Introduction to Actuators for beginner-friendly explanations.

Know the basics? Jump to Motor Control or your specific actuator type.

Need a reference? Check the Assessment and Reference chapter for quick reference cards.

2.13 Summary

Actuators are the essential output components of IoT systems, transforming digital decisions into physical actions. This chapter series covers the full spectrum of actuator technologies:

Topic Area Key Takeaway
Actuator types Five categories – mechanical, visual, audio, thermal, and electrical – cover all IoT output needs
Motor selection DC motors for speed, servos for angles, steppers for precise steps – each has distinct tradeoffs in cost, precision, and efficiency
Driver circuits Always required between microcontroller and actuator; H-bridges for bidirectional motor control, transistors/MOSFETs for switching
Safety Flyback diodes, fail-safe design, proper power supply sizing, and watchdog timers are non-negotiable in production systems
Control methods PWM for proportional control (speed, brightness), digital signals for on/off switching, step/direction for stepper positioning
System design Match actuators to physical requirements first, then design driver circuits, then size the power supply for peak demand with margin

The chapters that follow will take you from understanding individual actuator types through to building complete, safe, multi-actuator IoT systems with hands-on labs.

2.14 See Also

2.15 What’s Next

If you want to… Read this
Learn about motor control fundamentals Actuator Classifications
Understand PWM for motor speed and servo position control PWM Control
Explore safety circuits and protection for actuator systems Actuator Safety
Practice actuator control in hands-on labs Actuator Labs