Skip to the content
2 layers18 × 14.4 mmBauble pcb, the printed circuit board in 3D

Christmas tree bauble with an ESP32C3 running Doom

Size
18 × 14.4 mm
Copper layers
2
Thickness
1.6 mm
Parts
19
Nets
26
Pads
82
Tracks, vias
198, 18
Pours
1
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
4 Dec 2022
Updated
5 Dec 2022

Overview

Bauble pcb is an open-source printed circuit board by Spritetm, from the Spritetm/esp32c3-doom-bauble repository on GitHub. It is a 2-layer board of 18 × 14.4 mm with 19 parts on 26 nets, routed with 198 tracks and 18 vias.

It is built around the ESP32-C3-WROOM-02-H4, TP4057 and AO3401, with the MBR0520 among its other parts. Its parts include 5 capacitors, 4 resistors, 4 connectors, 3 ICs and 1 diode. It belongs with the ESP32 and RISC-V boards of this library.

Main components

4

README

README.md

Doom on an ESP32-C3 based Christmas tree bauble

This uses the GBA Doom from https://github.com/doomhack/GBADoom to put Doom on a tiny Christmas bauble. More information is on https://spritesmods.com/?art=doom-bauble .

Directories

  • case: contains OpenSCAD case designs.
  • esp32c3-doom: Contains the firmware. This needs ESP-IDF 5.0 or higher to compile.
  • pcb - KiCad PCB designs

Case

You should be able to print the case on a FDM ('hot plastic squirter'-type) machine, but it'll look better when printed on a SLA/LCD/DLP ('ultra-violet goo hardener'-type) printer. I masked it with masking tape afterwards and painted it with model paint (specifically Tamiya TS-81 and TS-06 rattle-can paint).

PCB

The PCB designs and schematics are in Kicad format. Look at the schematics for hints for components not on the BOM. Note that the 'headers' on the PCB are supposed to have wires directly soldered to it; space doesn't really allow for actual headers.

Firmware

To build this, you need esp-idf 5.0 or higher. (I used git commit 4c1ff6016a, for reference.) You also need to make sure you have 8MiB or more flash on your ESP32C3. You can use the standard esp-idf building & flashing procedure ('idf.py flash'). Note that you also need to flash the Doom WAD to the flash. The flash-doom-wad.sh shellscript gives an example on how to do that with the included doom1gba.wad file; using this will give you the shareware version of Doom (which includes all the levels of Episode 1).

It is possible to use a different Doom WAD as a basis for this, but you need to manually convert it first. Tools and information for that is in the esp32c3-doom/GbaWadUtil. Most importantly, you probably want to convert any music to IMF format and re-record demos before running GbaWadUtil to generate the final WAD to be flashed.

Note that this Doom version is not compatible with demos that are included in existing WAD files; while they will play, they will likely desync early on. As such, you may want to re-record the demo files. There's a rudimentary setup for this in esp32c3-doom/main/sdl which can be used to compile this version of Doom for SDL input and output. After that, you can edit d_main.c and recompile to enable demo recording of one map.

Note on input devices

The ESP32C3 will connect to any BT-LE device that supports HID and is set to pairing mode. BT Classic devices aren't supported nor detected. Do note that connecting to an input device is not fast. Wait about 10 seconds after putting a device into pairing mode before using it.

Joystick has been tested and seems to work OK (although the input is digital only, no analog movement is supported)

Mouse works, but again: inputs get flattened to digital-only. You may need a mouse with >=3 buttons to start the game (mouse wheel press / middle button = start)

Keyboard is implemented but entirely untested. The keymapping should be: z and x for shoot & open, a and s for left and right strafe, tab for select, enter for start, cursor keys for movement.

In general: weapon selection is hold open + use the strafe keys.

Parts

19
QtyValueFootprintReferences
41uCapacitor_SMD:C_0603_1608MetricC1, C2, C3, C4
3Conn_01x02Connector_PinHeader_1.27mm:PinHeader_1x02_P1.27mm_VerticalJ1, J3, J4
110KResistor_SMD:R_0603_1608MetricR1
110uCapacitor_SMD:C_0805_2012MetricC5
1220Resistor_SMD:R_0603_1608MetricR4
12K7Resistor_SMD:R_0603_1608MetricR3
1AO3401Package_TO_SOT_SMD:SOT-23Q1
1Conn_01x04Connector_PinHeader_1.27mm:PinHeader_1x04_P1.27mm_VerticalJ2
1ESP32-C3-WROOM-02Espressif:ESP32-C3-WROOM-02U3
1HT7833_SOT89Package_TO_SOT_SMD:SOT-89-3U1
1LCD_LH096Tjeroens_lib:LCD_LH086TDISP1
1MBR0520Diode_SMD:D_SOD-123D1
1RResistor_SMD:R_0603_1608MetricR2
1TP4057Package_TO_SOT_SMD:SOT-23-6U2

Similar boards

  • 2 layers53 × 93 mmEink digit clk, the printed circuit board in 3D

    Eink digit clk

    Spritetm/eink_digit_clock

    Clock which uses E-ink panels as separate digits

    58 parts9
  • 2 layers155.5 × 130 mmEinkpicframe, the printed circuit board in 3D

    Einkpicframe

    Spritetm/picframe_colepd

    A WiFi picture frame allowing for remote photo uploads, using an ESP32-C3 and a 5.6" color E-ink display

    60 parts97
  • 2 layers50 × 35 mmPerpetualClock, the printed circuit board in 3D

    PerpetualClock

    CXJ007/LP_Clock

    Low-power clock

    93 parts
  • 2 layers42.5 × 76 mmPbf mainpcb, the printed circuit board in 3D

    Pbf mainpcb

    kitspace-test-repos/kicad6-file-collection

    66 partsMIT
  • 2 layers29.8 × 49.8 mmGummySlime, the printed circuit board in 3D

    GummySlime

    gumorr/GummySlime

    Cheesecake compatible SlimeVR pcbs

    28 parts1
  • 4 layers51 × 33 mmSmolExG, the printed circuit board in 3D

    SmolExG

    matthewlai/SmolExG

    63 parts1
  • 2 layersShop guard, the printed circuit board in 3D

    Shop guard

    Aust1nke/Security_shop_guard

    I built this pcb using esp32, and lidar sensor to monitor and alert shop owner of intruders

    29 parts
  • 2 layers45 × 42.5 mmWhaap, the printed circuit board in 3D

    Whaap

    bardiasayyar/Custom-PCB-Wearable-Step-Fall-Tracker

    Designing a custom wristband PCB in KiCad integrating an ESP32-C3 microcontroller, LSM6DS3 IMU (I2C), and LiPo battery/charging circuitry for real-time step counting, fall detection, and battery monitoring.

    31 parts

Questions

How big is the Bauble pcb PCB?

It measures 18 × 14.4 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Bauble pcb use?

19 parts, built around the ESP32-C3-WROOM-02-H4, TP4057, AO3401 and MBR0520. 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 Bauble pcb KiCad files?

From the Spritetm/esp32c3-doom-bauble repository on GitHub, at the commit this page was made from: the board is pcb/bauble_pcb.kicad_pcb and its schematic pcb/bauble_pcb.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Bauble pcb design in my own project?

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