ESP32-Based 3D-Printed Toy Robot With WiFi Control and Animated Face

by lhm0 in Circuits > Arduino

79 Views, 2 Favorites, 0 Comments

ESP32-Based 3D-Printed Toy Robot With WiFi Control and Animated Face

robot2.jpg
robot1.jpg
Marvin, a 3D-Printed Open-Source Robot (ESP32 + FreeRTOS)

This project describes the design and construction of an ESP32-based, fully 3D-printed toy robot featuring an animated face, sound output, and WiFi control.

Its expressive face is created using dual round LCD displays for the eyes and a monochrome OLED display for the mouth, while servo- and stepper-driven actuators enable movement of the head, arms, and wheels. An ESP32 D1 mini, running a FreeRTOS-based firmware written in C++, manages all sensors, actuators, audio, and network communication.

The robot is powered by a rechargeable battery and includes an integrated charging circuit, allowing it to be charged using a standard USB-C power supply. This makes the robot completely self-contained and mobile, without the need for an external power source during operation.

All mechanical parts were designed using Autodesk Fusion and optimized for 3D printing. The hardware architecture was developed with ease of reproduction in mind: only widely available breakout boards and simple, through-hole electronic components are used. To simplify wiring and assembly, all electronics are organized on two custom-designed, two-layer PCBs, avoiding SMD components and making the robot suitable for hobbyists, education, and teaching environments.

All mechanical designs, PCB files, and software are open source and publicly available on GitHub. The project may be freely used for private, educational, and non-commercial purposes, including personal builds and learning projects.

Robot Features Overview

The robot is designed as an interactive, autonomous, and remotely controllable toy robot with a strong focus on modularity and ease of replication.

Key Features

  1. ESP32-based control system

An ESP32 D1 mini serves as the central controller, handling sensors, actuators, displays, audio processing, and WiFi communication.

  1. Animated face using multiple displays
  2. Two round 0.71-inch LCD displays for expressive eyes
  3. One 0.96-inch monochrome OLED display for the mouth
  4. This combination enables facial expressions, animations, and visual feedback.
  5. Motorized articulation and movement
  6. Head rotation using an MG90S servo motor
  7. Two arms, each driven by an MG90S servo
  8. Platform movement via two 28BYJ-48 (5 V) stepper motors
  9. Segway-style mobile base

The robot stands on a wheeled platform resembling a Segway. The platform does not self-balance but is stabilized using additional support wheels.

  1. Battery-powered operation with USB-C charging
  2. Integrated rechargeable battery
  3. Onboard charging electronics
  4. Charging via a standard USB-C charger
  5. This allows the robot to operate independently and move freely.
  6. Audio input and output
  7. Miniature speaker driven by a MAX98357A audio amplifier
  8. INMP441 digital microphone for clap detection and ambient noise analysis
  9. Motion and orientation sensing

An MPU6050 inertial measurement unit provides tilt and motion data.

  1. WiFi connectivity and web-based control

The robot connects to a local WiFi network and hosts a web control interface, enabling:

  1. RC-style remote driving
  2. Triggering predefined actions and behaviors
  3. Fully 3D-printed mechanical design

All structural and mechanical components are 3D-printed, allowing easy reproduction and customization.

  1. FreeRTOS-based firmware

The software is written in C++ and uses FreeRTOS to manage concurrent tasks such as motor control, sensor processing, display animation, audio handling, and networking.

  1. Open-source project

All design files and source code are available in a public GitHub repository and may be used for private, educational, and non-commercial purposes.


System Architecture

The robot is built around a modular and replication-friendly system architecture, designed to minimize wiring complexity and simplify assembly.

Architectural Overview

The electronic system is divided into two main modules:

  1. Head module – control, perception, and user interaction
  2. Body module – power management and drive electronics

Both modules are connected using a 10-pin flat ribbon cable.

Design Philosophy

The architecture was developed with the following goals:

  1. Use of widely available and easy-to-source breakout boards
  2. Avoidance of SMD components to simplify manual assembly
  3. Reduction of wiring effort and potential errors
  4. Suitability for hobbyists, education, and teaching

To achieve this, two custom two-layer PCBs were designed. All breakout boards and a small number of through-hole discrete components are soldered directly onto these PCBs.

Head Module

