After completing this chapter, you will be able to:
Test your actuator knowledge with interactive quizzes
Use quick reference cards for common specifications
Troubleshoot actuator problems efficiently
Apply actuator selection skills to real-world scenarios
567.1 Interactive Self-Assessment Quiz
Test your understanding of actuators with this auto-graded quiz.
Show code
actuatorQuestions = [ {id:1,question:"You need to control a robot arm that requires precise positioning at specific angles (0, 45, 90, 135 degrees). Which actuator is most appropriate?",choices: ["DC motor with PWM speed control","Servo motor with angle control","Stepper motor with step counting","Relay for on/off control" ],correct:1,explanation:"Servo motors are designed for precise angular positioning, typically 0-180 degrees. They have built-in feedback control that maintains the commanded angle." }, {id:2,question:"Your microcontroller GPIO pin can safely source 20mA at 3.3V. You need to control a 12V DC motor that draws 500mA. What is the correct approach?",choices: ["Connect the motor directly to the GPIO pin","Use a transistor or MOSFET with a separate 12V power supply","Reduce motor voltage to 3.3V to match the GPIO","Use multiple GPIO pins in parallel" ],correct:1,explanation:"GPIO pins cannot drive high-current loads directly. Use a transistor (2N2222, BC547) or MOSFET as a switch with a separate 12V power supply and flyback diode." }, {id:3,question:"A 3D printer uses NEMA 17 stepper motors for precise positioning. What advantage do stepper motors provide over servo motors for this application?",choices: ["Stepper motors are cheaper than servo motors","Stepper motors provide open-loop position control without feedback sensors","Stepper motors run faster than servo motors","Stepper motors consume less power" ],correct:1,explanation:"Stepper motors provide precise position control by counting steps without requiring encoders (open-loop). This simplifies design and reduces cost for applications like 3D printers." }, {id:4,question:"You're controlling LED brightness using PWM at 1kHz with 8-bit resolution (0-255). What duty cycle percentage corresponds to a PWM value of 64?",choices: ["64%","25%","32%","50%" ],correct:1,explanation:"PWM duty cycle = (PWM_value / Max_value) x 100 = (64 / 255) x 100 = 25.1% approximately 25%." }, {id:5,question:"Your ESP32 project controls a relay that switches a 120V AC heater. Why is a flyback diode necessary across the relay coil?",choices: ["To prevent AC voltage from backfeeding into the ESP32","To suppress inductive voltage spike when relay coil is de-energized","To reduce power consumption of the relay","To speed up relay switching time" ],correct:1,explanation:"Relay coils are inductors. When power is cut, the collapsing magnetic field generates a high voltage spike that can destroy transistors or microcontrollers. A flyback diode provides a safe path for this current." }]viewof currentQ = Inputs.range([0, actuatorQuestions.length-1], {step:1,value:0,label:"Question Number"})md`### Question ${currentQ +1} of ${actuatorQuestions.length}${actuatorQuestions[currentQ].question}`
TipReference Card 1: Common Actuator Specifications
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
TipReference Card 2: Motor Driver Pinouts
567.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
567.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
TipReference Card 3: PWM Control Formulas
ESP32 PWM Setup:
constint pwmFreq =5000;// Frequency in Hzconstint pwmChannel =0;// 0-15 availableconstint pwmResolution =8;// 8-bit = 0-255ledcSetup(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