Face With Animatronic Eyes, Motion Detection and Voice
Face With Animatronic Eyes, Motion Detection and Voice




Components and supplies
Project Description
Are you ready to create something both eerie and captivating? This project combines 3D printing, servo motors, a PIR sensor, and a DFPlayer MP3 module to bring to life an animatronic Squid Game boss face. With Halloween right around the corner, this DIY project is the perfect spooky addition to your home or event. The face's animatronic eyes move in response to motion detection, and a haunting sound is played, making it both visually impressive and interactive.
Step 1: 3D Printed Parts

The animatronic eye parts and the mask itself were printed using a standard 3D printer with PLA filament. The parts were printed with medium quality, but for those wanting a more polished look, feel free to sand and paint the pieces for a smoother finish.
3D Printed Components:
- Mask (Face)
- Two eyeballs
- Two eyelids
- Servo holder (to hold all 5 servos in place)
- Universal joints (to enable smooth movement for the eyes)
- Two bars to support the mask’s internals
- A backplate to cover the electronics and allow for easy wall mounting
Feel free to use different colors for the eyes or even hand-paint them after printing. The universal joints play a critical role in the smooth motion of the eyes, allowing them to mimic realistic movements.
Step 2: Assembling the Animatronic Eyes

Now that we have the 3D printed parts, it’s time to assemble the animatronic eyes. For this, we’ll use five MG90S servo motors to control both the eyelids and the eyes' movement. Here’s what you’ll need:
Components:
- 5x MG90S Servo Motors
- Metal wire (we used a few paperclips to form the connecting rods)
- Pliers and wire cutters (for shaping and cutting the paperclips)
Assembly Process:
- Center the Servos: Make sure all servos are positioned at 90 degrees to start. This is critical to ensure the movements are calibrated properly.
- Mount the Servos: Place each servo into the 3D printed servo holder. Two servos will control the left-right movement of the eyes two for the up-down movement and one for the eyelid.
- Attach the Eyes: Connect the servos to the eyes using the paperclip wires shaped into linkage rods. This will transmit the servo’s rotation to the eye movement. Universal joints are added to ensure the eye movements are smooth.
- Attach the Eyelids: The final servo will control the eyelids giving your mask the ability to blink or close its eyes. The same wire and paperclip method is used to attach the eyelids to the servo.
Animatronic eyes move thanks to the servos manipulating them in two axes (up-down and left-right). Each eye's movement is controlled by two servos, while the eyelids are controlled by a single servo for opening and closing.
Step 3: Printed Circuit Board

A printed circuit board (PCB) was designed to integrate all components, including the DFPlayer, PIR sensor, servo motors, speaker, and Arduino Nano. The goal is to create a more stable circuit and prototype.
- Arduino Nano (main controller)
- DFPlayer MP3 module (for sound)
- PIR sensor (motion detection)
- 5x servo motor inputs
- Speaker for audio output
PCBWay was chosen for the PCB fabrication. You can find the Gerber file and circuit diagram for PCB fabrication at this link: https://www.pcbway.com/project/shareproject/The_Face_maker101_c4124445.html $ Also, if you have no soldering experience, you can use PCBWay's assembled PCB service.
I also participated in PCBWay's 7th design contest, if you want to support the project, you can vote for the project from the same link. Thank you.
The component list includes capacitors for power requirements, resistors for servo motor digital inputs, terminal blocks for the sensor and speaker, and female and male headers for the DFPlayer and Arduino Nano.
- Resistors and capacitors (for power regulation)
- Terminal blocks (for the sensor and speaker connections)
- Male/female headers (for the DFPlayer - Nano - and servos)
I soldered all the components in place using a soldering iron and solder wire. This setup ensures that the entire project runs smoothly and that the wiring doesn’t get messy.
Step 4: Main Code for the Face

