Bluetooth Controlled Claw Robot

by winrtop255 in Circuits > Microcontrollers

313 Views, 3 Favorites, 0 Comments

Bluetooth Controlled Claw Robot

Claw Robot Demo
FE8ORQ3M5QRQL7X.jpg
F2YLE48M5QRQMJJ.jpg
FA763ZMM5QRQMOX.jpg
FN1B764M5QRQO6Z.jpg
FIUXRQ8M5QRQO74.jpg
F2GDVOXM5QRQM3E.jpg
FTQZ3HTM5QRQO73.jpg
FRZQ1H6M5QRQLY4.jpg
FOM3OETM5QRQO72.jpg
FLGHZGYM5QRQO71.jpg

In this Instructables, I'll be guiding you on building your very own Bluetooth enabled, 3D-printed robotic claw machine with a mobile base and a controllable robotic arm!

Not only is this project extremely fun to play around with, but it can also be quite handy at times!

The project uses an Arduino Mega and an HM-10 Bluetooth module to control 6 servos and four motors in order to move around and pick up items.

This project is almost entirely 3D-printed and works fantastically!

Supplies

IMG_6305.JPG
IMG_6314.JPG
IMG_6335.JPG
IMG_6336.JPG
IMG_6340.JPG
IMG_6344.JPG
IMG_6342.JPG
IMG_6333.JPG
IMG_6338.JPG
IMG_6352.JPG
IMG_6318.JPG

To build the robotic claw machine, you'll need the following components:

  1. 3 x SG5010 Servos (for the larger arm movements)
  2. 3 x SG90 Servos (for finer claw and arm movements)
  3. 1 x L298N Motor Driver Board
  4. 3 x LM2596 Buck Converters (Power Boards)
  5. 1 x Arduino Mega
  6. 1 x HM-10 Bluetooth Module
  7. 1 x 12V LiPo Battery (to power the entire system)


  1. 3D Printing Filament (PLA+ or ABS recommended)
  2. Assortment of Screws and Nuts (for securing parts together)
  3. Custom Servo PCB (for connecting servos, find it in step 6)
  4. Wires and Connectors (to link components)
  5. Metal Mobile Base (to mount the motors, they are common on Amazon for less than 20$!)
  6. Electrical Tape (for cable management)

3D Printing

IMG_6325.JPG
IMG_6327.JPG
IMG_6328.JPG
IMG_6329.JPG
IMG_6330.JPG
IMG_6331.JPG
IMG_6332.JPG

To begin, we need to 3D print all the necessary parts using the provided 3D models. The robotic claw was from Mechatronic!

  1. The main parts include:
  2. The Main Base.stl - This will not require supports
  3. The Second Base.stl - This will require some supports
  4. The Second Layer.stl - This will not require supports
  5. The Main Robotic Arm - Some of these parts will require supports
  6. The Finer Claw Mechanisms - Most of these parts will not require supports
  7. For the best results, I recommend using durable materials such as PLA+ or ABS. PLA+ offers good strength and is easy to print, while ABS provides much better heat resistance.
  8. I also used the following print settings:
  9. Layer height: 0.2 mm for a good balance of detail and speed.
  10. Infill: 15% (grid pattern) to provide enough strength while using less filament.
  11. Wall count: 3 for sturdy parts.


  1. Once everything has been printed, carefully remove the parts from the print bed and clean up any excess material and supports!

Assembling Motors With Metal Base

IMG_6352.JPG
IMG_6353.JPG
IMG_6354.JPG
IMG_6355.JPG
IMG_6356.JPG
IMG_6357.JPG
IMG_6358.JPG
IMG_6359.JPG

Now we can begin assembling the robot!

  1. First, attach the motors to the metal base:
  2. Align the motor mounts with the designated slots in the base.
  3. Use two screws and nuts to securely fasten each motor in place.
  4. Make sure to not damage the motor cables!


Installing the 3D Printed Base

IMG_6372.JPG
IMG_6373.JPG
IMG_6376.JPG

Once that is done, attach the 3D-printed base to the metal one using some screws. I used some M4 screws and nuts to secure the base.