The head module contains all components related to interaction and control:

  1. ESP32 D1 mini (main MCU)
  2. Dual 0.71-inch LCD eye displays
  3. 0.96-inch OLED mouth display
  4. MPU6050 motion sensor
  5. INMP441 digital microphone
  6. MAX98357A audio amplifier and speaker

Responsibilities of the head module include:

  1. Display animation and facial expressions
  2. Audio input and output
  3. Sensor data processing
  4. WiFi communication
  5. High-level behavior control

Body Module

The body module contains the power and motion-related electronics:

  1. Drivers for the two 28BYJ-48 stepper motors
  2. Rechargeable battery
  3. Battery charging controller with USB-C input
  4. Buck / step-up DC converter providing a stable 5 V supply
  5. Power on/off button

The three MG90S servo motors (head and arms) are powered and controlled directly by the ESP32.

Power and Mobility

  1. The integrated battery allows fully autonomous operation
  2. Charging is possible using any standard USB-C charger
  3. Power-sensitive logic components are electrically separated from motor drivers
  4. The modular design improves reliability, serviceability, and expandability


PCB 1 (Head Module) – First Assembly Step

pcb1_01.jpg
pcb1_02.jpg
pcb1_03.jpg
mic_header.jpg

Important Assembly Notes

Both PCBs in this project are populated on both sides. Because some solder pads are located under breakout boards, the assembly order is critical.

⚠️ Always solder the components in the order described.

If the steps are followed correctly, all solder pads remain accessible and the PCB can be assembled without issues.

Mounting Breakout Boards

All breakout boards used in this project are mounted to the carrier PCBs using standard 2.54 mm pin headers (check images in step 5).

The pin headers act as both electrical connections and spacers, positioning each breakout board at a height of approximately 2.54 mm above the carrier PCB. This ensures:

  1. Sufficient clearance for underlying components
  2. Good solderability
  3. Mechanical stability

Always use straight pin headers and ensure the breakout boards are aligned parallel to the carrier PCB before soldering.

Photos in this step show the PCB, all required components, and the PCB in its intermediate assembly state.

Components in This Step

  1. printed circuit board PCB1
  2. 10-pin IDC male connector
  3. IRF4905 MOSFET
  4. Two 3-pin stackable Arduino headers
  5. (A 4-pin header can be shortened if needed)

Assembly

  1. Front side:
  2. Solder the 10-pin IDC connector and the IRF4905 MOSFET to the front side of the PCB.
  3. Back side:
  4. Solder the two stackable headers to the back side of the PCB.
  5. The headers must not sit flush on the PCB. Leave a gap of approx. 1.5 mm between the PCB and the plastic header body (see photo).

After This Step

After completing this step, the PCB is prepared for the next assembly stage. All solder pads for later components remain accessible.

PCB 1 (Head Module) – Second Assembly Step

pcb1_04.jpg
pcb1_05.jpg

This step completes the front side population of the head module PCB.

⚠️ Important:

This step must only be performed after Step 3. The ESP32 D1 mini will cover solder pads used in Step 3.

Components in This Step

Discrete components:

  1. Tantalum capacitor C4 (47µF)
  2. Electrolytic capacitors C2 (10µF) and C3 (470µF)
  3. film capacitor C1 (100nF)
  4. Diode D2 (1N5819)
  5. Resistor R1 (100k)

Connectors and modules:

  1. Pin headers:
  2. 1 × 2-pin
  3. 2 × 3-pin
  4. 1 × 11-pin
  5. ESP32 D1 mini

Assembly

  1. Solder all discrete components (C1–C4, D2, R1) to the front side of the PCB.
  2. Observe correct polarity for the tantalum capacitor, electrolytic capacitors, and diode.
  3. Solder the pin headers (2-pin, 3-pin, and 11-pin) to the PCB.
  4. Finally, solder the ESP32 D1 mini in place, ensuring it is properly aligned and seated before soldering all pins.

Refer to the photos for correct component placement and orientation.

After This Step

After completing this step, all components on the front side of the head module PCB are installed.

The PCB is now ready for the next assembly step, where components on the back side will be added.

PCB 1 (Head Module) – Third Assembly Step

pcb1_06.jpg
pcb1_07.jpg
pcb1_08.jpg
pcb1_09.jpg

This step completes the assembly of PCB 1 (Head Module).

⚠️ Important:

Only proceed with this step if Steps 3 and 4 are fully completed. The components soldered here cover underlying solder pads and therefore must be installed last.

