Skip to the content
PCBKitNew board
2 layersDF mp3 player, the printed circuit board in 3D

Arduino sketch for an animatronic Halloween skeleton built on an Arduino Uno.

Copper layers
2
Thickness
1.6 mm
Parts
4
Nets
18
Pads
28
Tracks, vias
13, 0
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
2 Oct 2026
Updated
26 Oct 2026

Overview

DF mp3 player is an open-source printed circuit board by ninopereira, from the ninopereira/skeleton repository on GitHub. It is a 2-layer board with 4 parts on 18 nets, routed with 13 tracks and 0 vias.

Its parts include 2 resistors and 1 connector.

README

README.md

Haunted Skeleton

Arduino sketch for an animatronic Halloween skeleton built on an Arduino Uno.

  • Plays the songs on the SD card in a random order, different on every power-up. No song repeats until all of them have played; then a new order is drawn.
  • When a visitor walks up, the song pauses and one of the voice clips, picked at random but never the same twice in a row, plays with the jaw synced to it, and each arm goes up and back down, one slightly after the other. The song then resumes where it left off.
  • The jaw then rests for at least 5 s before it can be triggered again.

Hardware

PartConnection
VL53L0X time-of-flight sensorVIN on 3V3, not 5V; GND → GND, SDA → A4, SCL → A5
or HC-SR04 sonartrig pin 7, echo pin 6
DFPlayer MiniVCC on 3V3, not 5V; module TX → pin 0 (RX); pin 1 (TX) → 680 Ω → module RX, 1 kΩ from module RX to GND; module BUSY → A0
Jaw servopin 9
Arm servosleft: pin 10, right: pin 11
Eye LEDspin 8

All pins, angles, distances and timings live in config.hpp. Set DISTANCE_SENSOR there to the sensor you fitted: DistanceSensorType::TIME_OF_FLIGHT (VL53L0X) or DistanceSensorType::SONAR (HC-SR04). The detection range (DETECT_MIN_CM / DETECT_MAX_CM) applies to both.

The VL53L0X runs on 3.3 V and its SDA/SCL pins are not 5 V tolerant. The sketch turns off the Uno's internal pull-ups (which go to 5 V), so the sensor board's own pull-ups to 3.3 V must hold the lines high; if the board has none, fit 4.7 kΩ from SDA and from SCL to 3V3. The bus runs at 100 kHz because 3.3 V only just counts as high for the Uno. Peel off the protective film over the lens.

The 3V3 pin also feeds the DFPlayer and can only supply about 150 mA (Uno R3). If the sensor drops out while music plays loudly, power both from a separate 3.3 V regulator instead.

Wiring diagram

With the VL53L0X in place of the sonar:

Wiring diagram with the VL53L0X

Setup

  1. Install the Servo, DFRobotDFPlayerMini (1.0.6) and VL53L0X by Pololu (1.3.1) libraries in the Arduino IDE. The VL53L0X library is needed even when the sonar is selected.
  2. Format a FAT32 SD card and copy the songs to its root (they play shuffled, so their order does not matter, but copy them before the voice clips: the module numbers tracks by copy order). Then create a folder ADVERT and copy the voice clips from sd_card/ into it, renamed so each starts with a 4-digit number: 0001_WhoAreYou.mp3, 0002_ComeHere.mp3, ... (the module only reads the first four digits). An advert pauses the song and the song resumes where it left off. Set MP3_SONG_COUNT in config.hpp to the number of songs. After adding, removing or changing a voice clip, regenerate the jaw scripts with python3 tools/make_jaw_script.py (needs numpy and ffmpeg); clip N in sd_card/ must be advert N on the card.
  3. Power the servos well: three servos (two lifting arms) can draw more current than the board's 5 V regulator supplies.
  4. If the eyes blink 5 times at power-up, the MP3 player or its SD card did not answer: check the wiring and the card. tools/mp3_test tests the player on its own. If they blink 3 times, the VL53L0X did not answer: check its I2C wiring. tools/tof_test tests the sensor on its own.
  5. Calibrate MOUTH_CLOSED_DEG / MOUTH_OPEN_DEG and the arm angles and sweep times in config.hpp for your build.

Hardware serial

The DFPlayer is on the Uno's only hardware serial port (pins 0/1). A software serial port would block interrupts for about 1 ms per byte, which stretches the servo pulses and makes the arms jerk past their limits. As a result:

  • The Serial Monitor cannot be used by the sketch; anything printed would go to the DFPlayer. Faults are reported by the eye blinks. tools/tof_test still prints to the Serial Monitor; tools/mp3_test shows its results on the eye LEDs instead.
  • The USB port shares pins 0/1. If an upload fails, disconnect the module's TX from pin 0 while uploading.

Code layout

FilePurpose
skeleton.inoEntry point
haunted_skeleton.*Behaviour state machine
mp3_player.*DFPlayer Mini wrapper
presence_sensor.hppPicks the sensor selected in config.hpp
presence_filter.*Debounced presence detection shared by both sensors
tof_sensor.*VL53L0X time-of-flight sensor
sonar.*HC-SR04 ultrasonic sensor
mouth.*Scripted jaw animation
arm.*, arms.*Staggered up-and-down servo arm gesture
eyes.*Eye LEDs

Parts

4
QtyValueFootprintReferences
11KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR2
1680Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1
1Conn_01x08_PinConnector_PinHeader_2.00mm:PinHeader_1x08_P2.00mm_VerticalJ2
1~DFPlayer:DFPlayer_MiniDFPlayer_Mini1

Questions

What parts does the DF mp3 player use?

4 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the DF mp3 player KiCad files?

From the ninopereira/skeleton repository on GitHub, at the commit this page was made from: the board is pcb/DF_mp3_player/DF_mp3_player.kicad_pcb and its schematic pcb/DF_mp3_player/DF_mp3_player.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the DF mp3 player design in my own project?

Its repository states no licence, so its author keeps all rights: ask ninopereira before reusing the design.

Similar boards

  • 2 layers18.5 × 26 mm24g2usb rp2350zero, the printed circuit board in 3D

    24g2usb rp2350zero

    joypad-ai/joypad-os

    Universal controller firmware for building adapters, dongles, and custom controllers.

    4 parts1.7kApache-2.0
  • 2 layers116 × 33 mm966595-1 and 963356-1, the printed circuit board in 3D

    966595-1 and 963356-1

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    4 parts1.2k
  • 2 layers19 × 18 mmDaughter board, the printed circuit board in 3D

    Daughter board

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    4 parts915
  • 2 layers24.8 × 24.8 mmNrf24 breakout, the printed circuit board in 3D

    Nrf24 breakout

    tardate/LittleArduinoProjects

    a collection of "Little Electronic & Arduino Projects", most involving electronics or an Arduino in one way or another!

    4 parts803MIT
  • 2 layers26 × 20 mmCap chain, the printed circuit board in 3D

    Cap chain

    drandyhaas/KiCadRoutingTools

    A set of Python/Rust tools to aid routing in KiCad

    4 parts744MIT
  • 2 layers34.7 × 20 mmXG Station Power MSI, the printed circuit board in 3D

    XG Station Power MSI

    osy/XG_Mobile_Station

    Open source eGPU dock for ROG Ally and ROG Flow

    4 parts712CC-BY-4.0
  • 2 layers20.3 × 24.5 mmJack power input, the printed circuit board in 3D

    Jack power input

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    4 parts546MIT