Design and Control of a Quadruped Spider Robot Using ESP32

This article is pure content, 2800 words long, expected to take 5 minutes to read~

Nature has always been an incredible source of inspiration for technological advancements, as engineers attempt to replicate the complex mechanisms found in various animals. The spider robot is such an extraordinary creation. Due to its four legs, it can also be referred to as a quadruped robot. This innovative robotic project aims to simulate the movement and behavior of spiders.

Design and Control of a Quadruped Spider Robot Using ESP32

The spider robot is a quadruped walking robot inspired by a bionic replica of a spider, using its legs for movement. The arrangement of the legs allows it to move in various ways, including walking, running, and climbing. One component of this project is the integration of the ESP32 microcontroller, enabling wireless control and advanced motion coordination. The ESP32 is an ideal platform for the spider robot, enhancing its agility, versatility, and ability to navigate complex terrains. With its superior agility, versatility, and ability to traverse complex terrains, the spider robot has enormous potential in various fields, including search and rescue missions, exploration, and even home assistance.

Mechanism of the Spider Robot

The mechanism of the spider robot involves several key components and principles that enable its movement and functionality.

The spider robot belongs to the legged robot category, which is generally more complex than wheeled robots. Compared to wheeled robots, legged robots excel in traversing challenging terrains. Wheeled robots typically have DC motors, while legged robots usually have servo motors.

A fundamental difference between wheeled and legged robots lies in their degrees of freedom (DOF). Wheeled robots have only one degree of freedom, while the movement of legged robots is more complex.

The degree of freedom (DOF) of an object is defined by the number of parameters required to define the position of that object. In the case of our spider robot, each leg has 2 servo motors, allowing for 2 different movement directions. This means that the degree of freedom (DOF) for one leg is 2. Therefore, the total degree of freedom (DOF) for the spider robot is 8.

This project may not be very complex in terms of wiring and assembly, but understanding the kinematics behind the movement of the quadruped spider robot is quite complex.

To achieve controlled movement, the robot must perform different poses that collectively generate a single movement. This can be accomplished by implementing a crawling gait (movement pattern) where one leg is in the air while the other three legs should remain in contact with the ground while moving. Typically, to take a step forward, the robot will go through 6 different poses.

Quadruped Gait for Forward Movement

The gait refers to the specific leg movement pattern required to propel the body toward the desired destination. In the case of quadruped robots, the gait involves lifting one leg while the other three legs form a tripod support. This coordinated movement ensures stability and efficient motion.

To achieve the quadruped gait, it is crucial to determine when and where each leg should move. This process is known as inverse kinematics. Inverse kinematics allows us to calculate the necessary values to control the servo motors of the legs, enabling precise positioning of the legs to achieve the desired gait pattern.

Inverse kinematics plays a vital role in the smooth execution of the quadruped gait. By providing the necessary instructions to the servo motors, the robot’s legs can move accurately to the designated positions. This helps maintain balance and achieve efficient movement.

The above image illustrates the forward quadruped gait, showing the sequence of leg movements required for the robot to move forward effectively. The dashed lines indicate that the foot has been lifted.

Design and Control of a Quadruped Spider Robot Using ESP32

To ensure the stability of the robot, it is crucial to keep the center of mass (COM) within the support polygon. The support polygon refers to an imaginary polygon, and if the COM is within it, the robot can maintain its balance. However, if the COM moves outside the support polygon, the robot becomes unstable and may topple over. This concept is illustrated in the figure below; as long as the COM is within the support polygon, the robot remains balanced. It is a key principle for maintaining the robot’s operational stability and preventing falls.

Design and Control of a Quadruped Spider Robot Using ESP32

Components Required for the Spider Robot

  • ESP32 Microcontroller

  • SG90 Plastic Gear Servo Motor – 8 pcs

  • LM2596 DC-DC Buck Converter

  • 12V Lithium-ion Battery

  • Switch

  • Jumper Wires

  • Breadboard or PCB (Printed Circuit Board)

  • Screws, Nuts, Washers

Laser Cutting Files for the Spider Robot

We designed the acrylic parts of the quadruped spider robot using SolidWorks. .dxf file can be found in the link above.If you need to make any changes, you can also find .svg file.These works are also easily available on many e-commerce sites; just search for “quadruped spider robot parts” on Google, and you will find many links.

Assembly of the Spider Robot

Design and Control of a Quadruped Spider Robot Using ESP32

Adjusting the Servo Motor Positions

Before starting the assembly, we need to adjust the angles of the servo motors. Otherwise, your robot will not function properly.

Design and Control of a Quadruped Spider Robot Using ESP32