Components in This Step

  1. MPU6050 breakout board
  2. MAX98357A audio amplifier breakout board
  3. 4-pin Arduino stackable header (for the OLED display)

Assembly

  1. Place the MPU6050 breakout board on the back side of the PCB.
  2. Place the MAX98357A breakout board on the back side of the PCB.
  3. Insert the 4-pin stackable header for the OLED display on the back side of the PCB.
  4. Carefully flip the PCB over and solder all pins from the front side of the board.

Ensure that all modules are:

  1. Correctly aligned
  2. Sitting flat and parallel to the PCB
  3. Properly oriented as shown in the photos

After This Step

After completing this step:

  1. All components of PCB 1 (Head Module) are installed
  2. The head electronics module is fully assembled and ready for integration

The next steps will cover the assembly of the second PCB and the preparation of motors and cables.

PCB 2 (Body Module) – Front Side Assembly

pcb2_01.jpg
pcb2_02.jpg
pcb2_03.jpg
pcb2_04.jpg
pcb2_05.jpg

The assembly of PCB 2 (Body Module) is simpler than PCB 1.

To ensure that all solder pads remain accessible, the PCB is assembled in two stages:

  1. Step 6: Populate all components on the front side
  2. Step 7: Populate all components on the back side

⚠️ Important:

Do not mix front- and back-side components. Completing all front-side soldering first ensures trouble-free assembly.

Components in This Step

Connectors:

  1. printed circuit board PCB2
  2. 1 × 10-pin IDC connector
  3. 2 × JST XH 01×05 connectors
  4. 1 × JST XH 01×02 connector
  5. 2 × 3-pin headers

ICs:

  1. CD4017 (U7)
  2. 74HC595 (U1)
  3. ULN2803A (U2)

Discrete components:

  1. Resistors R1 (1k), R5 (100k), R8 (100k)
  2. Tactile switch (SW1)
  3. LED (D1)

Modules:

  1. USB-C connector breakout board

Assembly

  1. Solder all connectors, ICs, resistors, the tactile switch, and the LED to the front side of the PCB.
  2. Observe correct orientation for the ICs and LED.
  3. Extend the LED (D1) using two wires so that it protrudes approximately 37 mm above the PCB (see photo). This allows the LED to be visible from the enclosure.
  4. Connect the USB-C breakout board using a 2-wire cable with a length of approximately 25 mm.
  5. Solder the cable to the PCB and the breakout board as shown in the reference images.

Refer to the photos for correct placement, orientation, and wiring details.

After This Step

After completing this step:

  1. All front-side components of PCB 2 are installed
  2. The PCB is ready for the back-side assembly in the next step

PCB 2 (Body Module) – Back Side Assembly

TPS63070_1.jpg
TPS63070_2.jpg
pcb2_06.jpg
pcb2_07.jpg
pcb2_08.jpg


This step completes the assembly of PCB 2 (Body Module).

⚠️ Important:

Only proceed with this step after Step 6 has been fully completed.

Components in This Step

  1. Electrolytic capacitor C1 (470µF)
  2. Film capacitors C2 and C3 (100nF each)
  3. TPS63070 buck-boost converter breakout board
  4. TP4056 battery charging controller breakout board

TPS63070 Output Voltage Configuration

The TPS63070 buck-boost converter breakout board supports multiple output voltages (3.3 V, 5 V, or 9 V) selected via solder jumpers on the board.

By default, the 3.3 V jumper is closed. In this project, the converter must be configured for 5 V output.

Configuration steps:

  1. Remove the 3.3 V solder bridge using a desoldering pump or desoldering braid.
  2. Create a new solder bridge on the 5 V jumper pads.

Ensure that only the 5 V jumper is closed before installing the board on the PCB.

Refer to the photo for the exact jumper locations.

Assembly

  1. Solder the capacitors (C1, C2, C3) to the back side of the PCB.
  2. Observe correct polarity for the electrolytic capacitor.
  3. Place the TPS63070 buck-boost converter and the TP4056 charging controller on the back side of the PCB.
  4. Flip the PCB and solder all pins from the front side.

Refer to the photos for correct placement and orientation of all components.

After This Step

After completing this step:

  1. PCB 2 (Body Module) is fully assembled
  2. Both PCBs are now ready for wiring and integration

The next step covers the preparation of motor cables, ribbon cable, and battery wiring.

