DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

MAKER:Shebin Jose Jacob, Nekhil/Translated by: Fun Endless

Emo is a personal companion robot that combines fashion and innovation. Its birth is inseparable from the latest Raspberry Pi 4 technology and advanced design. It is not just a robot, but a living being. Unlike other robots, it has a unique personality and emotions that can capture your heart.

Hardware

– Raspberry Pi 4B– Micro Snow 2-inch IPS LCD display (240×320 resolution)– SG90 servos ×2– MG90 servo– 16-channel 12-bit PWM servo driver board– 801S vibration sensor module– Single-channel TTP223 touch sensor module– 8 Ω 0.5 W speaker module– PAM8403 dual-channel stereo audio amplifier module– 5 x 7 cm double-sided universal PCB prototype board– 40-pin 2.54 mm straight plug pin header connector (separated pin seat)– 304 stainless steel CSK countersunk cross bolt M2×10– M3 x 10 mm CHHD bolt nut set– M3 x 20 mm CHHD bolt nut set– B-30-1000 circuit board flying wire (with PVC insulated outer layer)– 2mm thick acrylic board

Software

– Autodesk Fusion 360– Microsoft VS Code

Tools

– Multifunctional screwdriver– Electric soldering iron– Lead-free solder wire– Circuit board welding fixture– Flux– Multifunctional wire stripper– Hot glue gun

Design Concept

We used Autodesk Fusion 360 to design the Emo robot, incorporating both solid and freeform modeling techniques.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4BTo simplify the printing process, we divided the robot’s body into several parts for easy assembly with screws.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

We carefully considered the position of the power supply, placing it on the base and leaving ample space for the power cord to move freely. To enhance the robot’s stability during movement, we also made the body slightly contact the base.

Additionally, we specifically chose a blue and white color scheme because the blue and white combination enhances the robot’s visual appeal.

3D Printing

We chose PLA as the 3D printing material and printed each component separately, which took a long time.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

To enhance the durability of the base, we set the fill density of the base to 40%, while other parts were set to 20%.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

Now that we have printed all the parts, let’s follow my steps to start assembling!

Note: 3D drawings and code can be found in the project file library: https://make.quwj.com/project/464

Assembling the Base

First, we will install the Micro USB module on the base, which will serve as the power supply interface for the robot.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

We will place the SW-420 vibration sensor near the USB module; it can detect any vibrations occurring around the robot.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

The base consists of the following three wires: VCC, GND, and the output wire of the vibration sensor.

Finally, we securely fasten the cover to the base using M3 x 10 mm bolts. Thus, we have completed the assembly of the base.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

Assembling the Head

To give the robot’s head touch capability, we used a compact capacitive touch sensor and perfectly embedded it in the designated area.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

The core component of the robot’s head is a Micro Snow 2-inch IPS display, which plays a crucial role in conveying the robot’s emotions. We secured this display with a black bracket and a small amount of hot melt glue.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

To achieve audio playback functionality, we integrated an 8 Ω 0.5 W speaker on the left side of the head, paired with a PAM8403 amplifier to amplify the sound from the Raspberry Pi.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

Next, we firmly attach the lower half of the head to the robot’s body using M3 x 15 mm screws. Then, we connect the previously assembled upper half of the head, completing the entire head assembly.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

Assembling the Body

In the body part, we installed three servos: two SG90 servos for the hands, and one MG90 servo for body rotation. To conveniently control these servos, we used the PCA9685-16 channel servo driver.

To ensure stability, we also fixed the MG90 servo to the front of the body using M2 nuts and bolts.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

We placed the PCA9685 module in the same area to effectively balance the gravity.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

Now we begin to assemble the robot’s hands. Simply install the SG90 servos at both ends and secure them firmly to the servo shaft to complete the assembly.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

We use a prototype board with female headers to connect the Raspberry Pi, which is more efficient than using wires. At the same time, by soldering, we ensure the correct connection of each component, thus minimizing the possibility of wire entanglement.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

To save space, we use a male USB Type-C board from a phone charger to power the Raspberry Pi. For audio transmission, we used a TRS audio jack.

Finally, we secure the Raspberry Pi to the back of the body with bolts, completing the power supply installation.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

Moreover, we used a 2 mm thick transparent acrylic board on the front, which can cover the gap between the outer cover and the LCD module.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

Wiring

Wiring diagram as follows:

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

Programming

Next, we begin writing the code to generate emotions, where servo movements and animations are the core parts. To achieve these complex functions, we use Python’s `multiprocessing` package, which allows the robot to perform multiple tasks simultaneously, improving operational efficiency.

We have already written the project code for you, and you just need to clone it to your local machine to use.

git clone https://github.com/CodersCafeTech/Emo.git

It is worth mentioning that we used Adobe After Effects software to create animations and exported them as image sequences, making it easier to integrate into the entire system.

Debugging

After completing the programming, we need to test all components to ensure the robot operates correctly.

First, install the required dependencies:

pip install adafruit-blinka adafruit-circuitpython-servokit

Enter the code folder (Code) and execute the following command to start the program:

python3 final.py

Your Emo robot is now up and running! When you say something to it, it will analyze your tone and display the corresponding expression on the screen.

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

Results

The moment to witness the miracle has arrived!

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

via https://www.hackster.io/coderscafe/emo-your-personal-companion-robot-dc8afe

Click the link in the text to read the original article at the end

DIY Desktop Robot That Can Laugh and Move Based on Raspberry Pi 4B

More exciting content

Make a Mini Retro TV with ESP32

Open-source Smart Watch Based on ESP32-S3

Neowave: RGB WiFi Colorful Mood Light

Light-sensitive Resistor + micro:bit DIY Color Ball Sorting Machine

Elegantly Using 4G Module on Raspberry Pi CM4

Make a Decent NAS “Upgraded Version” with Raspberry Pi

PiCalc: DIY OLED Screen Calculator Based on Raspberry Pi Pico

Leave a Comment