The 3D printed base is needed since it will allow us to place our electronic components directly on top of it without the fear of any sort of electrical short!

Creating the Power Delivery Circuit

IMG_6312.JPG
IMG_6380.JPG
IMG_6345.JPG

Now, prepare the LM2596 converters by soldering them in a chain-like structure.

  1. First, wire the modules in parallel with the 12V LiPo battery connector.


  1. Then, solder on some jumper cables on the outputs


  1. Finally, once that's done, use a multimeter and adjust the voltage outputs for each one like so:
  2. Set one to 5V for the Servos
  3. Set one to 5V for the Arduino
  4. Set one to 9V for the Motors.


Mounting Bluetooth Module and Arduino

IMG_6381.JPG
IMG_6383.JPG
IMG_6397.JPG
IMG_6399.JPG

Now we can begin installing components onto the base!

First, use some hot glue to mount the HM-10 Bluetooth module onto the back of the robot and the Arduino Mega to the front.

Then, wire the HM-10 module to the Mega like so:


GND of HM10 to GND of Arduino Mega

VCC of HM10 to 5V of Arduino Mega

TX of HM10 to Digital Pin 15 of Arduino Mega

RX of HM10 to Digital Pin 14 of Arduino Mega

Mounting LM2596, Motor Driver, and Servo PCB

IMG_6400.JPG
IMG_6402.JPG
IMG_6403.JPG
IMG_6405.JPG
IMG_6408.JPG
IMG_6409.JPG
IMG_6410.JPG
IMG_6412.JPG

Once that is complete, slot the Second Layer.stl over the Second Base.stl!

On the new layer, mount the LM2596 modules, L298N motor driver, and custom servo PCB!

While the Servo PCB isn't strictly needed, it makes cable management significantly easier! You can download the PCB from this link and order it from an online fabrication company if you want it yourself!

Wiring LM2596 to Components

IMG_6413.JPG
IMG_6415.JPG
IMG_6417.JPG
IMG_6418.JPG
IMG_6419.JPG
IMG_6420.JPG
IMG_6422.JPG
IMG_6423.JPG
IMG_6424.JPG

Once that's done, it's time to wire up our power delivery boards.

Connect the 5V LM2596 boards to the Arduino and Servo PCB while the 9V one connects to the L298N motor driver board!

They should be connected like so:

LM2596 5V - > Arduino VIN

LM2596 GND - > Arduino GND


LM2596 5V - > Servo VIN

LM2596 GND- > Servo GND


LM2596 9V - > L298N VIN

LM2596 GND - > L298N GND


Make sure to double-check all the polarities and whether the wires are connected tightly enough or not!

Connecting Motors to Motor Driver

IMG_6425.JPG
IMG_6426.JPG
IMG_6427.JPG
IMG_6428.JPG
IMG_6429.JPG
IMG_6430.JPG
IMG_6433.JPG

Now, we can wire the motors up to the motor driver.

Connect the left side motors on the left terminal and the right side motors to the right terminal.

The polarity will not matter since they can be easily changed in the code!

Installing Base Servo

IMG_6436.JPG
IMG_6437.JPG
IMG_6439.JPG
IMG_6442.JPG
IMG_6443.JPG
IMG_6445.JPG
IMG_6462.JPG
IMG_6463.JPG
IMG_6464.JPG

Now we can install the first servo!

Slot the base servo into its spot on the main base.

Secure the servo with screws, ensuring it’s tightly mounted and doesn't shake.

Attach the base to the servo head using some screws.

Installing Arm 1 Servo

IMG_6446.JPG
IMG_6447.JPG
IMG_6448.JPG
IMG_6449.JPG
IMG_6450.JPG
IMG_6451.JPG
IMG_6452.JPG
IMG_6453.JPG
IMG_6454.JPG
IMG_6456.JPG

Screw the large servo into its designated bracket on the base.

Then, attach the servo head to the next arm segment using some screws.

Afterwards, secure the servo head with screws onto the actual servo and make sure it moves smoothly.