Cable Preparation

ribbon_cable1.jpg
ribbon_cable2.jpg
servo_cable1.jpeg
servo_cable2.jpeg
speaker1.jpg
speaker2.jpg

In this step, all required cables are prepared for final assembly.

10-Pin Ribbon Cable

The 10-pin ribbon cable connects the head module PCB to the body module PCB.

  1. Cut the ribbon cable to a length of approximately 11 cm.
  2. Attach a dual-row IDC crimp connector to each end of the cable.
  3. Refer to the image for the **correct orientation** of the connector

Crimping procedure:

  1. Carefully place the ribbon cable into the connector, making sure each wire is precisely aligned with the contact blades.
  2. Insert the connector with the cable into a small vise.
  3. Slowly close the vise to press the connector onto the cable until fully seated.

Refer to the photo for correct alignment and connector orientation.

Servo Motor Cables

The 3-pin servo cables are shortened to reduce excess wiring.

  1. Cut the cables to a final length of approximately 7 cm.
  2. Remove the connector, shorten the cable, and reattach the connector to the shortened cable.
  3. Insulate and mechanically reinforce each of the three joints using heat-shrink tubing.

Stepper Motor Cables

The cables of the stepper motors can be used as supplied by the manufacturer and do not need to be modified.

Speaker Cable

A 2 pin Arduino stackable header is soldered to the two wires of the speaker. Insulate and mechanically reinforce each of the two joints using heat-shrink tubing.

After This Step

After completing this step, all cables are prepared and ready for mechanical assembly and final wiring.

Battery Preparation

battery1.jpg
battery2.jpg
battery3.jpg

The robot is powered by a rechargeable lithium-ion battery pack consisting of two 18650 cells connected in parallel

Many commercially available 18650 battery packs include an integrated protection circuit that prevents overcharging and deep discharge. However, the TP4056 charging module used on PCB 2 already provides this protection.

⚠️ Important:

If both protection circuits are used at the same time, they may interfere with each other, leading to unreliable charging or power cutoff.

For this reason, the battery’s internal protection circuit must be removed, if present.

⚠️ Safety note:

Lithium-ion cells can be dangerous if short-circuited, mechanically damaged, or overheated. Always work carefully, avoid short circuits, and do not use damaged cells.

Assembly

  1. Inspect the battery pack and check whether a protection PCB is attached to the cell terminals.
  2. If a protection circuit is present, carefully remove it as shown in the photo and attach the cable to the cell terminals.
  3. After removing the protection circuit, extend the battery cable to a length of approximately 18 cm.

Refer to the photo for identification and correct removal of the protection board.

After This Step

After completing this step:

  1. The battery pack is compatible with the TP4056 charging controller
  2. The cable length is sufficient for installation into the robot base

The next step will cover the printing of the plastic parts.

3D Printing the Plastic Parts

3D_printed_parts1.jpg
3D_printed_parts2.jpg
3D_printed_parts3.jpg
3D_printed_parts4.jpg

With the electronics prepared, the next step is to print all mechanical parts of the robot.

All mechanical components were designed using Autodesk Fusion. The complete Fusion design file is available in the GitHub repository and can be modified or adapted if desired.

Available Files

  1. STL files for all parts, suitable for any standard 3D printer
  2. 3MF files for Bambu Lab printers, including:
  3. Optimized print settings
  4. Preconfigured support structures
  5. Automatic pause commands for nut insertion
  6. use marvin_robot.3mf for BambuLab printers.

Printing Notes

  1. Some parts are geometrically complex and include overhangs that require print supports.
  2. These supports are already included in the provided 3MF files.
  3. Many parts are designed to accept embedded M2 and/or M3 nuts for easy and secure assembly.
  4. During printing, the process must be paused at the specified layer, the nuts inserted, and the print then resumed.
  5. The required pause commands are already configured in the 3MF files, so no manual intervention in the slicer is necessary.
  6. All parts can be printed using PLA filament. The only exception are the two large drive wheels of the base, which benefit from being printed in TPU to improve grip. If TPU is not available, the wheels can also be printed in PLA.

Reference Material

The GitHub repository includes:

  1. A complete overview of all printable parts (print_files_overview.pdf).
  2. Numerous reference photos showing correct orientation, nut placement, and finished prints
  3. The file print_instructions.pdf provides detailed images on nut placements.

