13  Actuator Assessment and Reference

In 60 Seconds

This chapter provides a comprehensive self-assessment quiz on actuator concepts, quick reference cards for common actuator specifications and motor driver pinouts, and a troubleshooting guide for diagnosing actuator problems in IoT projects.

Key Concepts
  • Actuator Types Coverage: This assessment covers all major actuator categories: DC motors, servo motors, stepper motors, relays, solenoids, LEDs and visual indicators, buzzers, and their associated driver circuits
  • Motor Control Concepts: Key concepts tested: PWM for DC motor speed control, pulse width for servo position (1-2 ms), step sequences for stepper motors, H-bridge for direction control, and back-EMF protection with flyback diodes
  • Driver Circuit Requirements: Assessment questions test the understanding that direct GPIO-to-actuator connections exceed current limits; transistors, MOSFETs, H-bridges, and relay modules are required to interface MCU GPIO to actuators
  • Safety and Protection Circuits: Questions cover flyback diode placement, current limiting resistors, thermal shutdown, and the rationale for protection circuits in actuator driver designs
  • PWM Fundamentals: Duty cycle, frequency, and resolution concepts as they apply to motor speed control, LED dimming, and servo positioning; understanding which parameter controls which actuator behavior
  • Actuator Selection Criteria: Applying selection criteria: torque vs. speed requirements for motors, load current vs. coil voltage for relays, step resolution vs. speed for stepper motors
  • Feedback and Control Loops: Assessment questions on closed-loop control using position feedback (encoder, potentiometer) versus open-loop control, and when each is appropriate
  • Sense-Decide-Act Cycle: The fundamental IoT control loop connecting sensor inputs through microcontroller decision logic to actuator outputs; demonstrating understanding of how sensors and actuators work together

Learning Objectives

After completing this chapter, you will be able to:

  • Evaluate your actuator knowledge through interactive self-assessment quizzes
  • Interpret quick reference cards to identify correct specifications for common actuators and motor drivers
  • Diagnose actuator problems using systematic troubleshooting frameworks
  • Recommend the appropriate actuator type (DC, servo, or stepper motor) for real-world IoT scenarios

Actuator control decisions are often power-budget decisions. For PWM-driven loads:

\[ P_{\text{avg}} = V \cdot I_{\text{max}} \cdot D \]

where \(D\) is duty cycle (0 to 1).

Worked example: A 12V motor with 0.5A peak current at 40% duty cycle draws:

\[ P_{\text{avg}} = 12 \times 0.5 \times 0.40 = 2.4 \text{ W} \]

Running 2 hours/day consumes \(2.4 \times 2 = 4.8\) Wh/day. At 100% duty cycle it would be 12 Wh/day, so duty-cycle control cuts daily energy by 60% while still delivering usable actuation.

Interactive Calculator:

13.1 Interactive Self-Assessment Quiz

Test your understanding of actuators with this auto-graded quiz.


13.2 Quick Reference Cards

Actuator Voltage Current Control Interface Key Specs
Servo SG90 4.8-6V 500mA stall PWM (1000-2000us) 180 deg range
Servo MG996R 4.8-7.2V 2.5A stall PWM (1000-2000us) Metal gears
DC Motor (TT) 3-6V 200-500mA PWM + H-Bridge 200-300 RPM
Stepper 28BYJ-48 5V 200mA 4-wire sequential 2048 steps/rev
Stepper NEMA 17 12V 1.2A A4988/DRV8825 200 steps/rev
Relay 5V 5V coil 70mA coil Digital ON/OFF 10A @ 250VAC
Solenoid 12V 12V 500mA-1A Digital ON/OFF 10mm stroke
NeoPixel WS2812B 5V 60mA/pixel max Digital data Addressable RGB
Buzzer (Passive) 3-5V 20mA PWM tone Variable frequency

13.2.1 L298N H-Bridge Motor Driver

Pins Function
IN1, IN2 Motor A direction
IN3, IN4 Motor B direction
ENA, ENB PWM speed (remove jumper)
OUT1, OUT2 Motor A connections
OUT3, OUT4 Motor B connections
+12V Motor supply (5-35V)
+5V Logic output (when >7V input)
GND Common ground

Truth Table:

ENA IN1 IN2 Motor State
0 X X STOP (coast)
1 0 0 BRAKE
1 1 0 FORWARD
1 0 1 REVERSE
1 1 1 BRAKE

13.2.2 A4988 Stepper Driver

Pin Function
STEP Pulse for each step
DIR Direction (H/L)
ENABLE LOW=on, HIGH=off
MS1, MS2, MS3 Microstepping
1A, 1B, 2A, 2B Motor coils
VMOT 8-35V motor supply
VDD 3-5.5V logic

ESP32 PWM Setup:

const int pwmFreq = 5000;      // Frequency in Hz
const int pwmChannel = 0;       // 0-15 available
const int pwmResolution = 8;    // 8-bit = 0-255

ledcSetup(pwmChannel, pwmFreq, pwmResolution);
ledcAttachPin(GPIO_PIN, pwmChannel);
ledcWrite(pwmChannel, dutyCycle);

