Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Manufacturing process

Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide

Components and supplies

Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide
Arduino Nano R3
×1
Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide
Ultrasonic Sensor - HC-SR04 (Generic)
×1
Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide
Solderless Breadboard Half Size
×1
Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide
SG90 Micro-servo motor
×1
Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide
Jumper wires (generic)
×1

Necessary tools and machines

Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide
Hot glue gun (generic)

Apps and online services

Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide
Arduino IDE
Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide
Arduino Web Editor

About this project

The idea for this project came from my daughter.

She wants a robot, and this robot can open its mouth so that it can put food in its mouth.

So, I searched indoors for things that were available: cardboard, Arduino Nano, ultrasonic sensor, servo motor... to be able to create a robot for girls to play in the fastest time, and at the lowest possible cost.

Create Body

I'm using cardboard to make body of robot

Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide

Using hot glue to connect all the parts

Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide

The most of body done

Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide

Make eye holes

Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide

Make mouth

Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide

Components/parts connection diagram

Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide

Connect USB power

Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide

Testing and Debugging

Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide

It's done!

Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide


Code

  • GoldScrew_EatingRobot.ino
GoldScrew_EatingRobot.inoArduino
/*
 * Cartboard eating Robot
 * Author: GoldScrew
 * Email: goldscrewdiy@gmail.com
 * Description: It's using HC-SR04 (Detect food by distance <= 5 cm) and Server (to open and close the mouth)
 */
 
#include <Servo.h>  
#define SERVO_PIN 9 // Set pin 9 for servo

// HC-SR04 ultrasonic sensor
const int trig = 3;     // trig of HC-SR04
const int echo = 2;     // echo of HC-SR04

// Servo
Servo mouthServo;

void setup()
{
  // Serial connection with baudrate 960
  Serial.begin(9600);
  
  // Send signal with TRIG
  pinMode(trig, OUTPUT);
  
  // Receive signal with ECHO
  pinMode(echo, INPUT);

  // Mouth Server
  mouthServo.attach(SERVO_PIN);
  mouthServo.write(90);
      
}
void loop()
{
  /* Duration */
  unsigned long duration;
  int distance; //Distance

  /* Send signal from TRIG pin */
  digitalWrite(trig, 0); //Stop trig pin
  delayMicroseconds(2); //Delay 2 micro seconds
  digitalWrite(trig, 1); //Send signal from TRIG pin
  delayMicroseconds(10); //Delay 10 micro seconds
  digitalWrite(trig, 0); //Stop trig pin
  
  /* Measure HIGH pulse width at ECHO pin */
  duration = pulseIn(echo, HIGH);

  //Calculate distance
  distance = int(duration/2/29.412);

  if(distance <= 5)
  {
    //Print distance
    Serial.println("the distance is less than 5 cm");
    
    // Start open mouth
    mouthServo.write(0);

    // Delay
    delay(1200);
    
  } else {

    //Print distance
    Serial.println("the distance is more than 5 cm");
    
    // Close the mouth
    mouthServo.write(90);  
  }
  
  // Delay
  delay(200);
}

Schematics

Build an Arduino Nano-Based Eating Robot – Step-by-Step Guide

Manufacturing process

  1. Build a Real-Time Gyroscope Game with Arduino Nano & MPU-6050 Sensor
  2. Unopad: Seamless Arduino MIDI Controller for Ableton Live
  3. Servo‑Driven Obstacle‑Avoiding Robot: Build with Arduino & HC‑SR04
  4. PiBot: The Arduino‑Powered Piano Robot for Precision Music Performance
  5. Create Musical Tones with Arduino: A Step‑by‑Step Guide
  6. Build a 4-Wheel Arduino Robot Controlled via Dabble App
  7. Master Modbus on Arduino: Step‑by‑Step Guide
  8. Build Your Own AI Assistant Robot Using Arduino & Python
  9. Build the Simplest Arduino Line‑Following Robot with SparkFun L298
  10. Build a Recordable Cardboard Robot Arm – Easy DIY with Arduino & Servos