These resources should be used as a guide during printing.

After This Step

After completing this step, all 3D-printed parts are ready for the mechanical assembly of the robot.

Flashing the Firmware

VSCode.jpg

Before assembling the robot, the firmware must be uploaded to the microcontroller.

⚠️ Important:

In one of the following steps, the motors must be moved to their zero (home) position. This is only possible if the software has already been installed.

Software Environment

The software development environment is based on:

  1. Visual Studio Code
  2. PlatformIO extension

After cloning or downloading the GitHub repository, open the /software subfolder in Visual Studio Code.

This folder contains the platformio.ini configuration file, which:

  1. Defines the target hardware
  2. Automatically installs all required libraries
  3. Applies the correct build and upload settings

Compiling and Uploading the Firmware

  1. Open the project in Visual Studio Code.
  2. Click the checkmark icon (✔) in the bottom toolbar to compile the project.
  3. Connect the computer to the ESP32 D1 mini using a USB cable.
  4. Click the right arrow icon (→) in the bottom toolbar to upload the firmware to the controller.

Uploading the LittleFS Filesystem

The robot uses a LittleFS filesystem for web interface files and other resources.

  1. Open the PlatformIO panel using the PlatformIO icon in the left sidebar.
  2. Navigate to:
  3. Project Tasks → wemos_d1_mini → Platform
  4. Click Build Filesystem Image.
  5. After the image is built, click Upload Filesystem Image to flash it to the controller.

Installing and Connecting the Displays

display_assembly1.jpg
display_assemply2.jpg
display_assembly3.jpg
display_assembly4.jpg
display_assembly5.jpg
display_assembly6.jpg
display_assembly7.jpg


In this step, the displays are mechanically and electrically connected to the head electronics module.

Installing the Dual Eye Display

  1. Take the supplied 11-pin cable of the dual eye display.
  2. Feed the 11-pin connector through the opening in PCB 1, from the front side to the back side.
  3. Carefully plug the connector into the dual eye display module.
  4. Place the 3D-printed spacers onto the brass-colored mounting posts of the display.
  5. Mount the display to PCB 1 using two M2×10 screws.

⚠️ Important:

Make sure to insert the 3D-printed washers between the screw heads and PCB 1.

Refer to the photos for correct placement and orientation.

Connecting the Dual Eye Display Cable

  1. Insert the connectors on the other end of the 11-pin cable into the 11-pin header on PCB 1.
  2. Ensure the correct pin order:
  3. The order of the 11 pin display connector corresponds directly to the pin order of the header.
  4. The pins are labeled with the wire colors to avoid mix-ups.

Installing the OLED Display

  1. Attach the 3D-printed OLED display holder to PCB 1 using two M2×10 screws.
  2. Plug the OLED display into the Arduino-style pin header on PCB 1.
  3. Secure the OLED display to the holder using two M2×10 screws.

Installing the Microphone

As a final step, install the microphone module by plugging it into the designated Arduino stackable header on PCB 1.

⚠️ Important:

Ensure the correct orientation of the microphone module. The proper alignment can be clearly seen in the reference photos.

Display Function Test

To verify correct installation:

  1. Power the module via the USB port of the ESP32 D1 mini (connect to a computer or USB power supply).
  2. The controller will boot and display a startup animation on the eye and mouth displays.

If the animation is visible, the displays are correctly connected and operational.

Installing the Head Electronics and Head Rotation Servo

head_assembly1.jpg
head_assembly2.jpg
head_assembly3.jpg

In this step, the head electronics module is installed into the 3D-printed head enclosure, and the servo motor for head rotation is mounted.

Installing the Head Electronics

  1. Place PCB 1 into the head enclosure.
  2. Secure the PCB using four M2×10 screws.

⚠️ Note:

Two of these screws also hold the speaker mount in place.

  1. After the PCB is secured, place the speaker into its holder.
  2. Close the speaker holder using the outer cover part.
  3. connect the speaker cable with the designated header pins. The red wire corresponds with "+".

Refer to the photos for correct positioning and assembly order.

Installing the Head Rotation Servo

  1. Mount the servo motor for head rotation into its dedicated 3D-printed bracket using two M2×10 screws.
  2. Insert the assembled servo bracket from below into the head enclosure.
  3. Secure the bracket with two M2×10 screws.

Connecting the Head Servo

Connect the servo motor cable to the designated header pins on PCB 1.

