ARDUINO SPIDER ROBOT (QUADRUPED)
by DIY GUY Chris in Circuits > Arduino
61941 Views, 81 Favorites, 0 Comments
ARDUINO SPIDER ROBOT (QUADRUPED)
Hey guys! Here is a new tutorial to guide you step by step while making this kind of super amazing electronic projects which is the "Crawler robot" known also as "Spider Robot" ou a "Quadruped robot".
Since every body noticed the high speed evolution of robotics technology, we decided to take you guys to a higher level on robotics and robot making. we started a while ago by making some basic electronic projects and basic robot like PICTO92 the line follower robot in order to make you a bit familiar with the electronic stuff and find yourself able to invent your own projects.
Moving to another level, we've started with this robot which is a basic one in the concept but it will become a bit complicated if you get deeper in its program. And since these gadgets are so expensive in the webstore we provide this step by step guidance to guide you guys making your own Spiderbot.
This project is so handy to make specially after getting the customized PCB that we’ve ordered from JLCPCB to improve the appearance of our robot and also there is enough documents and codes in this guide to allow you create your crawler easily.
We've made this project in just 7 days only, just two days to finish the hardware making and the assemble, then five days to prepare the code and the android app. in order to control the robot through it. Before starting let’s see first
What you will learn from this tutorial :
- Selecting the right components depending on your project functionalities
- Making the circuit to connect all the choosen components
- Assemble all the project parts
- Scaling of the robot balance
- Using the Android app. to connect through Bluetooth and start manipulating the system
What Is a "Spider Robot"
As its name defines it, our robot is a basic representation of the sipder movements but it will not perform exactly the same body moves since we are using only four legs instead of eight legs.
Named also a Quadruped robot since it has four legs and make its movements using these legs, the movment of each leg is related to the other legs in order to identify the roboty body postion and also to control the robot body balance.
Legged robots handle terrain better than their wheeled counterparts and move in varied and animalistic ways. However, this makes legged robots more complicated, and less accessible to many makers. and also the making cost and the high depenses that a maker should spend in order to create a full body quadruped since it is based on servo motors or stepper motors and both are more expensive than DC motors that could be used in wheeled robots.
Advantages
You will find quadrupeds abundant in nature, because four legs allow for passive stability, or the ability to stay standing without actively adjusting position. The same is true of robots. A four-legged robot is cheaper and simpler than a robot with more legs, yet it can still achieve stability.
Servo Motors Are the Main Actuators
A servomotor as defined in wikipedia, is a rotary actuator or linear actuator that allows for precise control of angular or linear position, velocity and acceleration.[1]It consists of a suitable motor coupled to a sensor for position feedback. It also requires a relatively sophisticated controller, often a dedicated module designed specifically for use with servomotors.
Servomotors are not a specific class of motor although the term servomotor is often used to refer to a motor suitable for use in a closed-loop control system.
Generally speaking the control signal is a square wave pulse train. Common frequencies for control signals are 44Hz, 50Hz, and 400Hz. The positive pulse width is what determines the servo position. A positive pulse width of around 0.5ms will cause the servo horn to deflect as much as it can to the left (generally around 45 to 90 degrees depending upon the servo in question). A positive pulse width of around 2.5ms to 3.0ms will cause the servo to deflect to the right as far as it can. A pulse width of around 1.5ms will cause the servo to hold the neutral position at 0 degrees. The output high voltage is generally something between 2.5 volts and 10 volts (with 3V typical). The output low voltage ranges from -40mV to 0V.
The PCB Making (Produced by JLCPCB)
About JLCPCB
JLCPCB (Shenzhen JIALICHUANG Electronic Technology Development Co., Ltd.), is the largest PCB prototype enterprise in China and a high-tech manufacturer specializing in quick PCB prototype and small-batch PCB production.
With over 10 years of experience in PCB manufacturing, JLCPCB has more than 200,000 customers at home and abroad, with over 8,000 online orders of PCB prototyping and small quantity PCB production per day. The annual production capacity is 200,000 sq.m. for various of 1-layer, 2-layer or multi-layer PCBs. JLC is a professional PCB manufacturer featured of large scale, well equipment, strict management and superior quality.
Back to our project
In order to produce the PCB, I have compared the price from many PCB producers and I chose JLCPCB the best PCB suppliers and the cheapest PCB providers to order this circuit. All what I need to do is some simple clicks to upload the gerber file and set some parameters like the PCB thickness color and quantity, then I’ve paid just 2 Dollars to get my PCB after five days only.
As it shows the picture of the related schemtic, I have used an Arduino Nano to control the whole system also I've designed the robot spider shape to make this project much more better.
You can get the Circuit (PDF) file from here. As you can see in the pictures above the PCB is very well manufactured and I’ve got the same PCB spider shape that we’ve designed and all the labels and logos are there to guide me during the soldering steps.
You can also download the Gerber file for this circuit from here in the case you want to place an order for the same circuit design.
Ingredients
Now let’s review the necessary components that we need for this project, so as I've said, I'm using an Arduino Nano to run all the 12 servo motor of the robot four legs. The project also include an OLED display to display the Cozmo faces and a bluetooth module to control the robot through an android app.
In order to create this kind of projects we will need :
- - The PCB that we've order it from JLCPCB
- - 12 Servo motors as you remember 3 servos for each leg : https://amzn.to/2B25XbG
- - One Arduino Nano : https://amzn.to/2MmZsVg
- - HC-06 Bluetooth module : https://amzn.to/2B1Z3CY
- - One OLED Display screen : https://amzn.to/2OySnyn
- - 5mm RGB LEDs : https://amzn.to/2B56hq3
- - Some header connetcors : https://amzn.to/2nyZg7i
- - And the robot body peaces that you need to print them using a 3D printer
The Robot Assemble
Now we have the PCB ready and all the components soldered very well, after that we need to assemble the robot body, the procedure is so easy so just follow the steps that I show, we need first to prepare each leg a side and to make one led we need two servo motors for the joints and the Coxa, Femur and Tibia printed parts with this small attach part.
About the robot's Body pieces you can download its STL files from here.
Starting with the first servo, place it in its socket and hold it with its screws, after that turn the servos axe to 180° without placing the screw for the attaches and move to the next part wich is the Femur to connect it to the tibia using the first servo joint axe and the attach piece. The last step to complete the leg is placing the second joint I mean the second servo to hold the third part of the leg which is the Coxa piece.
Now repeat the same thing for all legs to get four legs done ready. After that take the upper chassis and place the rest of servos in them sockets and then connect each leg to the appropriate servo. There is only one last printed part which is the bottom robot chassis in where we will place our circuit board
The Android App.
Talking about the android up it allows you to
connect to your robot through Bluetooth and make forward and backward movements and left right turnings, it allows you also to control the robot light color in real time by picking the desired color from this color wheel.
You can download the android app for free from this link over :here
The Arduino Code and Test Validation
Now we have the robot almost ready to run but we need to set up the joints angles first, so upload the setup code which allows you to put each servo in the right position by attaching the servos in 90 degrees do not forget to connect the 7V DC battery in order to run the robot.
Next we need to upload the main program to control the robot using the android app. Both programs you can download them from the these links :
- Scaling servo code : download link
- Spider robot main program : download link
After uploading the code I have connected the OLED display in order to display Cozmo robot smiles that I’ve made in the main code.
As you can see guys in the pictures above, the robot follow all the instructions sent from my smartphone and still some other improvements to perform in order to make it much more butter.