

Starbie
A PCB pet created from hackclub's "Starbie" guide
- Size
- 89.1 × 81.5 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 14
- Nets
- 26
- Pads
- 70
- Tracks, vias
- 38, 0
- Pours
- 1
- Routed
- Yes
- KiCad
- KiCad 10.0 (file 20260206)
- Created
- 5 Oct 2026
- Updated
- 11 Oct 2026
Overview
Starbie is an open-source printed circuit board by PurpleCactus2, from the PurpleCactus2/Pet-Starbie repository on GitHub. It is a 2-layer board of 89.1 × 81.5 mm with 14 parts on 26 nets, routed with 38 tracks and 0 vias.
It is built around the DHT11. Its parts include 2 switches, 1 IC and 1 connector. It belongs with the ESP32 and RISC-V boards of this library.
Main components
1README
README.mdStarbie
A motion controlled PCB pet!
Introduction
This is Starbie, a motion controlled, Tamagotchi style digital pet meant to keep you company on your desk. It uses a microcontroller, motion and enviroment sensor, along with 2 buttons to allow you to interact with it. It was made with the help of this wonderful guide by Logan Peterson which guided me through the entire process of making my first PCB.
Its main functions include:
- A stats screen for your pet
- Nap, Play and Pet actions
- A shake interaction
And you can also customise your own sprite!
However, I have also added a couple of my own features:
- A basic power LED indicating when starbie is on
- An external battery circuit making starbie portable
- A 3D printed enclosure to tie everything together
PCB and Schematic
This is the entire schematic using the connections and components that are described in the guide. The ESP32-C3 connects the buttons through 2 GPIO pins, the screen and the motion sensor through I2C, and also supplies the steady 3.3V that the circuit needs.
Here are the 2 things that I added:
This is the basic power LED which connects to the 3.3V output of the ESP32-C3 through a 220Ω resistor. The LED itself will just be a standard 5mm 2V red LED that indicates whenever the circuit is connected to power.
This is the external battery circuit that will power starbie through a battery. It will use a 500mAh 3.7V 503035 liPo that connects straight to the battery pads on the underside of the Xiao, meaning it will be charged and regulated with the battery charger already integrated into the microcontroller. A switch has also been included in line from the battery so that starbie can be turned off easily.
PCB:
Here, I have used a similar layout and shape as shown in the guide.
At first, I tried experimenting with the positioning of the buttons by having them side by side, but this turned out to make to routing more complicated by requiring more traces on the bottom layer. Because of this, I decided to align the buttons vertically, even if it is a little more inconvenient. I have also added a couple of M3 screw holes on the edges so that I can mount the PCB in the enclosure that I designed.
Here are the contacts for the battery pads of the Xiao:
These pads won't actually be making contact with the pads on the Xiao, since it will be raised on top of header pins. But, I have put through-holes on these pads to allow for header pins to be pushed through them. This should allow the battery to be soldered directly to these pins from the bottom, making managing space a lot easier.
Code
Most of the code is from the preset given by the guide, but there are some parts which I have modified:
These 2 pins were previously mismatched with SCL on 7 and SDA on 6 while my PCB and schematic has SCL on 6 and SDA on 7. This would have thrown an error where the Xiao would not be able to communicate with the screen or motion sensor. Luckily the ESP32-C3 is able to reroute these I2C connections easily.
const int I2C_SDA_PIN = 7;
const int I2C_SCL_PIN = 6;This was an optional function given in the guide that could be inserted above the drawHeart function. It will create sparkles behind the pet as it moves.
void drawSparkle(int x, int y) {
display.drawPixel(x, y - 2, SSD1306_WHITE);
display.drawPixel(x - 1, y - 1, SSD1306_WHITE);
display.drawPixel(x + 1, y - 1, SSD1306_WHITE);
display.drawPixel(x - 2, y, SSD1306_WHITE);
display.drawPixel(x, y, SSD1306_WHITE);
display.drawPixel(x + 2, y, SSD1306_WHITE);
display.drawPixel(x - 1, y + 1, SSD1306_WHITE);
display.drawPixel(x + 1, y + 1, SSD1306_WHITE);
display.drawPixel(x, y + 2, SSD1306_WHITE);
}This is what actually calls the drawSparkle function
if (!isNapping() && (now / 250) % 2 == 0) {
drawSparkle(petX - 4, petY + 18);
}This is a byte list created from a custom 32x32px sprite which I drew.
const uint8_t PROGMEM PET_SPRITE[] = {
0x00, 0x0f, 0xf0, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x01, 0x80, 0x01, 0x80, 0x02, 0x00, 0x00, 0x40,
0x04, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x08, 0x20, 0x00, 0x38, 0x04,
0x20, 0x00, 0x38, 0x04, 0x40, 0x00, 0x30, 0x02, 0x40, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x02,
0x80, 0x00, 0x00, 0x3c, 0x80, 0x00, 0x03, 0xe0, 0x80, 0x00, 0x1e, 0x00, 0x80, 0x00, 0x20, 0x00,
0x80, 0x00, 0x20, 0x00, 0x80, 0x00, 0x1e, 0x00, 0x80, 0x00, 0x03, 0xe0, 0x80, 0x00, 0x00, 0x3c,
0x40, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x04,
0x20, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x20,
0x02, 0x00, 0x00, 0x40, 0x01, 0x80, 0x01, 0x80, 0x00, 0x70, 0x0e, 0x00, 0x00, 0x0f, 0xf0, 0x00,
};The sprite should look like this:
Enclosure
I wanted to make the PCB a little more personalised and I also wanted to have a neat place to store the battery. Because of this, I decided to design a 3D printable enclosure meant to be assembled with screws and a little bit of glue.
This is the enclosure as a whole. It has several holes on the top for each component that sticks through, along with 4 M2.5x8 screw holes along the edge of the lid for assembly.
This is how the battery and the switch are arranged below the PCB. The battery is completely hidden inside the bottom of the case while the switch sticks out a little bit through a hole so that you can use it.
This is how the entire enclosure is assembled. The battery and the PCB are inserted into the case first, along with 4 M3x8 that screw into holes in the bottom of the case. The lid is then put on with 4 M2.5x8 along its edges. Finally after trimming the pins of the switch, it is super-glued onto the back of the PCB next to the battery.
Here is a more detailed view of the screw holes inside the case as well as of the battery and switch placement:
BOM
| Part | What it's for | Qty | Unit | Total | Vendor | Expected Discounted Price (At time last checked) |
|---|---|---|---|---|---|---|
| XIAO ESP32 C3 | The main microcontroller | 1 | $8.84 | $8.84 | AliExpress | $2.46 |
| 0.96" OLED | For displaying the sprite and actions | 1 | $2.31 | $2.31 | AliExpress | — |
| MPU6050 | For calculating orientation and acceleration | 1 | $2.10 | $2.10 | AliExpress | — |
| DHT11 | For measuring temperature and humidity (Just the bare module, no breakout board) | 1 | $2.80 | $2.80 | AliExpress | $1.89 |
| MX Switches | Buttons to control different functions (Minimum order size: 10pcs) | 1 | $3.93 | $3.93 | AliExpress | $1.14 |
| PCB | Main Board (Use gerbers provided) | 1 | $4.00 | $4.00 | JLCPCB | — |
| 3.7V Battery | Powering the device while not connected (Can be self funded) | 1 | $0.01 | $0.01 | AliExpress | $3.66 |
| Passive Components | (Resistors, LED, Switch) (Self provided) | 1 | $0.01 | $0.01 | (Example part) AliExpress | — |
| Screws | For assembly of the enclosure, 4x self-tapping M3x8 and M2.5x8 (Self provided) | 1 | $0.01 | $0.01 | (Example part) AliExpress | — |
| Parts subtotal | — | — | — | $24.01 | — | $17.56 |
| Tax & shipping | — | — | — | $6.97 | — | $7.87 |
| Total | — | — | — | $30.98 | — | $25.43 |
Please Note:
- For full transparency only the raw prices for each component have been listed, in reality significant discounts do apply for almost all of the components. The total of $30.98 represents the maximum possible price for all the components, discounted prices are shown in the right column and in cart screenshots below
- Shipping has been disregarded for all components except for the PCB because of the free shipping offer applied to all choice orders above 10$
- The "first order discount" has been included in the price of the PCB, being taken away from the shipping cost (ie. 4$ PCB + 8.16$ shipping --> 4$ PCB + 4.16$ shipping), this has been done so that the project can still be submitted in the 30$ tier
- The keycaps for the switches and the enclosure will be 3D-printed so no listing has been provided
- I am willing to fund/provide all other components which do not fit into the 30$ range myself (Passive components that I already have, battery, and any other additional shipping and tax that may apply)
Cart Screenshots:
AliExpress Order (Excluding Self-funded parts) (1kr ≈ $0.1):
Final payment window including tax:
(129.24kr = $13.52)
Self-Funded part order (If the previous discounts are considered valid and are still availiable, then the extra money could still be used for this):
Final payment window including tax:
(42.86kr = $4.48)
JLCPCB Order:
Grand Total (with discounts at time last checked): $25.43
Parts
14| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | SW_Push | Button_Switch_Keyboard:SW_Cherry_MX_1.00u_PCB | SW1, SW2 |
| 1 | 10K | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | 10K |
| 1 | 220 | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | 220 |
| 1 | Battery Pads | 1_MCs:XIAO-ESP32-BATTCONTACTS | J3 |
| 1 | DHT11 | Sensor:Aosong_DHT11_5.5x12.0_P2.54mm | DHT11 |
| 1 | LED | LED_THT:LED_D5.0mm | PWR LED |
| 1 | MPU6050 | 1_Sensors:MPU6050_Module | MPU6050 |
| 1 | OLED | 1_Displays:Display_128x64_096_I2C | 0.96" OLED |
| 1 | XIAO-ESP32-C3-SMD | 1_MCs:XIAO-ESP32-C6-DIP | U1 |
The 10 most common of 14 parts.
Similar boards
- 2 layers96.6 × 82.8 mm

