Building a Micro Servo Robotic Arm with a Bluetooth Module

DIY Robotic Arm with Micro Servo Motors / Visits:14

There is something deeply satisfying about watching a tiny plastic gearbox whir to life and move a gripper exactly where you command it. Micro servo motors are the unsung heroes of the maker world — cheap, compact, and surprisingly strong for their size. In this build, we are going to combine a handful of these little workhorses with an Arduino and a Bluetooth module to create a robotic arm you can control wirelessly from your phone. No fancy 3D printer required, no industrial-grade hardware, just the kind of parts you probably already have in a drawer somewhere.

Why Micro Servos Are the Perfect Actuator for This Project

Before we start wiring anything, it is worth talking about why micro servos deserve the spotlight here. A standard hobby servo like the SG90 or MG90S weighs around 9 to 13 grams, draws a few hundred milliamps under load, and delivers enough torque to lift a small object at the end of a lightweight arm. They come with built-in control electronics, meaning you feed them a PWM signal and they handle the rest — no external motor driver, no encoder tuning, no PID loop to debug at 2 a.m.

That built-in feedback loop is the real magic. Inside every micro servo sits a small potentiometer connected to the output shaft, a control IC that compares your commanded pulse width against the potentiometer's actual position, and an H-bridge that drives the motor in whichever direction closes the gap. You send a 1.5 ms pulse every 20 ms and the servo holds center. Send 1.0 ms and it swings to one extreme; 2.0 ms and it goes the other way. That is the entire protocol. For a robotic arm with four or five joints, this simplicity is exactly what you want, because your mental energy should go into kinematics and control logic, not motor commutation.

The trade-offs are real, though. Micro servos have plastic gears in the cheap versions, limited rotation range (usually 180 degrees), and they jitter under load if your power supply sags. We will address each of these as we go.

Parts List and Planning the Arm Geometry

