⚙ ESP32 Actuators

Sense → Decide → Act: complete control systems with servos, fans, and relays

Overview

Go beyond reading sensors. This strand adds actuators — servos, fans, relays, and LEDs — so the ESP32 can take action based on sensor data. Build systems that sense the environment, make decisions, and respond automatically.

🧰 Kit List

  • ESP32 development board
  • Breadboard and jumper wires
  • SG90 micro servo (x2)
  • 5V DC fan (small, brushless)
  • N-channel MOSFET (e.g. IRLZ44N) or NPN transistor (TIP120)
  • Relay module (5V, single channel)
  • RGB LED strip (WS2812B NeoPixel, short section)
  • DHT22 temperature sensor (for trigger input)
  • LDR + 10k resistor (for light-triggered projects)
  • External 5V power supply for servos/fan
  • Diodes (1N4007) for back-EMF protection
  • Resistors (220Ω, 1kΩ, 10kΩ assorted)

🎓 What You Will Learn

  • Why microcontrollers can't power motors directly
  • Transistors and MOSFETs as electronic switches
  • PWM for servo angle and fan speed control
  • Relay switching for mains-voltage devices (theory only)
  • Control logic: thresholds, hysteresis, PID basics
  • Sense-decide-act loop design
  • Back-EMF protection and circuit safety
  • Dashboard control: sending commands from Node-RED to ESP32

🌐 Cross-Curricular Links

  • Science: Circuits, energy transfer, electromagnetism, thermal regulation
  • Maths: Duty cycle %, angle mapping, threshold calculations
  • DT: Mechanical linkages, mounting servos, enclosure design
  • Geography: Climate control, automated greenhouses
  • PSHE: Smart home technology, assistive devices, accessibility

🛠 Key Skills

  • MicroPython: PWM, GPIO output control
  • Circuit design with transistors/MOSFETs
  • Bi-directional MQTT (subscribe to commands)
  • Control system design
  • Safety awareness (current limits, heat dissipation)

Projects

From sweeping a servo to building an automated climate control system.

Project 1: Servo Sweep

KS3

Connect a servo to the ESP32. Write MicroPython to sweep from 0° to 180°. Understand PWM duty cycles and angle mapping.

Project 2: Temperature-Triggered Fan

KS4

Wire a DC fan through a MOSFET. Read a DHT22 sensor. When temperature exceeds a threshold, the fan turns on. Add hysteresis to prevent rapid switching.

Project 3: Light-Tracking Servo

KS4

Use two LDRs mounted either side of a servo-mounted panel. The servo adjusts angle to face the brighter light source. Links to the Solar Power strand.

Project 4: Dashboard Remote Control

KS4

Subscribe to MQTT topics from Node-RED. Build dashboard buttons and sliders that control servo angle and fan speed remotely from a phone.

Project 5: Smart Greenhouse

Stretch

Combine sensing and actuating: monitor temperature, humidity, and light. Automatically open vents (servo), run fans, and trigger LED grow lights. Full dashboard monitoring.

Project 6: Automated Pet Feeder

Stretch

Use a servo to open a feeding hatch on a timer or via dashboard button. Add a weight sensor to track food levels. Send alerts when food is low.

Baton Pass Checklist

Before you hand over to the next group:

  • Completed your digital project card with circuit photos
  • Actuator responds correctly to sensor input or dashboard commands
  • Circuit diagram (hand-drawn or digital)
  • MicroPython code saved and commented
  • Node-RED flow exported as JSON
  • Safety notes: current limits, heat, back-EMF protection
  • 5-minute demo for the next group