Build the hardware
This page is for people who want to build a LilBub themselves: gather the parts, print the enclosure, assemble it, and flash the firmware.
Read the evidence boundary first. The firmware targets one off-the-shelf board and is exercised on real hardware. The enclosure is a prototype series. No enclosure revision has been proven end to end as a finished, closed, portable device. Details are under Enclosure status.
| Part | What to get | Notes |
|---|---|---|
| Board | Waveshare ESP32-S3-Touch-AMOLED-1.75, bare, without the vendor case | ESP32-S3, 16 MB flash, 8 MB PSRAM, 1.75 inch 466 x 466 round AMOLED, capacitive touch |
| Battery | 3.7 V single-cell lithium-polymer, type 803040, about 1000 mAh, 2-pin MX1.25 connector | Nominal 30 x 40 x 8 mm. The enclosure reserves 31 x 41 x 8.8 mm |
| Speaker | The small speaker supplied for this board, with its MX1.25-style lead | Waveshare’s drawing gives about 30 x 20 x 6.8 mm. See the note below |
| USB-C cable | Any data-capable cable | For flashing and charging |
| Fasteners | Candidate set for the current CAD: three M2 x 4 and two M2 x 6 | Unverified. See Enclosure status |
| Filament | PLA, 1.75 mm | The only material used so far |
The board’s own pages are the reference for the electronics. Use the manufacturer’s documentation and downloads:
LilBub does not include or redistribute the manufacturer’s CAD or drawings. The enclosure design was built against the manufacturer’s published dimensions, which you can download from the link above. If you want to rebuild or check the enclosure model against the real module, download those files yourself.
On the board:
- Display driver CO5300 over QSPI, touch controller CST9217 over I2C.
- Power management AXP2101. It handles battery charging.
- RTC PCF85063.
- A 6-axis IMU, QMI8658, on the board. The firmware source in this project does not reference it.
- Two buttons, PWR and BOOT, and USB-C on the edge.
The speaker size is not settled. The A12 design pass uses 30 x 20 x 6.8 mm from the manufacturer’s drawing, while the A11 model uses a provisional 32 x 22 x 8 mm box. Measure your speaker before you print. The vendor’s product listing mentions an included 8 ohm, 2 W speaker. That is a candidate identification, not a confirmed part number.
Check battery polarity against the markings on the board before you connect any lithium cell. Connectors with the same shape can be wired with opposite polarity. A reversed cell can damage the board and is a fire risk.
Enclosure status
Section titled “Enclosure status”The enclosure lives in the model/ folder of the LilBub workspace. It is
parametric CAD written with CadQuery, with Blender scripts for renders. It is
not part of any of the product Git repositories.
TODO for the maintainers: say where the enclosure files will be published. Until then, this page cannot link to the STL and STEP files.
The design is a round head, 68 mm across, styled after the LilBub calico cat, with two ears. The display is rendered on the screen, so no eyes or mouth are printed. Only three parts are printed: a front shell, a rear cover, and in the current revision a module retainer.
| Revision | State |
|---|---|
| A8 | Printed in part. A three-tab rim test was printed and fitted |
| A9 | Printed and assembled. Form accepted. The rear cover was loose even without electronics, supports were hard to remove, and connector plugs and leads stopped the shell closing |
| A10 | CAD only. Not printed |
| A11 | Current CAD candidate, 36 mm deep. Not printed as a finished part |
| A12 | Design pass and cable-fit simulation. Not built |
What this means for you:
- The rear cover closes with three curved friction tabs and no latch. Fit depends on your printer. The A9 print was too loose, and the A10 and A11 CAD use a tighter 0.175 mm per-side clearance that no one has printed yet. Print the closure test coupons first and expect to adjust.
- The screen module is held on the inside of the front shell by a removable retainer. The screw sizes and thread engagement for it are candidates, not verified.
- The battery is held by a band that runs through two eyes in the shell. The band material and how to fasten it are not specified, and the design says it must not compress the cell.
- Cable room is the known weak point. A11 enlarges it, but flexible wires have not been tested in the closed shell. The A12 design moves the electronics onto an internal plate so that no wire crosses the seam. It has not been built.
- The CAD checks show clearances between solid parts. They do not show closing force, retention, wire behavior or durability.
Do not treat any revision as safe for carrying or charging a finished device until you have tested it yourself.
Print settings
Section titled “Print settings”These are the settings used for the printed shells and carried into the current slice profile. They are a starting point, not a validated profile.
| Setting | Value |
|---|---|
| Material | PLA, 1.75 mm |
| Nozzle | 0.4 mm |
| Nozzle and bed | 220 C and 65 C |
| Layer height | 0.16 mm |
| Perimeters | 3 |
| Supports | Snug, excluding bridges |
| Brim | 3 mm |
Orientation notes recorded for the earlier shells: print the front shell with the seam face down and the glass opening up, and the rear cover with its cavity down. The ears and the USB opening need support. Those notes were written for the A8 geometry and have not been re-verified for A11.
Rebuilding the model
Section titled “Rebuilding the model”You need Python and CadQuery 2.8.0 (requirements.txt in the model folder).
Blender 5.1 is only needed for the renders. Run the revision’s build script
from the model folder, for example scripts/build_a11.py. Its output includes
STEP and STL files for each printed part and a validation report. All
dimensions are in millimetres. Do not rescale the STL files in your slicer.
Assembly order for the current candidate
Section titled “Assembly order for the current candidate”These steps follow the A11 notes. Check each against your printed parts as you go.
- Attach the retainer to the three mounting bosses on the back of the board module. Insert the module and retainer together into the front shell from behind, and secure the retainer to the two bosses in the shell with the two longer M2 screws. The screen is now held by the front shell only.
- With the rear cover off, place the speaker in its support in the rear cover.
- Place the battery in the rear cover. Run a nonconductive band through the eyes in front of the cell. Do not pull it tight enough to squeeze the battery.
- Connect the battery and speaker leads to the board and lay the wires in the space above and beside the board, clear of the three tab pockets and the seam.
- Bring the rear cover straight toward the front shell, line up the three tabs with their pockets, and press straight in until the shell faces meet.
- To open the shell, pull straight apart at the notch at the bottom seam. Do not lever against the glass or the ears.
Nothing should ever press on the display glass. The battery and rear cover are not meant to clamp it.
Build and flash the firmware
Section titled “Build and flash the firmware”The firmware is a PlatformIO project in the lil_buddy repository. The
hardware environment is waveshare_hw, for the board above.
- Install PlatformIO Core. PlatformIO downloads the ESP32 platform and the libraries the project pins. Some come from GitHub, so you need network access and Git.
- Choose which backend you will use. The firmware talks to no backend until
one is chosen. You do not need a special build for your own server: choose
it from the companion or over USB after flashing.
LILBUB_HOSTED_URL(defaulthttps://bub.0xbubbuff.de) is only the address of the explicit “Hosted” choice. See Self-host the backend. - Build with
pio run -e waveshare_hw. - Connect the board over USB-C and flash with
pio run -e waveshare_hw -t upload. If no serial port appears, hold the BOOT button while you plug in the cable. That is the usual way to enter the ESP32-S3 download mode. It is not verified for this board in the LilBub documentation. - Open a serial monitor at 115200 baud with
pio device monitor -b 115200.
Run the commands from the firmware repository root. The board uses the native
USB interface of the ESP32-S3, so the serial port may enumerate as a USB
serial device with the vendor ID 303A.
Build output and the PlatformIO core can be large. Keep both on a disk with
space. If you need to move the PlatformIO core, set PLATFORMIO_CORE_DIR for
that shell.
First setup over serial
Section titled “First setup over serial”After the first boot, the serial console accepts configuration commands. Type
help for the list. Common ones:
wifi set MyNetwork|my-passwordwifi statusbackend statusUse a single | between the network name and the password. The credentials
are stored on the device and survive a reboot. To choose a backend, run
backend set https://api.example.com for your own server or backend hosted
for the hosted LilBub cloud.
A flash overwrites the running firmware. Read Serial and DeviceControl before you use any other console command on a device you care about.
Signing keys and updates
Section titled “Signing keys and updates”Over-the-air updates need an update-signing public key compiled into the firmware. A build you flash over USB works without published releases. If you plan to publish your own updates, read the OTA notes in Self-host the backend.
Third-party sensor firmware
Section titled “Third-party sensor firmware”TODO for the maintainers: confirm which sensor files the public release leaves out, and what a builder has to add.
Here is what is established from the sources:
- The LilBub repositories do not track any Bosch Sensortec files.
- The firmware source does not use a Bosch sensor. It uses the AXP2101 power chip and the CST9217 touch controller, through the XPowersLib and SensorLib libraries. The on-board IMU, QMI8658, is not a Bosch part.
- The firmware pins SensorLib at a fixed commit. That library bundles Bosch
Sensortec sources and BHI260 firmware image files under
src/bosch/. PlatformIO downloads them with the library. They come from the library author’s repository, not from LilBub, and are licensed separately from LilBub. Review SensorLib’sTHIRD_PARTY_NOTICES.mdbefore you redistribute a build.
For a builder, the practical consequence today is that a normal
pio run -e waveshare_hw fetches SensorLib itself, so you do not need to
supply any sensor firmware by hand. If a future release removes or replaces
that dependency, this page will say what to do.
Licences
Section titled “Licences”- Firmware, backend, companion app and integrations code: AGPL-3.0.
- Enclosure design files: CERN-OHL-S-2.0. If you share a modified enclosure, you must share your changes under the same licence.
- The Waveshare board, its documentation and its CAD belong to the manufacturer and remain under the manufacturer’s terms.
- Third-party libraries and fonts keep their own licences. See the
THIRD_PARTY_NOTICES.mdfile in each repository.
What is verified
Section titled “What is verified”- The firmware environment, board name and display facts come from
platformio.iniandDEVICE.mdin the firmware repository. - Enclosure dimensions, print settings and assembly order come from the model folder’s notes, which record which results are CAD checks and which came from physical prints.
- The assembly steps, screw sizes, band fastening and closure fit have not been verified on a complete build.
- The flashing steps here have not been run from a clean machine for this page.