QUADRUINO ROBOT QUADRUPED WALKING (DIY)
by salvadortegas in Circuits > Robots
1843 Views, 20 Favorites, 0 Comments
QUADRUINO ROBOT QUADRUPED WALKING (DIY)
Quadruino is a quadruped walking robot controlled by the Arduino microprocessor and with servo actuators. It walks in a way similar to the AT-AT from Star Wars and avoids obstacles using the ultrasonic module HC-SR04. Use the ultrasonic module to measure the distance between the robot and any obstacle in its path. Based on the measured distance, the robot should be able to decide whether it can continue moving forward or if it needs to adjust its trajectory to avoid a collision.
Robot Quadruino :This project aims to be educational and easy to build, with few necessary construction elements. The combination of a quadruped robot and the Arduino platform is exciting and attractive to those interested in robotics and programming.
QUADRUINO robotics project detailed in the included PDF guide. The guide contains step-by-step instructions and images for assembling the four-legged robot using an Arduino board. It also provides an Arduino Quick Guide for programming,
Supplies
- 1x BASE https://www.tinkercad.com/things/aKz1JOmdb5N
- 4x Retro Mini Hinges €0.75 x 4
- 1x Quadruino Legs (3D Printing) https://www.tinkercad.com/things/aKz1JOmdb5N
- 1x Quadruino Carapace https://www.tinkercad.com/things/3yrjjhPHEYt-carcasa-quadruino
- 1x 1pc SYB-170 Mini Solderless Breadboard Prototype 170 Breakout Points 35*47*8.5mm For DIY Kit
- 2x Rc Mini Micro 9g 1.6KG Servo SG90 for RC 250 450 Helicopter Airplane Car Boat for Arduino DIY with Bracke
- 12x M Dupont Line 40 Pin Male to Male + Male to Female Jumper Wire for Arduino DIY KIT
- 1x Leonardo R3 Original Microcontroller Atmega32u4 Development Board with USB Cable Compatible for Arduino DIY Starter Kit
- 1x Alkaline Power 6 LR 61 9 V Battery 5410853039303
- 1x 9V Battery Snap Connector Clip Lead Wires Holder
- 1xSlide Switch, Micropower Toggle Switch, Single and Double Row, Direct Inserted, Horizontal Slide,
- 1x 1pc HC-SR04 SR04 4Pin Ultrasonic Module Distance Measuring Transducer Sensor
- 1x Hot Glue Gun Mini Hot Glue Gun - Glue Gun Crafts 20W Glue Gun 7mm*130mm 30 Sticks Glue Gun
- 1x The elements to be printed in 3D can be found in the links of the document Quadruino+Robot+eng.pdf
Downloads
Process of Fabrication to Make Your Robot:
Print the legs, the base, and the shell in PLA using a 3D printer. You can use the STL files that are included in the PDF document or design your own pieces.
- Glue and screw the hinges to the base with silicone and screws. Make sure they are aligned and secure.
- Mount the servos on the rear legs as shown in the images. Connect the servo horns to the hinges with screws and nuts.
- Screw the Arduino board to the base, glue the breadboard and the battery holder with a drop of hot glue, and attach the power switch to the shell with screws and nuts.
- Connect the wiring and use jumper wires to connect the servo driver to the Arduino board, the servos to the servo driver, and the power switch to the battery holder.
To connect two servos to the Arduino board, you can follow the steps below:
1. Identify the digital output pins that you will use on the Arduino board to control the servos. For example, you can use pins 9 and 10.
2. Connect the red (power) wire of one of the servos to pin 9 of the Arduino.
Connect the red wire from the other servo to pin 10 on the Arduino.
3. Connect the black (ground) wire from both servos to the GND (ground) pin of the Arduino. Make sure all components share a common ground.
4. Connect the signal wires from the servos to the digital output pins
corresponding on the Arduino. For the first servo, connect its signal wire (usually yellow or white in color) to pin 9. For the second servo, connect its signal wire to pin 10.
CONNECTION OF THE ULTRASOUND MODULE, HC-SR04
The sensor has 4 pins. VCC and GND connect to the 5V and GND pins on the Arduino, and
Trig and Echo connect to any digital pin on the Arduino. Using the Trig pin we send the ultrasonic wave from the transmitter, and with the Echo pin we listen to the reflected signal.
- Program the robot with the Arduino IDE software. Upload the code that is included in the PDF document or write your own code.
- Test your robot and enjoy it. You can make it autonomous by modifying the code.
BASIC PROGRAM FOR QUADRUINO
#include <Servo.h>
Servo servo1;
Servo servo2;
int trigPin = 5;
int echoPin = 6;
void setup() {
servo1.attach(9);
servo2.attach(10);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
Serial.begin(9600);
}
void loop() {
long duration, distance;
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration / 2) / 29.1;
if (distance > 20) {
// Mueve servo1 entre 45 y 90 grados
for (int pos = 45; pos <= 90; pos++) {
servo1.write(pos);
servo2.write(pos);
delay(15);
}
for (int pos = 90; pos >= 45; pos--) {
servo1.write(pos);
servo2.write(pos);
delay(15);
}
} else {
// Detiene el movimiento de servo2 y sigue moviendo servo1 entre 45 y 90 grados
servo2.write(90); // Detiene servo2
for (int pos = 45; pos <= 90; pos++) {
servo1.write(pos);
delay(15);
}
for (int pos = 90; pos >= 45; pos--) {
servo1.write(pos);
delay(15);
}
}