Loading...

Otto Robot using Arduino - Arduino Geek


Hello everyone! Welcome to Arduino Geek. Today we will discuss about an Arduino based Otto robot. So let's get started.

Otto Robot using Arduino:

Otto Robot is an open-source bipedal robot designed to be simple, low-cost, and easy to build and program. Otto Robot consists of a 3D-printed or laser-cut body and legs, four micro servos for each leg, an Arduino board for control, and various sensors and components for interaction with the environment. The robot can be programmed using the Arduino platform and a variety of software tools and libraries, such as Scratch, Python, and C++. Otto Robot can perform a wide range of movements, such as walking, dancing, and avoiding obstacles, and can be customized and expanded with new sensors, lights, and features.
Otto Robot has gained popularity among makers, educators, and hobbyists around the world as a fun and educational project for learning robotics and programming. It has been used in schools, workshops, and events to teach STEM subjects and promote creativity and innovation. The open-source nature of Otto Robot allows anyone to build, modify, and share their own version of the robot, making it a truly collaborative and community-driven project.

How to make Otto Robot using Arduino:

Otto Robot is an open-source bipedal robot that can be controlled using an Arduino microcontroller board. Here are the steps to build an Otto Robot using Arduino:

1. Collect the required components:

  • Arduino Nano or Uno board
  • Ultrasonic sensor (HC-SR04)
  • Servo motors (9g micro servos)
  • Battery (LiPo or NiMh)
  • Jumper wires
  • 3D printed parts (chassis, legs, and feet)

2. Assemble the robot:

  • 3D print the parts using the provided files and assemble the robot according to the instructions on the Otto DIY website.
  • Connect the servos to the legs and the feet, and attach them to the chassis.
  • Connect the ultrasonic sensor to the Arduino board using jumper wires.

3. Code the robot:

  • Download the Otto DIY library for Arduino from the Otto DIY website and install it on your Arduino IDE.
  • Use the example codes provided in the library or create your own code to control the robot's movements.
  • Upload the code to the Arduino board.

4. Power up the robot:

  • Connect the battery to the Arduino board and turn on the power switch.

5. Test the robot:

  • Observe the robot's movements and make any necessary adjustments to the code or hardware.
Building an Otto Robot using Arduino is a fun and educational project that can teach you about robotics, electronics, and programming. With some creativity and experimentation, you can create your own unique robot that can interact with the world around it.

Arduino Code:

Here is a basic Otto Robot code using Arduino:

#include <Servo.h>
// Define the servo pins
#define servoPin1 6
#define servoPin2 9
#define servoPin3 10
#define servoPin4 11

// Create the servo objects
Servo servo1;
Servo servo2;
Servo servo3;
Servo servo4;

// Define the ultrasonic sensor pins
#define trigPin 2
#define echoPin 3

void setup() {
  // Attach the servos to their pins
  servo1.attach(servoPin1);
  servo2.attach(servoPin2);
  servo3.attach(servoPin3);
  servo4.attach(servoPin4);

  // Initialize the ultrasonic sensor pins
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);

  // Initialize the serial communication
  Serial.begin(9600);
}

void loop() {
  // Read the distance from the ultrasonic sensor
  long duration, distance;
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = duration / 58.2;

  // Move the servos based on the distance
  if (distance > 10) {
    // Forward movement
    servo1.write(90);
    servo2.write(90);
    servo3.write(90);
    servo4.write(90);
  } else {
    // Backward movement
    servo1.write(180);
    servo2.write(180);
    servo3.write(0);
    servo4.write(0);
  }

  // Print the distance to the serial monitor
  Serial.print("Distance: ");
  Serial.print(distance);
  Serial.println(" cm");

  // Delay for 100 milliseconds
  delay(100);
}

Arduino Code Description:

This code uses the Servo library to control the four micro servos that move the legs of the robot. It also uses an ultrasonic sensor to measure the distance to an obstacle and move the robot forward or backward accordingly. The setup() function initializes the servo and sensor pins, and the loop() function reads the sensor data, moves the servos, and prints the distance to the serial monitor. You can customize this code to add new movements, behaviors, and sensors to your Otto Robot.
 
close