DIY Spiderbot Hexapod Robot using ESP32-CAM FOV
DIY Spiderbot Hexapod Robot with ESP32-CAM FOV that can traverse multiple terrains & stream video using its camera with Code & 3D Model
- Suitable forB.Tech/Diploma ESP32-CAM students
- Build time1-2 weeks
- LevelBeginner
- Available atAjvika Labs, Kakinada
About this project
Overview
In this project, we build a DIY Spiderbot Hexapod Robot using ESP32CAM and SSC-32U servo controller. The robot can traverse multiple terrains and stream video using its camera. Notable for its cost-effectiveness and lightweight design, the robot integrates 18 micro servos within a sturdy frame. The assembly process is simplified through the use of plastic hole-and-pin connectors, eliminating the need for screws except for those needed for the servos. This project was sent in by the creator Atlin Anderson.
A standout feature of this hexapod is its FPV (First-Person View) camera, offering adjustable resolution to enhance the user experience. Control is facilitated through a custom Android application, connecting to the robot via a WiFi access point. This feature underscores the project’s emphasis on accessibility and user-friendly operation. The hexapod’s semi-modular electronic mount further contributes to its adaptability, supporting potential upgrades or modifications.
This project distinguishes itself through minimal electronics design, prioritizing ease of assembly and maintenance. Additionally, the customizable nature of the Android control app allows for personalization, tailoring the control interface to suit individual preferences.
Bill of Materials
Following are the list of components required to build DIY Spiderbot Hexapod Robot based on ESP32-CAM Module.
S.N.
Components
Quantity
Purchase Link
ESP32 Cam Module
FTDI Module
SSC-32U Servo Controller
Goteck Servo
Switch SPST
Bread Board Jumpers
7.4V 2000mah Li Battery
Li Battery Charger
Deans male connector
5V 9A setpdown voltage regulator
2000uF Capaictor
Servo cable extenders
2W LED COB
110 ohm resistor
BC547 NPN BJT transistor
JST connector (for LED)
PLA filament
TPU filament
What is a Hexapod Robot?
A hexapod robot is a six-legged mechanical device that mimics the movement of insects, offering stability and flexibility in various terrains.
It can perform complex maneuvers such as turning and climbing, thanks to the independent control of each leg. Hexapods are utilized in diverse fields, including research, education, and exploration, benefiting from their ability to navigate difficult environments more effectively than wheeled robots. Their design ranges from simple to highly complex systems, incorporating advanced features like obstacle avoidance, inverse kinematics, and autonomous navigation.
Hardware & Circuit
The circuit diagram depicts the electrical connections for a Hexapod (SpiderBot) Robot with an ESP32-CAM and a servo controller.
Power Supply:
A 7.4V LiPo battery is used to power the circuit, connected through a JST connector.
A USB 7.4 LiPo removable charger connects to the battery for recharging.
A voltage regulator (D24V90F5) steps down the voltage to 5V, suitable for powering the ESP32-CAM and servos.
An SPST (Single Pole Single Throw) switch is used to control the power to the circuit.
ESP32-CAM:
This is the microcontroller and camera module that can be used for streaming video and controlling the robot.
It is powered by the 5V output from the voltage regulator.
A brownout prevention capacitor is placed close to the ESP32-CAM to stabilize the power supply and prevent the ESP32 from resetting during voltage dips.
The Ground (GND) from the voltage regulator is connected to the ESP32-CAM’s GND.
SSC-32U Servo Controller:
This is a 32-channel servo controller used for controlling multiple servos of the hexapod.
It is connected to the ESP32-CAM via the RX (Receive) pin for control signals.
The VS1 input on the servo controller receives power from the voltage regulator.
VS is connected to VL
Servos:
Multiple servos are connected to the servo controller. Each servo connection is labeled (e.g., SERVO LEG 6 COXA) indicating which part of the hexapod it controls.
LED and Transistor:
A 2W 5V LED COB (Chip On Board) serves as a light source for the camera to see in dark conditions.
A 110R resistor limits the current to the LED to prevent it from burning out.
A B547 (NPN BJT) transistor acts as a switch, controlling the LED’s power state from an IO4 from the ESP32-CAM
Connectors and Misc:
A Deans connector is used for a secure power connection.
A micro JST connector is noted, which allows the lightbar of the circuit to be disconnected when needed.
Software Structure for Operating Hexapod Robot
The diagram illustrates a loop where the user sends commands through the Android app, the ESP32-CAM receives and processes these commands, and then relays instructions to the servo controller to perform the desired actions.
This setup allows for real-time control of the robot’s movements and functions via the Android app.
Android App Side:
A user interacts with the app by pressing an action button.
Upon this interaction, the app sends a UDP (User Datagram Protocol) packet to the target IP address, which is the address of the ESP32-CAM module.
ESP32-CAM Side:
The ESP32-CAM acts as a wifi access point and is continuously running code that listens for incoming UDP packets.
Once a packet is received, the ESP32-CAM checks for specific actions. These actions could be one-time commands like toggling a headlight or continuous commands like moving.
If the action requires a continuous operation (e.g., walking, stopping), the ESP32-CAM updates the operation if a different packet is received with a new command.
After processing the command, the ESP32-CAM sends a corresponding command string to the servo controller, which then translates this into the movements of the robot’s servos.
Source Code/Program
Let us take a look at the code for DIY Spiderbot Hexapod Robot made using ESP32-CAM Module. The code written by Atlin Anderson can be found on the
GitHub Repository
The code is for controlling a six-legged (hexapod) robot equipped with an ESP32-CAM, which functions as both the controller and video streamer. Here’s a breakdown of the main functionalities of the code:
Initialization and Configuration
: The script initializes serial communication, sets up the ESP32-CAM with specific configurations, and establishes a WiFi access point named “ESP32 Spiderbot”. It also configures a web server to handle requests for streaming video in different resolutions and formats.
Servo Control
: It defines variables and functions for controlling the servos that move the robot’s legs. Each leg has three servos (coxa, femur, tibia) and the code includes functions to move these servos to specific angles to achieve walking, rotating, strafing, and other movements.
UDP Communication
: The robot listens for UDP packets on a specific port which controls the robot’s actions like walking forward, backward, rotating, etc., based on commands received over the network.
Web Server Functions
: The server provides endpoints to access live video feeds from the ESP32-CAM in different formats and resolutions (BMP, low-resolution JPEG, high-resolution JPEG, and MJPEG stream).
Multi-threading
: A task is created to handle web server clients separately, ensuring that video streaming operations do not block the main control loop of the robot.
This code effectively makes the spiderbot a remotely controlled robot with live video feedback, showcasing how it can be controlled and monitored via a network.
In this project, we build a DIY Spiderbot Hexapod Robot using ESP32CAM and SSC-32U servo controller. The robot can traverse multiple terrains and stream video using its camera. Notable for its cost-effectiveness and lightweight design, the robot integrates 18 micro servos within a sturdy frame. The assembly process is simplified through the use of plastic hole-and-pin connectors, eliminating the need for screws except for those needed for the servos. This project was sent in by the creator Atlin Anderson.
A standout feature of this hexapod is its FPV (First-Person View) camera, offering adjustable resolution to enhance the user experience. Control is facilitated through a custom Android application, connecting to the robot via a WiFi access point. This feature underscores the project’s emphasis on accessibility and user-friendly operation. The hexapod’s semi-modular electronic mount further contributes to its adaptability, supporting potential upgrades or modifications.
This project distinguishes itself through minimal electronics design, prioritizing ease of assembly and maintenance. Additionally, the customizable nature of the Android control app allows for personalization, tailoring the control interface to suit individual preferences.
Bill of Materials
Following are the list of components required to build DIY Spiderbot Hexapod Robot based on ESP32-CAM Module.
S.N.
Components
Quantity
Purchase Link
ESP32 Cam Module
FTDI Module
SSC-32U Servo Controller
Goteck Servo
Switch SPST
Bread Board Jumpers
7.4V 2000mah Li Battery
Li Battery Charger
Deans male connector
5V 9A setpdown voltage regulator
2000uF Capaictor
Servo cable extenders
2W LED COB
110 ohm resistor
BC547 NPN BJT transistor
JST connector (for LED)
PLA filament
TPU filament
What is a Hexapod Robot?
A hexapod robot is a six-legged mechanical device that mimics the movement of insects, offering stability and flexibility in various terrains.
It can perform complex maneuvers such as turning and climbing, thanks to the independent control of each leg. Hexapods are utilized in diverse fields, including research, education, and exploration, benefiting from their ability to navigate difficult environments more effectively than wheeled robots. Their design ranges from simple to highly complex systems, incorporating advanced features like obstacle avoidance, inverse kinematics, and autonomous navigation.
Hardware & Circuit
The circuit diagram depicts the electrical connections for a Hexapod (SpiderBot) Robot with an ESP32-CAM and a servo controller.
Power Supply:
A 7.4V LiPo battery is used to power the circuit, connected through a JST connector.
A USB 7.4 LiPo removable charger connects to the battery for recharging.
A voltage regulator (D24V90F5) steps down the voltage to 5V, suitable for powering the ESP32-CAM and servos.
An SPST (Single Pole Single Throw) switch is used to control the power to the circuit.
ESP32-CAM:
This is the microcontroller and camera module that can be used for streaming video and controlling the robot.
It is powered by the 5V output from the voltage regulator.
A brownout prevention capacitor is placed close to the ESP32-CAM to stabilize the power supply and prevent the ESP32 from resetting during voltage dips.
The Ground (GND) from the voltage regulator is connected to the ESP32-CAM’s GND.
SSC-32U Servo Controller:
This is a 32-channel servo controller used for controlling multiple servos of the hexapod.
It is connected to the ESP32-CAM via the RX (Receive) pin for control signals.
The VS1 input on the servo controller receives power from the voltage regulator.
VS is connected to VL
Servos:
Multiple servos are connected to the servo controller. Each servo connection is labeled (e.g., SERVO LEG 6 COXA) indicating which part of the hexapod it controls.
LED and Transistor:
A 2W 5V LED COB (Chip On Board) serves as a light source for the camera to see in dark conditions.
A 110R resistor limits the current to the LED to prevent it from burning out.
A B547 (NPN BJT) transistor acts as a switch, controlling the LED’s power state from an IO4 from the ESP32-CAM
Connectors and Misc:
A Deans connector is used for a secure power connection.
A micro JST connector is noted, which allows the lightbar of the circuit to be disconnected when needed.
Software Structure for Operating Hexapod Robot
The diagram illustrates a loop where the user sends commands through the Android app, the ESP32-CAM receives and processes these commands, and then relays instructions to the servo controller to perform the desired actions.
This setup allows for real-time control of the robot’s movements and functions via the Android app.
Android App Side:
A user interacts with the app by pressing an action button.
Upon this interaction, the app sends a UDP (User Datagram Protocol) packet to the target IP address, which is the address of the ESP32-CAM module.
ESP32-CAM Side:
The ESP32-CAM acts as a wifi access point and is continuously running code that listens for incoming UDP packets.
Once a packet is received, the ESP32-CAM checks for specific actions. These actions could be one-time commands like toggling a headlight or continuous commands like moving.
If the action requires a continuous operation (e.g., walking, stopping), the ESP32-CAM updates the operation if a different packet is received with a new command.
After processing the command, the ESP32-CAM sends a corresponding command string to the servo controller, which then translates this into the movements of the robot’s servos.
Source Code/Program
Let us take a look at the code for DIY Spiderbot Hexapod Robot made using ESP32-CAM Module. The code written by Atlin Anderson can be found on the
GitHub Repository
The code is for controlling a six-legged (hexapod) robot equipped with an ESP32-CAM, which functions as both the controller and video streamer. Here’s a breakdown of the main functionalities of the code:
Initialization and Configuration
: The script initializes serial communication, sets up the ESP32-CAM with specific configurations, and establishes a WiFi access point named “ESP32 Spiderbot”. It also configures a web server to handle requests for streaming video in different resolutions and formats.
Servo Control
: It defines variables and functions for controlling the servos that move the robot’s legs. Each leg has three servos (coxa, femur, tibia) and the code includes functions to move these servos to specific angles to achieve walking, rotating, strafing, and other movements.
UDP Communication
: The robot listens for UDP packets on a specific port which controls the robot’s actions like walking forward, backward, rotating, etc., based on commands received over the network.
Web Server Functions
: The server provides endpoints to access live video feeds from the ESP32-CAM in different formats and resolutions (BMP, low-resolution JPEG, high-resolution JPEG, and MJPEG stream).
Multi-threading
: A task is created to handle web server clients separately, ensuring that video streaming operations do not block the main control loop of the robot.
This code effectively makes the spiderbot a remotely controlled robot with live video feedback, showcasing how it can be controlled and monitored via a network.
Technologies used
Hardware components
- ESP32
- ESP32-CAM
- Relay
- Servo
Software & tools
- Arduino IDE
What you get
- Working project / hardware kit, tested before delivery
- Complete source code with explanation
- Project demo and guidance for your viva
- Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed.
Payment is in two parts:
• 50% advance to start the project
• Remaining 50% before delivery
Note:
• Documentation and PPT are not included by default
• If you need documentation/PPT, it can be arranged for extra time and cost
We'll confirm the exact timeline and cost with you after reviewing your requirements.