⚠️ Important:

Pay attention to the orientation: the pin labeled GND must be connected to the brown wire of the servo cable.

After This Step

After completing this step:

  1. The head electronics are fully installed
  2. The speaker is mounted and secured
  3. The head rotation servo is fixed in place and ready for calibration


Centering the Head Servo and Connecting the Head to the Body

head_mount1.jpg
head_mount2.jpg

In this step, the head rotation servo is moved to its center position and mechanically connected to the body.

Powering the Electronics

  1. Connect the head electronics (PCB 1) to the body electronics (PCB 2) using the 10-pin ribbon cable.
  2. Connect the battery to PCB 2.
  3. Power the system via the USB-C charging connector.
  4. Press the on/off button on PCB 2.
  5. The status LED will light up and the microcontroller will boot.

Verifying Sensor Operation

Before centering the servo, the correct operation of the tilt sensor can be verified:

  1. Hold or place the head so that the eyes are facing upward (sleep position).
  2. The robot will close its eyes and play a yawning sound.

This confirms that the MPU6050 is working correctly.

Moving the Head Servo to Center Position

  1. Place the head upside down on the table, with the eyes facing downward.
  2. In this position, the software automatically moves the head servo to its neutral (center) position.
  3. The neutral position is held for only a few seconds.

⚠️ Important:

Switch the robot off immediately once the servo reaches the neutral position.

Mounting the Servo Axis Adapter

  1. Install the servo shaft adapter onto the head servo.
  2. Secure it using the short M2.5 screw supplied with the servo.

After This Step

After completing this step:

  1. The head servo is centered
  2. The mechanical connection between head and body is prepared

The next step will cover the final mechanical assembly of the head and body.

Assembling the Body, Legs, and Head

body_assembly1.jpg
body_assembly2.jpg
body_assembly3.jpg

In this step, the upper body housing is assembled with the legs and head.

Installing the Legs

  1. Insert the legs from below into the designated openings in the body housing.
  2. Secure each leg from above using an M2×10 screw.

Refer to the photos for correct orientation and positioning.

Mounting the Head

  1. Position the head assembly onto the body.
  2. Align the servo shaft adapter with the corresponding mount in the body.
  3. Secure the head to the body using two M2×10 screws.

After This Step

After completing this step:

  1. The legs and head are mechanically installed
  2. The robot’s platform is next to be assembled.

Assembling and Installing the Support Wheels

support_wheel01.jpg
support_wheel02.jpg
support_wheel03.jpg
support_wheel04.jpg
support_wheel05.jpg
support_wheel06.jpg
support_wheel07.jpg
support_wheel09.jpg
support_wheel08.jpg
support_wheel10.jpg
battery_compartment1.jpg
battery_compartment2.jpg

In the next steps, the base with the battery compartment and wheels is assembled.

Before routing the stepper motor and battery cables to the body electronics (PCB 2), the mechanical base assembly must be completed.

This step focuses on the two support wheels, which stabilize the robot. Each wheel is mounted using two ball bearings, allowing it to rotate freely and change its orientation with minimal resistance.

Assembling the Support Wheels

The following steps are performed for each support wheel.

  1. Glue the ball bearing into the wheel
  2. Insert one ball bearing into the wheel and glue it in place.
  3. ⚠️ Make sure the adhesive only bonds the outer ring of the bearing to the plastic.
  4. Do not allow glue to enter the bearing itself.
  5. Insert the spacer sleeve
  6. Place the spacer sleeve into the wheel carrier structure.
  7. The sleeve must sit in the designated recess.
  8. Place the wheel onto the spacer
  9. Position the wheel on top of the spacer sleeve.
  10. Ensure that there is visible space in the center for the axle to pass through
  11. (see photo for reference).
  12. Insert the axle
  13. Insert the axle from above into the carrier.
  14. The axle passes through:
  15. the ball bearing
  16. the spacer sleeve
  17. and ends inside the carrier structure
  18. Install the axle cap
  19. Insert the axle cap from above.
  20. The cap has a rectangular outer shape and can hold an M3 nut in its center.
  21. Secure the assembly
  22. Insert an M3 nut into the axle cap.
  23. Fasten the entire assembly using an M3×22 screw through the center of the axle.