Now that everything is assembled, it’s time to upload the main code into the Arduino Nano. This code integrates the PIR sensor, servo motors, and the DFPlayer MP3 module. The idea is simple: when the PIR sensor detects motion, the servos will move to open the eyelids and make the eyes move while the DFPlayer plays a sound.
Key Components of the Code:
- The PIR sensor triggers when it detects motion.
- The DFPlayer plays a sound file stored on an SD card.
- The servos control the eye and eyelid movement.
The DFPlayer Mini is a simple, low-cost MP3 player that can play audio files stored on a microSD card. In this project, it will play a sound file when motion is detected by the PIR sensor.
- Connect the RX pin of the DFPlayer to Digital 11 and the TX pin to Digital 10 on the Arduino Nano.
- Attach a speaker to the SPK+ and SPK- pins of the DFPlayer for sound output.
PIR Motion Sensor Connection
- The PIR sensor will detect motion and trigger the servo movements and audio playback.
- Connect the PIR sensor’s output pin to Digital 7 of the Arduino Nano.
Use a 9V external power supply for the circuit to ensure stable performance. Once the wiring and coding are complete, it’s time to test your project.
- Upload the code to your Arduino Nano.
- Ensure the PIR sensor is placed in a location where it can easily detect motion.
- When the PIR sensor detects movement the servos controlling the eyelids should open and the DFPlayer should play the pre-loaded sound file.
- The servos will then make the eyes move in a coordinated sequence.
Code Overview: The main code utilizes the DFPlayer library to control audio playback while coordinating with the PIR sensor's output. When motion is detected, the code triggers the servos to move the eyes and simultaneously starts the audio file. This synchronization enhances the effect, making the animatronic eyes appear more lifelike and engaging. The code efficiently handles various scenarios, ensuring seamless transitions between eye movements and sound playback.
Note: The attached file “1.mp3” contains the sound “I see you” used in the project. Simply upload the audio file to the SD card (SD card format must be FAT32)
Step 5: Final Assembly

Now it’s time to put everything together in the mask. Follow these steps:
- Insert the Bars: Attach the two support bars to the back of the mask.
- Mount the Servo Holder: Secure the servo holder (with the servos and eyes attached) to the bars using hot glue.
- Install the PIR Sensor: Drill a small 6mm hole in the front of the mask to place the PIR sensor. It’s a mini PIR sensor so it fits perfectly into the hole.
- Place the Speaker: Position the speaker inside the mask ensuring it’s hidden from view. Attach the PCB: Secure the PCB inside the mask and make all the necessary connections.
- Seal the Mask: Once everything is connected and in place use the back cover to enclose the electronics.
Finally, mount the mask on the wall using double-sided tape or other methods. Power the mask using a 9V power supply, and you’re all set!

This project combines creativity, technology, and a bit of spookiness, making it perfect for the Halloween season. With a few tweaks, you can customize this mask to your liking, adding different sounds or even more complex eye movements. Happy making!
An extra idea, add LED lighting: If you want to make your project even more engaging, you can add LED lights that turn on when motion is detected, enhancing the visual effect.
Code
#include
const int servo1 = 2;
const int servo2 = 3;
const int servo3 = 5;
const int servo4 = 6;
const int servo5 = 9;
Servo myservo1;
Servo myservo2;
Servo myservo3;
Servo myservo4;
Servo myservo5;
void setup() {
myservo1.attach(servo1);
myservo2.attach(servo2);
myservo3.attach(servo3);
myservo4.attach(servo4);
myservo5.attach(servo5);
myservo1.write(75); //right 60 - center 75 - left 90
myservo2.write(95); //down 70 - center 95 - up 110
myservo3.write(50); //close 50 - open 80
myservo4.write(80); //down 110 - center 80 - up 60
myservo5.write(90); //right 70 - center 90 - left 110
delay(2000);
}
void loop() {
// MOVE 1
myservo3.write(80); //close 50 - open 80
delay(2000);
myservo1.write(90); //right 60 - center 75 - left 90
myservo5.write(110); //right 70 - center 90 - left 110
delay(1000);
// MOVE 2
myservo1.write(60); //right 60 - center 75 - left 90
myservo5.write(70); //right 70 - center 90 - left 110
delay(1000);
// MOVE 3
myservo1.write(90); //right 60 - center 75 - left 90
myservo5.write(110); //right 70 - center 90 - left 110
delay(1000);
// MOVE 4
myservo1.write(60); //right 60 - center 75 - left 90
myservo5.write(70); //right 70 - center 90 - left 110
delay(1000);
// MOVE 5
myservo1.write(75); //right 60 - center 75 - left 90
myservo5.write(90); //right 70 - center 90 - left 110
delay(1000);
// MOVE 6
myservo2.write(70); //down 70 - center 95 - up 110
myservo4.write(110); //down 110 - center 80 - up 60
delay(1000);
// MOVE 7
myservo2.write(110); //down 70 - center 95 - up 110
myservo4.write(60); //down 110 - center 80 - up 60
delay(1000);
// MOVE 8
myservo2.write(95); //down 70 - center 95 - up 110
myservo4.write(80); //down 110 - center 80 - up 60
delay(1000);
// MOVE 9
myservo3.write(50); //close 50 - open 80
delay(2000);
}