小编
Published2025-09-16
The Mighty SG90 Servo: Small Motor, Big Possibilities
The SG90 servo is a marvel of modern micro-engineering. Weighing just 9 grams and measuring 23mm x 12mm x 29mm, this affordable rotary actuator has become the backbone of countless DIY projects. But what happens when you combine three of these tiny titans? Magic.
In this two-part guide, we’ll explore three innovative projects that demonstrate the versatility of SG90 servos:
A 3-axis robotic arm for precision tasks An automated plant care system with smart scheduling A pan-tilt camera mount for dynamic photography
Three servos create a perfect balance between complexity and capability:
1 servo: Basic movement (e.g., single-axis rotation) 2 servos: Planar motion (e.g., XY movement) 3 servos: True spatial control (elevation, rotation, and actuation)
Let’s dive into our first project – the 3-axis robotic arm.
Project 1: The Budget Robotic Arm
3x SG90 servos Arduino Uno/Nano Laser-cut acrylic parts (or 3D-printed components) 5V power supply Jumper wires Mini suction cup/gripper
Step 1: Mechanical Assembly
Base Rotation: Mount the first servo horizontally to a base plate Elbow Joint: Attach the second servo vertically to create up/down movement Wrist Action: Fix the third servo at the arm’s end for grip/rotation
Pro Tip: Use servo horns and M2 screws for secure connections.
Step 2: Circuit Setup Connect the servos to your Arduino:
Servo 1 (Base): Digital Pin 9 Servo 2 (Elbow): Digital Pin 10 Servo 3 (Wrist): Digital Pin 11
Power the servos via a separate 5V rail to prevent Arduino brownouts.
Step 3: Basic Programming Upload this test code to verify movement: ```cpp
Servo base, elbow, wrist;
void setup() { base.attach(9); elbow.attach(10); wrist.attach(11); }
void loop() { base.write(90); // Center position elbow.write(45); // 45-degree lift wrist.write(0); // Open gripper delay(1000); wrist.write(90); // Close gripper delay(1000); }
Advanced Control: Add potentiometers or a joystick module for real-time manual control. --- ### Why Start with a Robotic Arm? This project teaches essential skills: - Kinematics: Understanding how joint angles affect end positioning - Power Management: Balancing current draw across multiple motors - Precision Control: Fine-tuning servo angles for repeatable movements But what if you want something less robotic and more… green? --- ### Project 2: Smart Plant Care System Transform three SG90s into an automated gardener that waters plants, adjusts sunlight exposure, and monitors soil health. Components: - 3x SG90 servos - Moisture sensor - Light-dependent resistor (LDR) - Arduino + Relay module - Water pump + tubing Assembly Guide: 1. Servo 1: Controls a rotating platform for sunlight distribution 2. Servo 2: Operates a lever-arm watering mechanism 3. Servo 3: Adjusts shade cloth position based on light intensity Circuit Integration: - Moisture Sensor → Analog Pin A0 - LDR → Analog Pin A1 - Servos → Digital Pins 9-11 - Relay → Digital Pin 7 Code Snippet (Automatic Mode):
cpp if (moisture < 30%) { digitalWrite(7, HIGH); // Activate pump servo2.write(180); // Lower watering arm delay(5000); servo2.write(0); // Raise arm digitalWrite(7, LOW); }
int light = analogRead(A1); if (light > 800) { // Too bright servo3.write(90); // Deploy shade } else { servo3.write(0); // Retract shade }
Bonus: Add a 16x2 LCD to display real-time stats! --- ### Project 3: Pan-Tilt Camera Platform Create a motion-activated camera rig for wildlife photography or security. Build Breakdown: - Pan Servo: Horizontal rotation (180° range) - Tilt Servo: Vertical adjustment (90° range) - Trigger Servo: Physical shutter button press Required Hardware: - Raspberry Pi Zero (or USB webcam) - PIR motion sensor - 3D-printed camera mount Wiring Setup: - PIR Sensor → Digital Pin 2 - Servos → PWM Pins 9-11 Python Code (Raspberry Pi):
python from gpiozero import Servo, MotionSensor from time import sleep
pan = Servo(17) # GPIO17 tilt = Servo(27) # GPIO27 shutter = Servo(22) pir = MotionSensor(4)
while True: if pir.motion_detected: pan.value = 0.5 # Center position tilt.value = -0.5 # Look slightly down shutter.min() # Press shutter sleep(0.5) shutter.max() # Release ```
Pushing Boundaries: Combine All Three!
Imagine integrating these projects:
Robotic arm places plants in optimal light Camera system documents growth progress Automated watering based on moisture data
Pro Tips for Multi-Servo Projects:
Use capacitors (100µF) across servo power lines to reduce noise Implement soft start in code to prevent initial jerk movements Consider PCA9685 PWM controllers for scaling beyond 3 servos
Three SG90 servos might seem limited, but as we’ve shown, they’re a gateway to:
Industrial-grade motion control (at 1/100th the cost) Smart home automation prototypes Educational tools for STEM learning
The true power lies in combining these humble servos with sensors, microcontrollers, and imagination. What will your trio of SG90s create next? Share your builds with #3ServoMagic!
Update:2025-09-16
Contact Kpower's product specialist to recommend suitable motor or gearbox for your product.