Overview
Tools:
- Ruller
- Scissors
- Screwdriver
- Nuts and bolts
- Rubber bands
Electronics:
- Arduino compatible board
- Breadboard
- 2 x 180deg micro servo Jumper wires
- MLT-BT05 bluetooth 4.0 module
Building time:
90 min
Difficulty:
Advanced
Project info
Robot Dog is an exciting and fun project for advanced cardboard robot builders. The robot only uses two servo motors yet it is able to accomplish full walking cycle and you can move it in four directions.
This walking robot dog is an upgrade to the first version.
It can be build with Arduino or Micro:Bit electronics.
Main problem with the first version of robot dog was leg attachement. Carboard legs attached to servo motors combined with specific movement typy of this robot resulted it quick degradation of the connection.
In new version I used popsicle sticks attached to the servos which make the construction solid but requires more permanent modification on the servo motors.
You can connect this robot with LOFI Control App for Arduino.
Building manual
Robot design plan
How to read robot plans:
- BLACK LINES – cut this line first
- RED LINES – detailed shapes cut after the black lines
- BLUE DASHED LINES – bending lines traced with scissors
Arduino circuit
The circuit shown on the diagram below was design with the main gol of simplicity (as far as you can tell Arduino breadboarding can be simple in the scope of primary school 😉
Pay attention to one design choice – Power supply is passed through Arduino voltage regulator and servos are powered from Arduino Vin pin. The same goes for bluetooth module.
This design can result in power drops on quick movements and resetting bluetooth module that leads to disconnecting from mobile app. Overall a frustrating experience.
If you are a bit more experienced Arduino user you know that Arduino board, servos and bluetooth module should be connected to power supply separately for more stable operation.
LOFI Control App
To control the robot use our web app – LOFI Control for Arduino
Arduino Code
#include <Servo.h>
Servo myservo;
Servo myservo2;
int pos = 70;
int speed = 100;
int low_limit = 70;
int high_limit = 120;
int zero1 = 98;
int zero2 = 90;
int move = 0;
int reading = 0;
void setup() {
Serial.begin(9600);
myservo.attach(9);
myservo2.attach(10);
myservo.write(zero1);
myservo2.write(zero2);
}
void loop() {
app(); // interpretation of commands received from the LOFI Control App
}
void forward() {
myservo.write(zero1 + 22);
delay(speed);
myservo2.write(zero2 - 20);
delay(speed);
myservo.write(zero1 - 21);
delay(speed);
myservo2.write(zero2 + 20);
delay(speed);
}
void left() {
myservo.write(zero1 - 40);
delay(speed);
myservo2.write(zero2 - 20);
delay(speed);
myservo.write(zero1 + 20);
delay(speed);
myservo2.write(zero2 + 20);
delay(speed * 2);
}
void back(int speed) {
myservo.write(zero1 - 20);
delay(speed);
myservo2.write(zero1 - 20);
delay(speed);
myservo.write(zero1 + 20);
delay(speed);
myservo2.write(zero1 + 20);
delay(speed);
}
void right(int speed) {
myservo.write(zero1 + 40);
delay(speed);
myservo2.write(zero2 + 20);
delay(speed);
myservo.write(zero1 - 20);
delay(speed);
myservo2.write(zero2 - 20);
delay(speed * 2);
}
void app() {
if (Serial.available() > 0) {
move = Serial.read();
}
if (move == 1) {
forward();
}
if (move == 2) {
left();
}
if (move == 3) {
right(speed);
}
if (move == 4) {
back(200);
}
if (move == 5) {
happy();
}
if (move == 0) {
myservo.write(zero1);
myservo2.write(zero2);
}
}
void happy() {
int swing = 12;
for (pos = zero1 - swing; pos <= zero1 + swing; pos += 1) {
myservo.write(pos);
delay(5);
}
for (pos = zero1 + swing; pos >= zero1 - swing; pos -= 1) {
myservo.write(pos);
delay(5);
}
}