18 Actuator Assessment and Reference
18.1 Start With the Story
Test the Output Path, Not Just the Answer Sheet
Picture a greenhouse fan that should start when the air grows too hot. A correct quiz answer is useful only if the chosen parts can drive the real fan and fail in a visible way. The first review question is what physical result proves the choice worked.
An actuator means a part that turns a command into a physical action. GPIO means general-purpose input/output, a pin used for a direct digital control line. PWM means pulse-width modulation: rapid on-off pulses vary the share of time that power is applied.
Command off, low, middle, and high output. Disconnect the load, hold the fan safely, repeat the command, and restart the controller while the hot condition remains. Record the command, driver state, supply value, protection response, and physical motion.
This runway does not prove that one driver suits every motor or safety class. The deeper questions and reference cards cover load types, driver limits, protection, power, motion, warning outputs, and troubleshooting evidence.
Treat the assessment as a design review. A correct answer should not only name a motor, relay, PWM value, or flyback diode; it should explain the physical action, the driver boundary, the protection, and the evidence that the actuator result is believable.
When a scenario asks what to choose, start from the job: continuous motion, position, switching, alerting, safety, or troubleshooting. Then make the choice that keeps the output path controllable and testable.
- 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:
where is duty cycle (0 to 1).
Worked example: A 12V motor with 0.5A peak current at 40% duty cycle draws:
Running 2 hours/day consumes 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:
18.2 Interactive Self-Assessment Quiz
Test your understanding of actuators with this auto-graded quiz.
18.3 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 |
18.3.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 |
18.3.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.
18.4 Chapter Summary
Actuators are the hands of IoT systems, converting electrical signals from microcontrollers into physical actions that affect the real world.
18.4.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
18.4.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!”
18.5 Knowledge Check
18.6 See Also
- DC Motors - PWM speed control and H-bridge operation
- Servo Motors - Precise angular positioning
- Stepper Motors - Step-by-step positioning
- PWM Control - Interactive PWM calculator
- Actuator Safety - Flyback protection and watchdog timers
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.
18.7 Deep Dive: Selection Evidence, Sizing, and Gearing
Picking “a stepper” or “a servo” only narrows the field. Before scoring a choice, use Figure 18.1 to expose the decisions that a family name leaves unresolved: physical load, required motion, electrical driver, protection, and acceptance evidence.
Read Figure 18.1 from the required action into sizing and gearing, then through the electrical boundary to acceptance evidence. Each branch narrows the candidate, but the path only becomes defensible when its load, speed, duty-cycle, and worst-case-current assumptions are recorded and tested.
For a small smart vent, a measured push of 1.8 N at a 25 mm linkage radius means the actuator must overcome 1.8 x 0.025 = 0.045 N m of load torque before friction and margin. With a 2x margin, the target becomes about 0.09 N m. If the vent only needs to sweep 90 degrees and hold position, a positional servo may fit. If it must rotate continuously, a DC gearmotor is a better starting point. If it must index repeatably through many turns without a position sensor, a stepper may be justified.
| Requirement | What to compute | Watch out for |
|---|---|---|
| Torque or force | Load torque = force x radius, plus friction and acceleration torque; add a 1.5-2x margin | Forgetting acceleration and friction |
| Speed | Required rpm or travel time | Torque falls as speed rises |
| Duty and thermal load | Continuous versus intermittent operation; keep sustained torque under the continuous rating | Sizing to peak torque only, then overheating |
| Worst-case current | Stall or startup current for driver and supply | Supply sag on inrush resets the system |
The recurring trap is confusing peak and continuous ratings. A motor can deliver stall torque briefly, but only its lower continuous torque without overheating. Likewise, size the power supply and driver to stall or startup current, not running current. If the chosen actuator can draw 900 mA at stall, the driver and supply must tolerate that worst case. If the load is inductive, include a flyback or clamp path; if a stall would overheat the actuator, include a timeout, current limit, or firmware fault state.
Work one pass numerically. A small valve actuator runs from 12 V, draws 0.4 A while moving, and is driven at 60% PWM during normal travel. The moving power estimate is 12 x 0.4 x 0.60 = 2.88 W. If the valve moves for 20 s every 120 s, the time duty is 20 / 120 = 0.167, so the average heat load from movement is much lower than the instantaneous moving power. That supports an intermittent actuator only if the datasheet allows the duty and the enclosure can shed the heat.
Speed must satisfy the application at the same time as torque. If a valve must close in 1 s and the mechanism needs 90 degrees of output travel, the output speed target is one quarter turn per second, or 15 rpm. If a gearbox produces enough torque but only reaches 5 rpm, it is safe but too slow. If an ungeared motor reaches 300 rpm but lacks torque, it is fast but unusable.
Every motor has a torque-speed curve running from stall torque to no-load speed. The load defines an operating point: required torque at required speed. A valid design places that point under the curve, with margin, and inside the continuous-torque thermal region. A gear reduction of ratio N multiplies torque by N and divides output speed by N, minus efficiency losses. It also divides the reflected load inertia the motor feels by N squared, which is why gearing helps a motor accelerate a heavy load.
Suppose the load needs 0.18 N m at about 30 rpm. A candidate motor can provide 0.06 N m continuously near 300 rpm. Direct drive fails on torque. A 4:1 reduction with an assumed 80% efficient gearbox gives output torque near 0.06 x 4 x 0.80 = 0.192 N m and output speed near 300 / 4 = 75 rpm. That is finally above the torque requirement and still faster than the 30 rpm target, so the controller can slow it with PWM or motion profiling. Reflected inertia falls by the square of the ratio, so a 4:1 reduction makes the motor feel about 4 x 4 = 16 times less load inertia, ignoring gearbox losses.
Assessment rule: the right answer is the smallest actuator and driver chain that meets torque, speed, thermal duty, and worst-case current with evidence-backed margin.
18.8 Summary
Actuator assessment questions test whether you can connect physical requirements to electrical limits, driver circuits, control methods, and safety evidence. Strong answers name the load, current path, protection component, control signal, and failure mode instead of only naming the actuator type.
18.9 Key Takeaway
When reviewing an actuator design, justify the complete chain: physical action needed, actuator selected, driver sized for running and stall current, protection added for inductive or high-current loads, and firmware behavior checked for safe startup and shutdown.
18.10 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 |