Installing the Support Wheels into the Battery Housing

  1. Glue one additional ball bearing into each designated recess of the battery housing.
  2. Again, ensure that glue only contacts the outer ring of the bearing.
  3. Insert the assembled support wheels, together with their carriers, into the bearings in the battery housing.

Refer to the photos for correct orientation and seating of the wheel assemblies.

Inserting the Battery Pack

Insert the battery pack into the compartment. The cable reaches through the hole to the top of the battery case.

After This Step

After completing this step:

  1. Both support wheels are fully assembled
  2. The wheels are mounted into the battery housing
  3. The battery is installed
  4. The base is ready for installation of the drive wheels and stepper motors

Installing the Stepper Motors and Mounting the Platform

platform1.jpg
platform2.jpg
platform3.jpg
base_wiring1.jpg

In this step, the drive stepper motors are installed into the base platform and the robot body is mounted onto the platform.

Installing the Stepper Motors

  1. Place the two stepper motors into their designated positions in the platform.
  2. Secure each motor using two M3×10 screws.
  3. Route the motor cables through the provided cable channels to the underside of the platform.

Refer to the photos for correct motor orientation and cable routing.

Mounting the Robot onto the Platform

  1. Position the robot body on top of the platform.
  2. Secure the body using one M2×10 screw per foot.

Routing the Cables

  1. Guide the stepper motor cables and the battery cable upward through the cable channels inside the legs.
  2. Ensure that the cables reach the body electronics area without tension.

After This Step

After completing this step:

  1. The stepper motors are mounted
  2. The robot is fixed to the platform
  3. All power and motor cables are routed into the body

The next step will cover the final wiring and installation of the body electronics (PCB 2).

Installing and Wiring the Body Electronics (PCB 2)

body_wiring1.jpg
body_wiring4.jpg
body_wiring2.jpg
body_wiring5.jpg
body_wiring6.jpg
body_wiring7.jpg
body_wiring8.jpg
body_wiring9.jpg

In this step, the body electronics module (PCB 2) is installed and all remaining cables are connected.

Connecting Power and Drive Motors

  1. Connect the two stepper motor cables to their corresponding connectors on PCB 2.
  2. Connect the battery cable to PCB 2.

Installing PCB 2

  1. Place PCB 2 into the body enclosure.
  2. Secure the PCB using four M2×10 screws.

Cable Management

  1. Carefully pull any excess stepper motor cable downward through the cable channels in the legs.
  2. Fold the excess cable into a loop and gently push it from below into the leg cable channels.

This keeps the body enclosure tidy and prevents cables from interfering with moving parts.

Securing the USB-C connector

The USB-C breakout board is secured to the enclosure using two M2×6 screws.

Securing the Battery Housing

Attach the battery housing to the platform using four M2×10 screws.

Ensure that all cables are routed through the designated channels and are not pinched.

Installing the Arm Servos

  1. Place the two arm servos into their designated positions.
  2. Secure each servo using the mounting clamp and one M2×10 screw.

⚠️ Important wiring note:

The servo cables are connected crosswise:

  1. The left arm servo cable is plugged into the right connector on PCB 2
  2. The right arm servo cable is plugged into the left connector on PCB 2

When connecting the servo cables, ensure that the brown wire is connected to the GND pin.

Connecting the Ribbon Cable

As a final step, plug in the 10-pin ribbon cable connecting PCB 1 (head module) and PCB 2 (body module).

After This Step

After completing this step:

  1. All electronics are installed and connected
  2. Cable routing is clean and secure
  3. The robot is ready for final assembly and functional testing

Final Assembly and Finishing Touches

final_assembly1.jpg
final_assembly2.jpg
final_assembly3.jpg

This step completes the mechanical assembly of the robot and prepares it for operation.

Centering the Arm Servos and Mounting the Arms

  1. Switch the robot on.
  2. If necessary, charge the battery before this step.
  3. Orient the robot so that the eyes are facing downward.
  4. In this position, the software moves all servos to their neutral (center) position.
  5. Switch the robot off once the neutral position is reached.
  6. Mount the arms onto the arm servos.
  7. The upper arms should point straight downward when installed (see photo).

Installing the Drive Wheels

  1. Attach the two large drive wheels to the platform.
  2. The axle interface is designed as a press fit.
  3. If the fit is too loose, apply a small amount of adhesive to secure the wheels.

Closing the Body Housing

  1. Insert the on/off button pin into the corresponding tube in the rear body housing.
  2. Close the rear housing using four M2×10 screws.