First, connect the servo arm to the servo by carefully aligning and securing it in place. We can manually calibrate and adjust the angle of the servo motors, but sometimes manual calibration may be inaccurate or may not be feasible. Therefore, you can use the provided code #1 to calibrate the servo motors. Refer to the circuit diagram mentioned below to connect the servo motors to pins 21, 19, 33, 25, 27, 14, 12, and 13 accordingly. Upload the provided code #1 to your ESP32, which will facilitate the calibration process. Failing to perform this step may result in unstable robot performance.

Design and Control of a Quadruped Spider Robot Using ESP32

By ensuring the correct alignment and calibration of the servo system, you can lay the foundation for a stable and functional robot.

Once the servo adjustments are complete, you can proceed to the leg assembly phase.

Leg Assembly Phase

Design and Control of a Quadruped Spider Robot Using ESP32

Step 1: Take the servo single arm and place it on the base pivot plate. Insert the servo mounting screws from the leg to the back side of the pivot plate. Tighten the screws until the servo single arm is securely attached to the pivot plate.

Step 2: Now, connect another servo single arm to the standing servo arm. For this, insert the servo mounting screws from the back of the leg servo arm and secure it to the servo single arm. Ensure that the connection is secure and stable.

Step 3: Continue by connecting the leg parallel joint to the leg piece using M3x10mm screws and M3 fiber nuts. Carefully check the tightness of the screws to ensure that the joint is securely connected to the leg piece.

Step 4: Next, connect the leg piece to the leg servo arm using M3x10mm screws and M3 fiber nuts.

Design and Control of a Quadruped Spider Robot Using ESP32

Step 5: Insert another servo into the servo bracket.

Step 6: Place the top of the second servo into the base servo slot.

Step 7: Use two M3x12mm screws and two M3 fiber nuts to secure the servo bracket to the leg servo sleeve.

Step 8: Now, connect the leg parallel plate to the other end of the leg using M3x10mm screws and M3 fiber nuts.

Design and Control of a Quadruped Spider Robot Using ESP32

Step 9: Position both servos at the center and align the leg parallel joint horizontally. Use the included servo arm screws to connect the leg servo arm to the first servo.

Step 10: Finally, use two M3x10mm screws and two M3 nuts to connect the leg assembly completed in the previous steps to the bottom pivot plate of the leg.

The leg assembly phase can be challenging, but once you complete these steps, the remaining process will become easier to manage. If you have successfully completed these phases, let’s continue to the body assembly part.

Body Assembly

At this stage, you should be careful with the numbers. The schematic illustrates the parts according to the part numbers, so you should read the list we created before assembly.

Parts list for structures 1 and 2:

  • 1- Body Upper Plate

  • 2- M3x10MM Screws

  • 3 – Servo Motors

  • 4 – M3 Nuts

  • 5 – M3 Fiber Nuts

  • 7 – M3x12MM Screws

  • 8 – Washers

  • 10 – Servo Bracket

Design and Control of a Quadruped Spider Robot Using ESP32

Step 1: Start the assembly by connecting the four valve rod washers to the valve rod bottom plate. Use four M3x10mm screws and four M3 flat nuts to securely fix the washers in place.

Step 2: Take the four servos and place them on top of the chassis top plate, ensuring they are correctly aligned.

Step 3: For each servo, install a servo bracket on top. Align the brackets correctly and secure them in place.

Step 4: Use M3x12mm screws and M3 fiber nuts to secure each servo bracket to the chassis top plate. Ensure they are tightly secured.

Design and Control of a Quadruped Spider Robot Using ESP32

Step 5: Now, continue to connect each leg piece to the valve rod bottom plate. Each leg piece uses M3x10mm screws and M3 fiber nuts. Be careful not to overtighten the screws, as this may cause servo failure.

Step 6: Bring the body bottom plate and the body top plate together. Use four M3x10mm screws and M3 nuts to securely connect these two components.

Step 7: Once the servos and leg pieces are in place, carefully rotate each leg to a 45-degree angle as shown in the instructions. Install the leg pivot plate and secure it to each pivot servo and leg using two M3x10mm screws and two M3 nuts for each leg.

Step 8: Finally, use the servo screws to secure the servo single arms to their respective servos, ensuring they are firmly connected.

Design and Control of a Quadruped Spider Robot Using ESP32

After assembly, it will look as follows:

Design and Control of a Quadruped Spider Robot Using ESP32

ESP32 Quadruped Spider Robot Circuit Diagram (8 Servo Motors) & ESP32 Quadruped Spider Robot Code and Instructions to be detailed in the next part

“Design and Control of a Quadruped Spider Robot Using ESP32 (Part II)”

This article is sourced from

https://circuitdigest.com/microcontroller-projects/esp32-controlled-quadruped-spider-robot

Follow the public account “Embedded Talk” to learn more interesting embedded information. Thank you all for your likes, and welcome everyone to leave messages in thecomment area for communication~

Leave a Comment

×