Formulas:

Duty Cycle (%) = (PWM value / Max value) x 100
Average Voltage = Supply Voltage x Duty Cycle

8-bit PWM:  Max = 255
10-bit PWM: Max = 1023
12-bit PWM: Max = 4095

Servo Timing (50 Hz):

1000 microseconds = 0 degrees
1500 microseconds = 90 degrees
2000 microseconds = 180 degrees
Problem Likely Cause Solution
Motor doesn’t run Wrong wiring Check IN1, IN2, EN connections
Motor only one direction Direction pins swapped Swap IN1 and IN2
Motor runs but slow Low PWM duty cycle Increase duty cycle
Servo jitters Insufficient power Use external 5V supply
Servo doesn’t move Wrong frequency Must be 50Hz for servos
Stepper skips steps Too fast Reduce speed, add acceleration
Driver overheats Current too high Add heatsink, reduce current
Random MCU resets Missing flyback diode Add diode across inductive loads
Relay won’t switch Coil voltage wrong Check coil voltage rating
LED very dim Missing current limit Add 220-330 ohm resistor

When your IoT project needs rotational motion, choosing the right motor type is critical for performance, cost, and power efficiency. Use this framework to systematically evaluate your options:

Selection Criterion DC Motor Servo Motor Stepper Motor
Motion Type Continuous rotation, any direction Limited rotation (0-180° or 0-360°) Precise discrete steps
Position Control None (open-loop) Built-in (closed-loop) Step counting (open-loop)
Speed Control Smooth via PWM Fixed speed per model Step rate (slower = more precise)
Holding Torque None (coasts when off) Strong (holds position) Very strong (resists motion when off)
Cost $2-10 (low) $5-20 (medium) $10-40 (higher)
Driver Complexity Simple (H-bridge) Very simple (PWM signal) Moderate (step sequencing)
Power Efficiency High Medium Low (current even at idle)
Typical Current Draw 100-500mA running 100-600mA peak 200-1500mA continuous
Applications Fans, wheels, pumps Robot arms, camera gimbals 3D printers, CNC machines

Decision Tree:

Q1: Do you need to control the POSITION of the shaft (not just speed)?

  • NO → Use DC motor (simplest, cheapest, most efficient for continuous rotation)
  • YES → Continue to Q2

Q2: Do you need full 360° continuous rotation OR limited angular range (like 0-180°)?

  • Limited range (0-180° or 0-270°) → Use Servo motor (easiest position control, built-in feedback)
  • Full 360°+ with position tracking → Continue to Q3

Q3: Do you need to hold position without power or track absolute position indefinitely?

  • NO (position relative, occasional reset OK) → Use Servo motor with continuous rotation modification
  • YES (absolute position critical, no position loss allowed) → Use Stepper motor

Real-World Examples:

Example 1: Automated Blinds

  • Need: Rotate to specific angles (0° = open, 180° = closed) and hold position
  • Motor Choice: Servo motor (SG90 or MG996R)
  • Why: Limited rotation range, needs to hold position when off, angle control is primary requirement
  • Cost: $8 per servo + $3 driver = $11 total

Example 2: Cooling Fan for IoT Gateway

  • Need: Variable speed to control airflow based on temperature
  • Motor Choice: DC motor (TT motor or 80mm PC fan)
  • Why: Continuous rotation, no position control needed, PWM speed control efficient
  • Cost: $3 motor + $2 MOSFET driver = $5 total

Example 3: 3D Printer Extruder Drive

  • Need: Precise filament feed (exact rotation distance matters for print quality)
  • Motor Choice: Stepper motor (NEMA 17)
  • Why: Every 1.8° step = exact filament length; position cannot drift over 10-hour print
  • Cost: $15 stepper + $8 driver (A4988) = $23 total

Example 4: Smart Door Lock

  • Need: Rotate deadbolt 90° to lock/unlock, must hold position against force
  • Motor Choice: Servo motor (high-torque metal gear servo)
  • Why: Limited rotation, strong holding torque prevents forced entry, position feedback confirms lock engaged
  • Cost: $18 high-torque servo + $3 driver = $21 total

Example 5: Robot Wheel Drive

  • Need: Variable speed forward/backward, turns via differential steering
  • Motor Choice: DC motor (dual TT motors)
  • Why: Continuous rotation both directions, speed control via PWM, no position tracking needed
  • Cost: $6 for 2 motors + $8 L298N H-bridge = $14 total

Common Mistakes to Avoid:

Mistake 1: Using servo for continuous rotation when DC motor suffices - Problem: Servos draw current even when idle to maintain position; DC motors coast to stop and draw zero current - Impact: Battery life 3x shorter with servo for fan application

Mistake 2: Using DC motor when position matters - Problem: No feedback means no way to know if motor reached target position (could stall, slip, or overshoot) - Impact: Blinds system that randomly stops at wrong positions; requires manual reset