While you're at it, tie a rubber band around the base and arm 1 to add some extra support!

Installing Arm 2/3 Servo

IMG_6457.JPG
IMG_6458.JPG
IMG_6459.JPG
IMG_6460.JPG
IMG_6465.JPG
IMG_6466.JPG
IMG_6467.JPG
IMG_6468.JPG
IMG_6469.JPG
IMG_6471.JPG
IMG_6472.JPG
IMG_6473.JPG
IMG_6475.JPG
IMG_6477.JPG
IMG_6478.JPG

Screw the third and final large servo into its designated bracket on the second segment of the arm.

Make sure it is tight and that it does not wiggle or shift.

Then, mount the small SG90 servo into its bracket on the third arm segment.

Secure it in place using two screws and make sure it is fitted securely.


Once you're done, attach the second arm segment to the first arm by screwing the servo head on.

Installing Arm 4 Servo

IMG_6481.JPG
IMG_6482.JPG
IMG_6483.JPG
IMG_6484.JPG
IMG_6486.JPG
IMG_6490.JPG
IMG_6491.JPG
IMG_6493.JPG
IMG_6494.JPG
IMG_6496.JPG
IMG_6497.JPG
IMG_6501.JPG
IMG_6502.JPG

Mount the SG90 servo into its designated slot on the wrist segment.

Secure the servo using the screws and make sure it doesn't wiggle around.

Then, attach the servo head to the second arm segment.

Installing Arm 5 Servo

IMG_6503.JPG
IMG_6504.JPG
IMG_6505.JPG
IMG_6509.JPG
IMG_6510.JPG

Install the SG90 servo into its designated slot on the final arm segment.

Secure the servo using the screws and make sure it doesn't wiggle around.

Then, attach the servo head to the wrist segment.

Installing Final Claw Mechanism

IMG_6511.JPG
IMG_6512.JPG
IMG_6518.JPG
IMG_6519.JPG
IMG_6520.JPG
IMG_6521.JPG
IMG_6522.JPG
IMG_6523.JPG
IMG_6524.JPG
IMG_6525.JPG
IMG_6526.JPG
IMG_6527.JPG
IMG_6528.JPG
IMG_6529.JPG
IMG_6530.JPG
IMG_6531.JPG
IMG_6532.JPG
IMG_6533.JPG
IMG_6534.JPG
IMG_6537.JPG
IMG_6538.JPG
IMG_6539.JPG
IMG_6540.JPG
IMG_6541.JPG
IMG_6542.JPG
IMG_6543.JPG
IMG_6545.JPG
IMG_6547.JPG
IMG_6548.JPG
IMG_6550.JPG
IMG_6551.JPG
IMG_6552.JPG
IMG_6553.JPG
IMG_6554.JPG
IMG_6555.JPG
IMG_6556.JPG
IMG_6557.JPG

Finally, we can begin assembling the actual claw mechanism itself. The photos are quite self-explanatory and the mechanism is actually quite simple and doesn't take very long to assemble!

I would recommend tightening two nuts against each other in order to allow the claws to still freely move without the whole mechanism getting loose.

Once the final SG90 servo has been installed, test it out manually by gently moving the claws with your hand. Make sure that it is fairly loose so that the servo doesn't have to carry any extra load which can cause it to heat up, skip gears or even get stuck.

Cable Management and Wiring

IMG_6558.JPG
IMG_6560.JPG
IMG_6563.JPG
IMG_6564.JPG
IMG_6565.JPG
IMG_6569.JPG
IMG_6441.JPG
IMG_6571.JPG

Finally, once you've done all that, you can then connect the servos to the Servo PCB!

I first routed the cables through the robot arm's hole before wrapping some of them up with tape in order to make it look cleaner.

Once that's done, connect the servos like so:

Base servo: S1 pin

Arm 1: S2 pin

Arm 2: S3 pin

Arm 3: S4 pin

Arm 4: S5 pin

Arm 5: S6 pin


It's essentially just in the order of vertical height!

Connecting Motor Driver and Servo PCB to Arduino

