Project Overview
The "Interactive Eating Robot" is a charming educational toy that introduces young learners to the concepts of sensors and actuators. Built using a compact Arduino Nano, the robot "wakes up" and opens its mouth when it detects an object nearby, thanks to its HC-SR04 Ultrasonic eyes. This project is a perfect example of "Creative Engineering"—using common household materials like cardboard and hot glue to house sophisticated electronics. It demonstrates a classic trigger-action loop where distance data is translated into mechanical movement via an SG90 Micro-servo.
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.
Technical Deep-Dive
- Ultrasonic Ranging Logic: The robot utilizes the HC-SR04 sensor's time-of-flight principle. The Arduino sends a 10µs pulse to the
TRIGpin, which emits an ultrasonic burst. TheECHOpin then stays HIGH until the bounce-back is received. By calculatingdistance = (duration/2) / 29.1, the software determines precisely how close the "food" is. - Servo Actuation: The SG90 Servo is controlled via Pulse Width Modulation (PWM). When the distance drops below a set threshold (e.g., 10cm), the Arduino commands the servo to rotate from its "closed" position ($0^\circ$) to its "open" position ($90^\circ$). The gear-driven mechanism allows the cardboard mouth to lift reliably.
- Firmware State Machine: The code operates in a continuous loop, but it includes a "Cooldown" or "Hysteresis" logic to prevent the mouth from flickering open and shut if the object is right on the edge of the detection limit. This is handled by a small
delay()or a state timer in the code. - Power & Portability: The Arduino Nano is powered via a standard USB cable, which can be connected to a power bank, making the robot a portable toy. The low current draw of the HC-SR04 and SG90 (during moderate movement) makes this an efficient and safe desktop project.
Construction & Engineering
- Rapid Cardboard Prototyping: Cardboard is an excellent medium for robotic shells because it is lightweight and easily modified. The structural integrity is maintained using hot glue at the seams.
- Mechanical Linkage: The servo arm is connected to the cardboard "lower jaw" or "upper lid". The placement of the servo is critical; it must be aligned with the pivot point of the cardboard flap to ensure smooth rotation without overstraining the plastic gears.
- Interfacing: Since this is an introductory project, the wiring is kept simple with a breadboard or direct jumper connections, allowing for quick troubleshooting and iterative testing of the mouth's opening angle.