- 2 layers100 × 50 mm

Conveyor belt pcb
lansidev/conveyor-belt
Miniature 3D printed conveyor belt for simulation and fun working with sensors, all controllable with Raspberry Pi
22 parts9MIT - 2 layers93 × 20 mm

- 2 layers

OpenMQTTGatewayPCB
ebrithiljonas/OMG_PCB
All in One PCB for the OpenMQTTGateway Project
36 parts7GPL-3.0 - 2 layers62 × 19.3 mm

SniffingTrinket
GeorgK/SniffingTrinket
A room climate monitor using the Adafruit Trinket Pro
23 parts6GPL-3.0 - 2 layers

Arduino relay
bhaskar9980/Guardian
Guardian is an advanced, fully automated hydroponics system designed to optimize plant growth and maximize yield.
58 parts5MIT - 2 layers100 × 43.5 mm

Firefly
Twistx77/Firefly
Open WIFI-enabled RGB lamp with temperature, humidity, suspended air particles and eCO2 sensors.
33 parts5GPL-3.0 - 2 layers30.5 × 77.5 mm

Proyecto sensor temperatura
unla-investigacion-desarrollo/ecosistema-iot
Antes de desarrollar el sistema final, realizamos una etapa de exploración donde investigamos y experimentamos con las siguientes tecnologías:
8 parts5
Questions
How big is the Starbie PCB?
It measures 89.1 × 81.5 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Starbie use?
14 parts, built around the DHT11. 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 Starbie KiCad files?
From the PurpleCactus2/Pet-Starbie repository on GitHub, at the commit this page was made from: the board is PCB/Starbie.kicad_pcb and its schematic PCB/Starbie.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Starbie design in my own project?
Its repository states no licence, so its author keeps all rights: ask PurpleCactus2 before reusing the design.