Mistake 3: Using stepper for high-speed rotation - Problem: Steppers lose torque at high step rates (>1000 steps/sec) and consume 500mA-1.5A continuously - Impact: 300 RPM fan application uses stepper drawing 800mA when DC motor drawing 150mA would work better

Comparison Summary:

Choose DC motor when:

  • You need continuous rotation (fans, wheels, conveyor belts)
  • Speed control is sufficient (no position required)
  • Power efficiency matters (battery-powered)
  • Cost is constrained (<$5 per motor)

Choose Servo motor when:

  • You need angular positioning (0-180° typical)
  • Holding torque is required (robotic arms, locks)
  • Feedback control simplifies your code (no encoders needed)
  • Rotation range limited and predictable

Choose Stepper motor when:

  • You need precise step-by-step positioning (3D printers, CNC)
  • Absolute position tracking is critical (no position loss over hours)
  • High holding torque needed even when not moving
  • Open-loop precision acceptable (no encoder feedback)

Key Insight: Start with the simplest motor that meets your requirements. DC motors are the default for continuous rotation. Only use servos when you need positioning, and steppers when you need open-loop precision. Over-specifying motors wastes money and power.

13.3 Chapter Summary

Actuators are the hands of IoT systems, converting electrical signals from microcontrollers into physical actions that affect the real world.

13.3.1 Key Takeaways

  • Motor Types: DC (continuous rotation), Servo (precise angles), Stepper (precise steps)
  • Driver Circuits: Required for high-current loads (L298N, A4988, transistors)
  • PWM Control: Enables smooth speed/brightness control by varying duty cycle
  • Safety: Flyback diodes, current limiting, watchdog timers, fail-safe defaults
  • Visual/Audio: LEDs, displays, buzzers provide user feedback

13.3.2 Motor Selection Quick Guide

Need Choose Why
Variable speed, no position DC Motor Simple, efficient, cheap
Precise angle (0-180 deg) Servo Built-in feedback, easy control
Precise position, any range Stepper Open-loop accuracy, holds position
On/off, high power Relay Electrical isolation, high current
Fast linear motion Solenoid Quick push/pull action

“Pop quiz time!” announced Max the Microcontroller, wearing a tiny graduation cap. “Who can tell me – if I need to move a robot arm to exactly 90 degrees, which actuator friend should I call?”

Sammy the Sensor raised his hand. “I know! You’d call Servo Sam! He’s great at holding exact angles because he has a built-in feedback loop – kind of like how I always check my measurements twice!”

“Correct!” Max beamed. “And what about spinning a fan really fast?”

“That’s DC Danny’s specialty!” said Lila the LED, flashing green for the right answer. “He spins round and round continuously, and you control his speed with PWM – just like how my brightness gets adjusted!”

Bella the Battery chimed in, “And don’t forget – always use a motor driver between Max and the motors. Max can only provide a tiny bit of power. Without a driver, it’s like asking me to power a whole city when I’m just a small battery!”

“Great teamwork!” said Max. “Remember: servos for angles, DC motors for spinning, steppers for precise steps, and ALWAYS use the right driver circuit!”

13.4 Knowledge Check

13.5 See Also

Common Pitfalls

PWM duty cycle controls the average power delivered (motor speed, LED brightness), while PWM frequency affects smoothness and audible noise. Assessment questions about motor speed ask about duty cycle; questions about servo position ask about pulse width (in milliseconds), not duty cycle percentage. Read each question carefully to identify which PWM parameter is being tested.

Questions involving relays, solenoids, or motor drivers almost always include flyback diode placement as a scored element. Inductive loads generate voltage spikes when current is switched off; without the diode, this spike can destroy the driver transistor. Mark flyback diodes in circuit diagrams and mention them explicitly in short-answer circuit design questions.

H-bridge ICs like the L298N have IN1/IN2 pins that control motor direction: IN1=HIGH,IN2=LOW spins one way; IN1=LOW,IN2=HIGH spins the other. Assessment circuit diagrams test whether you can identify which input combination produces forward versus reverse rotation. Practice predicting H-bridge behavior from truth tables before the assessment.

Assessment short-answer questions about ‘why do we need a driver circuit?’ expect more than ‘because the motor needs more current.’ Explain specifically: GPIO pins typically source/sink 20-40 mA maximum, while even small DC motors draw 100-500 mA and stall current can be 5-10x higher. Quantify the current mismatch and explain what happens to the GPIO pin without protection.

13.6 What’s Next?

Now that you can evaluate actuator types and diagnose common problems, you can deepen your skills with specific actuator technologies or combine actuators with sensors for complete IoT feedback control systems.

Topic Chapter Description
Actuators Overview Actuators Overview Return to the module overview and explore all actuator chapters
DC Motor Control DC Motors Implement PWM speed control and H-bridge direction switching
Servo Motor Positioning Servo Motors Configure precise angular positioning with PWM pulse width
Stepper Motor Precision Stepper Motors Design step sequences for open-loop position control
Actuator Safety Actuator Safety Apply flyback protection, current limiting, and watchdog timers
Sensor Applications Mobile Phone as a Sensor Combine sensors with actuators for complete IoT feedback loops