⚠️ Important:

Ensure that the status LED is aligned with and protrudes through the designated opening.

Closing the Head Housing

  1. Attach the head cover.
  2. Secure it using one M2×10 screw.

The head cover is intentionally fixed with only one screw so it can be easily removed later, for example when uploading new firmware to the microcontroller.

Final Result

After completing this step, the robot is fully assembled and ready for use.

🎉 Assembly complete!

Power, WiFi Setup, and Robot Operation

captive_portal.jpg
upside_down1.jpg
upside_down2.jpg
control_page.jpeg

This step explains how to charge the robot, connect it to WiFi, and operate it using the web-based control interface.

Charging the Battery

The robot is powered by a rechargeable battery and charged via the rear USB-C connector.

  1. Connect a standard USB-C charger to the USB-C socket on the back of the robot.
  2. Through the small opening in the upper body, the status LEDs of the TP4056 charging controller are visible:
  3. Red LED: battery is charging
  4. Blue LED: battery is fully charged

The robot can remain switched off while charging.

Powering On and WiFi Configuration

When the robot is switched on, it checks whether a known WiFi network (with previously stored credentials) is available.

First Startup or Unknown Network

If no known WiFi network is found, the robot automatically creates its own WiFi access point:

  1. SSID: marvin
  2. Password: none (open network)


  1. Connect to the WiFi network “marvin” using a computer or mobile device.
  2. After connecting, a captive portal opens automatically.
  3. The configuration webpage displays a list of available WiFi networks.
  4. Select a network and enter the corresponding password.
  5. The credentials are stored, and the robot restarts automatically.

After reboot, the robot connects to the selected WiFi network.

Accessing the Control Web Interface

Once the robot is connected to the local network, it can be controlled from any device in the same network.

  1. Open a web browser on a computer or smartphone.
  2. Enter the following address:

marvin.local

The address is announced via mDNS, so no IP address is required.

The robot’s control webpage will open.

IP Address Display Mode (Fallback)

If the mDNS function is not available and accessing "marvin.local" does not work, the robot provides an alternative way to determine its IP address.

Hold the robot upside down, with the head facing downward.

In this position, the robot displays its current IP address on the mouth OLED display for approximately 15 seconds.

After noting the IP address, it can be entered directly into the web browser to access the robot’s control interface.

Operating the Robot

The web-based control interface allows full interaction with the robot:

  1. Change various settings
  2. Trigger predefined actions
  3. Start arm movements
  4. Play sound effects
  5. Move the robot using the drive wheels

For driving, the webpage provides a digital joystick, allowing the robot to be controlled like an RC car.

A photo of the control webpage is shown for reference.

Final Notes

The web interface runs directly on the robot and requires no additional software.

Any modern web browser on a phone, tablet, or computer can be used to control the robot.

Final Thoughts and Outlook

The goal of this project was to design a small, friendly-looking robot that is visually appealing while offering a wide range of technical features.

The robot is intended for:

  1. Hobbyists and makers
  2. Learners interested in electronics, microcontrollers, and embedded systems
  3. Educational environments, such as schools, workshops, and teaching projects

All development files—including schematics, PCB designs, mechanical CAD data, and software—are open source and publicly available on GitHub. The project may be extended, modified, and adapted, provided that the license terms are respected.

A key design principle was the use of widely available and easy-to-source components. In particular, many complex functions are realized using standard breakout boards, allowing advanced features without requiring specialized hardware design.

To manage the resulting wiring complexity, the electronics were consolidated onto two custom-designed PCBs, which integrate all required connections between the individual modules. This approach significantly improves reliability, clarity, and ease of assembly.

On the software side, the project uses the FreeRTOS real-time operating system, enabling sensors, actuators, audio, networking, and animations to operate independently and concurrently. This makes the software structure scalable and well suited for further extensions.

Possible Extensions

The modular design allows for many future enhancements, such as:

  1. Additional sensors or input devices (although almost all GPIOs are used, already)
  2. More advanced animations and behaviors
  3. Extended audio interaction or voice feedback
  4. Integration with external systems or services via WiFi

Final Remark

This project is intended as a learning platform and experimentation base, encouraging users to explore mechanical design, electronics, and embedded software development in a single, cohesive system.


Have fun experimenting, modifying, and improving the robot — and happy building! 🤖✨