Here is what you need for a four-degree-of-freedom arm:

  • Four SG90 or MG90S micro servos (MG90S if you want metal gears and a bit more torque)
  • An Arduino Uno or Nano
  • An HC-05 or HC-06 Bluetooth module
  • A breadboard and jumper wires
  • An external 5V power supply rated for at least 2A (do not power four servos from the Arduino's onboard regulator)
  • Cardboard, acrylic, or 3D-printed brackets for the arm links
  • A small gripper mechanism (you can build one from two popsicle sticks and a servo horn)

Plan the geometry before you cut anything. A typical layout is: one servo at the base for yaw, one for shoulder pitch, one for elbow pitch, and one for the gripper. Keep the links short — 10 to 15 cm per segment — because micro servos lose torque quickly as the moment arm grows. If your elbow servo has to hold a 200-gram payload at 15 cm, that is 3 kg·cm of torque, which is right at the edge of what an MG90S can handle. Shorter links and lighter payloads keep you in the comfortable zone.

Wiring the Electronics Without Letting the Magic Smoke Out

The single most common failure in servo projects is a power problem. Servos draw current spikes when they start moving, and four of them starting at once can pull well over an amp. The Arduino's 5V pin cannot supply that. Wire the servo power rails directly to your external 5V supply, and connect the ground of that supply to the Arduino's ground so the PWM signals share a common reference.

For the Bluetooth module, connect VCC to 5V, GND to ground, TX to the Arduino's RX pin (pin 0) and RX to TX (pin 1) — but only after you have uploaded your sketch, because those pins are shared with the USB serial port. A cleaner approach is to use SoftwareSerial on pins 10 and 11, which lets you keep the hardware serial free for debugging. I recommend SoftwareSerial for exactly that reason.

Signal wires from the servos go to any PWM-capable pins — 3, 5, 6, 9, 10, and 11 on an Uno. Pick four of them and note the mapping, because you will reference those pin numbers in code.

Writing the Control Sketch

The Arduino Servo library makes the code almost trivial. You create a Servo object per joint, attach it to a pin, and call write() with an angle from 0 to 180. The library handles the 20 ms pulse train in the background using a timer.

The Bluetooth side is where the logic lives. The HC-05 receives bytes over serial, and you parse them into commands. A simple and robust protocol is a single character per command: 'F' and 'B' for base left and right, 'U' and 'D' for shoulder up and down, 'L' and 'R' for elbow, and 'O' and 'C' for opening and closing the gripper. Each received character nudges the corresponding servo by a few degrees, with bounds checking so you never command an angle outside 0 to 180.

cpp

include <Servo.h>

include <SoftwareSerial.h>

SoftwareSerial bt(10, 11);

Servo base, shoulder, elbow, gripper; int baseAngle = 90, shoulderAngle = 90, elbowAngle = 90, gripAngle = 90;

void setup() { base.attach(3); shoulder.attach(5); elbow.attach(6); gripper.attach(9); bt.begin(9600); updateAll(); }

void updateAll() { base.write(baseAngle); shoulder.write(shoulderAngle); elbow.write(elbowAngle); gripper.write(gripAngle); }

void loop() { if (bt.available()) { char cmd = bt.read(); switch (cmd) { case 'F': baseAngle = constrain(baseAngle + 5, 0, 180); break; case 'B': baseAngle = constrain(baseAngle - 5, 0, 180); break; case 'U': shoulderAngle = constrain(shoulderAngle + 5, 0, 180); break; case 'D': shoulderAngle = constrain(shoulderAngle - 5, 0, 180); break; case 'L': elbowAngle = constrain(elbowAngle + 5, 0, 180); break; case 'R': elbowAngle = constrain(elbowAngle - 5, 0, 180); break; case 'O': gripAngle = constrain(gripAngle + 10, 0, 180); break; case 'C': gripAngle = constrain(gripAngle - 10, 0, 180); break; } updateAll(); } }

Notice the constrain() calls. They are doing quiet but essential work: without them, a few extra button presses would drive a servo past its mechanical stop, and the motor would stall against the gearbox until something strips. Plastic gears strip fast. Metal gears strip slower but still strip.

Smoothing the Motion

Raw write() calls make the arm snap between positions, which looks jerky and stresses the gears. Add a small interpolation routine: instead of jumping to the target angle, step toward it by one degree every 15 ms. This gives you buttery motion and dramatically reduces current spikes, because the servo is never asked to accelerate a heavy link instantly. On a four-joint arm, the visual difference is night and day.

Building the Phone Controller

On the Android side, you have two easy options. The first is a generic Bluetooth serial terminal app — you pair with the HC-05 (default PIN is usually 1234 or 0000), connect, and send characters from an on-screen keyboard. It works, but pressing letter keys to move a robot arm feels like operating a telegraph.

The better option is a simple app built with MIT App Inventor, which is free and browser-based. Drop eight buttons onto a canvas, give each one a Bluetooth client block that sends the matching character, and you have a custom controller in an afternoon. Add a slider for the gripper if you want proportional control instead of discrete steps. The HC-05 handles the pairing and serial profile automatically, so there is no protocol work on the phone side beyond sending bytes.

Tuning, Calibration, and the Little Gotchas

Every servo has slightly different endpoints. Before assembling the arm, run each servo through its full range and note where it actually stops — many SG90 clones will grind at 0 or 180 degrees even though the datasheet claims the full sweep. Set your software limits a few degrees inside the mechanical limits.

Power supply noise is the second gotcha. If your servos twitch when the Bluetooth module transmits, add a 100 µF electrolytic capacitor across the servo power rail and a 0.1 µF ceramic cap near the HC-05's VCC pin. These are cheap insurance against the kind of intermittent weirdness that eats entire weekends.

Finally, calibrate the gripper carefully. A micro servo closing on a rigid object will stall and heat up. Either add a soft rubber pad to the gripper jaws or, better, use a spring-loaded linkage so the servo can reach its commanded angle even when the object is fully gripped. Your gears will thank you.

Where to Take This Next

Once the basic arm works, the natural upgrade path is inverse kinematics: give the phone an X, Y, Z coordinate and let the Arduino compute the joint angles. That is a math problem, not a hardware problem, and it turns a remote-controlled toy into something that feels genuinely robotic. Another direction is recording and playback — log the command stream to EEPROM and have the arm replay a pick-and-place routine on demand. And if you outgrow the micro servos, the same code structure scales up to standard-size servos with nothing more than a power supply upgrade.

The beauty of this project is that it sits right at the intersection of cheap, understandable, and genuinely useful. Micro servos give you precise position control for the price of a cup of coffee, Bluetooth gives you untethered freedom for a few dollars more, and the whole thing fits in the palm of your hand. Build one, break it, rebuild it better — that loop is where the real learning happens.

Copyright Statement:

Author: Micro Servo Motor

Link: https://microservomotor.com/diy-robotic-arm-with-micro-servo-motors/bluetooth-micro-servo-arm.htm

Source: Micro Servo Motor

The copyright of this article belongs to the author. Reproduction is not allowed without permission.

About Us

Lucas Bennett avatar
Lucas Bennett
Welcome to my blog!

Tags