Cute Desktop Companion Robot (TN24)
by tech_nickk in Circuits > Robots
281 Views, 5 Favorites, 0 Comments
Cute Desktop Companion Robot (TN24)
Introduction
Meet TN24, your charming and customizable desktop companion robot. It combines motion, expression, and orientation sensing to bring joy and liveliness to any workspace. I designed it with simplicity in mind, TN24 is easy to build and perfect for beginners and experienced makers alike. Its body is crafted from recycled cardboard, making it not only lightweight but also environmentally friendly. Whether you want to tweak its movements, expressions, or design, TN24 offers endless possibilities for personalization. TN24 is more than just a gadget — it’s a little friend that responds and entertains.
Supplies
Supplies
Here’s what you’ll need to build TN24:
Electronics
- Xiao ESP32S3 — Main microcontroller.
- 4x Servo Motors — For leg movement (e.g., SG90 or MG90S).
- OLED Display — For eye animations (e.g., 0.96" SSD1306).
- Accelerometer — For orientation detection (e.g., MPU6050 or ADXL345).
- Lithium-ion Battery — To power the robot (e.g., 3.7V 1200mAh).
- Header Pins - To attach the Servos
Structural Components
- Recycled cardboard for the body and leg parts.
- Double-sided tape or hot glue for securing components.
Tools
- Soldering iron and solder.
- Hot Glue Gun
- Wire cutter and stripper.
Software
- Arduino IDE (for coding the Xiao ESP32S3).
- Required libraries: Servo, Adafruit_GFX, Adafruit_SSD1306.
Design and Assembly
Body Design
- I designed a compact robot body with space for the microcontroller, battery, servos, and OLED display. Feel free to play around with design but ensure it is rectangular.
- Use recycled cardboard to create the body and legs.
Leg Mechanism
- Each leg is powered by a servo motor to achieve a walking motion.
- Attach the servo horns to the cardboard legs using screws or glue.
- Ensure the legs are symmetrical and aligned for balanced movement.
Eye Display
- Mount the OLED display securely on the robot’s front.
- The display will show animated eyes that change expression based on the robot’s orientation or input.
Orientation Sensor
- Mount the accelerometer at the robot’s center for accurate orientation detection.
- Secure it with double-sided tape or screws.
Electronics and Wiring
We are going to use tinkercad to test and esperiment with servos to esnsure they work well.
Here is the tinkercad link to the schematic and simulation.
- Circuit Diagram: Refer to the wiring diagram below:
- Xiao ESP32S3: Connect servos, OLED, accelerometer, and battery.
- Servos: Connect signal pins to GPIO pins (e.g., D0 - frontleft servo, D1- frontright servo, D2 - backlefservo, D3 - backright servo).
- OLED: Connect SDA and SCL to I2C pins. D4(SDA) and D5(SCl)
- Accelerometer: Connect SDA and SCL to I2C pins. D4(SDA) and D5(SCl)
- Battery: Connect to the Xiao ESP32S3’s power input (ensure proper polarity).
- I used a perf board for clean connection and to reduce tangling of wires.
- Soldered the header pins for each servo, the IMU and batterry in a way that they are easily accessible.
- Bundle and secure wires to prevent tangling.
Downloads
Programming
Overview
- Program the Xiao ESP32S3 to:
- Coordinate servo movements for walking.
- Display animated eyes on the OLED.
- Detect orientation using the accelerometer and trigger reactions.
Arduino Code
- Dowload the code from my GitHub Repository
- Ensure the expressions.h is in the same folder as TN24.ino for the OLED animations to work.
- Feel free to customize the code as much as you want to achieve the playfulness you need to have fun with the robot ;)
- Full code is available here.
- After unzipping the folder. Open the code in arduino IDE, ensure you have selected the right board and upload the code
Power and Battery Management
- Use a lithium-ion battery to power the robot.
- Integrate a charging module if you want TN24 to be rechargeable.
- Add a power switch for convenience.
Testing and Calibration
- Test each servo individually to ensure smooth motion.
- Calibrate the walking pattern for balanced movement.
- Adjust eye animations for desired expressions.
- Test the accelerometer for accurate orientation detection.
Having FUN
Power on the robot and place it on your desk or on the floor and you will see the magic happen. To make the robot move or play around, Tap it or shake it twice. The movements are fully customizable on the code. I am updating the repo frequently to add new movements, games and customizations.
Conclusion
TN24 is a delightful desktop companion that showcases creativity, engineering, and the joy of motion. Built with recycled cardboard, TN24 is not just innovative but also eco-friendly, inspiring sustainable robotics. I hope this guide inspires you to build your own TN24 and explore the world of robotics.
Let me know your thoughts and share your creations! Happy making!