IMG_6572.JPG
IMG_6573.JPG
IMG_6575.JPG
IMG_6577.JPG
IMG_6578.JPG
IMG_6581.JPG

Once you've done all that, it's time to wire up the motor driver and servo PCB!

To keep the robot from looking messy, I used a large jumper cable ribbon to neatly connect the Servo PCB and Motor Driver directly to the Arduino.

This way, instead of manually wiring each connection, I configured and managed the connections through my code for a cleaner and more visually appealing setup!


The wiring connections are as follows:

Servos:

  1. Base Servo - D13
  2. Arm 1 - D12
  3. Arm 2 - D11
  4. Arm 3 - D8
  5. Arm 4 - D9
  6. Arm 5 - D10


L298N Motor Board:

  1. enA - D2
  2. enB - D7
  3. in1 - D3
  4. in2 - D4
  5. in3 - D5
  6. in4 - D6

Attaching Wheels to Motors

IMG_6583.JPG
IMG_6584.JPG

Once you're done with that, make sure to also attach the wheels onto the motors!

Programming

IMG_6587.JPG
Screenshot 2025-01-11 022655.png

Now, we can program our Arduino Mega to control everything!

To begin, download the attached code in this step.

  1. Open it using Arduino IDE.
  2. Before uploading the code to the Arduino, make sure to install the Dabble library in the Arduino IDE. Here’s how you can do it:
  3. In the IDE, navigate to "Sketch" in the top menu, then click on "Include Library" and select "Manage Libraries...".
  4. In the Library Manager, search for "Dabble" in the search bar.
  5. Then, click the "Install" button next to the first Dabble library result that shows up.
  6. Wait for the installation to complete.


  1. Once the Dabble library has been installed, connect the Arduino Mega to your computer via USB and upload the code!

I would recommend double-checking all of the physical connections and the assigned pins on the code to avoid errors later on!

Downloads

Powering On

IMG_6588.JPG
IMG_6590.JPG
IMG_6591.JPG
IMG_6594.JPG
IMG_6595.JPG

Finally, after all our hard work, we can then connect the 12V LiPo battery to the battery connector before securing the battery to the bottom of the base using some straps or tape (like I did).

On power up, you may notice that your HM-10 module is flashing its LED on and off. This means that it is ready for pairing!

Using Robot / Conclusion!

IMG_6585.JPG
Claw Robot Demo
IMG_6596.JPG
IMG_6597.JPG
FMM6RWFM5QRQLIC.jpg
FAFHZYJM5QRQLSS.jpg
FGA12GHM5QRQME3.jpg
FQGHZRNM5QRQM8R.jpg
FNW5FKWM5QRQLNK.jpg
IMG_6592.JPG
IMG_6593.JPG

Now, we can finally use our robot!

  1. First, download the Dabble Control app on either iOS or Android and launch it.
  2. Then, press the small connect icon at the top right to connect your phone to the HM-10 module.
  3. If it is successful, your HM-10 module will stop flashing and instead have a solid LED turn on!


Now, launch the Gamepad and test out the controls!

The machine can be controlled in a few different ways through the Gamepad. The Joystick mode allows the motors to move super fast and turn in any direction effortlessly! Meanwhile, the digital mode is much better for precise controls such as when picking items up since it is slower but easier to control!


To control the robotic arm, follow these simple instructions:

  1. When the robot is first powered on, you can use the shape keys to control the robotic arm.
  2. Initially:
  3. Square and Circle keys move the base servo.
  4. Triangle and Cross keys control Arm 1.
  5. To change the controls to other parts of the arm:
  6. Press Start to switch control to the claw mechanism and Arm 4:
  7. Square and Circle now control the claw mechanism.
  8. Triangle and Cross now control Arm 4.
  9. Press Select to control the mid-section of the arm:
  10. Square and Circle will control Arm 3.
  11. Triangle and Cross will control Arm 2.

This setup allows you to easily toggle between the different servos for precise control!


Congratulations! You’ve now successfully built your very own robotic claw machine! I hope you found this guide helpful and had a great time building your own robot!

Thank you for following along, and happy tinkering!