Skip to the content
2 layers30 × 30 mmUsb, the printed circuit board in 3D

A vpet built on embedded hardware in rust

Size
30 × 30 mm
Copper layers
2
Thickness
1.6 mm
Parts
17
Nets
16
Pads
69
Tracks, vias
123, 5
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
16 Aug 2023
Updated
15 Sep 2026

Overview

Usb is an open-source printed circuit board by bytomancer, from the bytomancer/pico-pet repository on GitHub, published under the MIT licence. It is a 2-layer board of 30 × 30 mm with 17 parts on 16 nets, routed with 123 tracks and 5 vias.

It is built around the HX809T-3.08V and LW5233A23E. Its parts include 5 capacitors, 5 resistors, 3 ICs, 3 connectors and 1 switch.

Main components

2

README

README.md

Pico Pet

A virtual pet that requires the user to complete pomodoros for the health of their pet.

Hardware

NVM Utilization

The NVM (Non-Volatile Memory) module included with the DS3231 provides 4KiB arranged in 512 pages of 8 bytes each.

Permanent storage must be serializable to a specified number of pages, and write to an assigned page address.

Pages are addressed from hexidecimal 0x000 to 0x1ff.

Page StartPage EndModule
000000Header
001002Settings
003003Inventory
004005Pet

note: If the NVM becomes corrupted, try changing the const NVM_SENTINEL to force a header guard check failure. This will factory reset the device, and all data will be lost.

Header
0if set to the NVM_SENTINEL value, then the EEPROM is assumed to contain a valid savefile
1
2
3
4
5
6
7
Settings Page 1minmax
0User brightness015
1User volume04
2nyi Vibration enabled01
3nyi 12hr clock enabled01
4nyi minutes before device sleeps190
5
6
7
Settings Page 2minmax
0Pomodoro length in minutes190
1Short break length in minutes190
2Long break length in minutes190
3Cycles, aka number of pomodoros before a long rest19
4Pet feeding deadline hr023
5Pet feeding deadline min059
6
7
Inventoryminmax
0Tomatoes099
1Raspberries09
2Lower byte of juice value
3Higher byte of juice value
4
5
6
7

Max juice is 9999ml as a u16

Pet Page 1
0Birth Day
1Birth Month
2Birth Year
3
4
5
6
7
Pet Page 2
0Current HP
1Sickness
2Daily Hunger
3Last Fed Day
4Last Fed Month
5Last Fed Year
6
7

Max HP = Daily Hunger + 4

Last Fed Year is probably excessive, but it'd be a weird bug if someone started the pet up after exactly 1 year, and their pet showed no signs of missed days of hunger...

Pin Out For Raspberry Pico

mermaid
graph LR
    subgraph RP2040
        Pin1
        Pin2
        %%Pin3[GND]
        Pin4
        Pin5
        Pin6
        Pin7
        %%Pin8[GND]
        Pin9
        %%Pin10
        Pin11
        Pin12
        %%Pin13[GND]
        Pin14
        Pin15
        Pin16
        Pin17
        %%Pin18[GND]
        %%Pin19
        Pin20
        %%Pin21
        Pin22

Pinout for Waveshare RP2040-Tiny

mermaid
graph LR
    subgraph RP2040-Tiny
        TinyPin0
        TinyPin1
        TinyPin2
        TinyPin3
        TinyPin4
        TinyPin5
        TinyPin6
        %%TinyPin7
        TinyPin8
        TinyPin9
        TinyPin10
        TinyPin11
        TinyPin12
        TinyPin13
        %%TinyPin14
        TinyPin15
        %%TinyPin16
        %%TinyPin17
        %%TinyPin18
        TinyPin19
        %%TinyPin20
        %%TinyPin21[3V3]

Development Breakboard Build

Below are my recommendations for how to build the development board.

Shopping List

All amazon links are tracking free and affiliate free; feel free to source these where you wish, but compatability is not guaranteed for other similar products. The current iteration of the software is absolutely tied to the LCD module below, as well as the combination DS3231 & AT24C32 board. Theoretically any RTC and NVM module could replace the aformentioned, but the I2C addresses have been set to match the product below. Additionally, any ST7735S driven 128x128 display could be adapted. All four buttons provided on the waveshare LCD hat are used as well.

Assembly

  1. Socket the Raspberry Pico into center of the Expansion Board.
  2. Socket the LCD Module into the left slot of the Expansion Board.
  3. Using a command strip, attach the breadboard to the flat side of the breakout board.
    • The 1A point of the breadboard should be in the top left, near where the word VBUS is printed on the back of the breakout board.
    • While many breadboards do come with stickers, there is often no solid insulating layer for the conductive rails, and the breakout board has sharp solder points that can stab through this thin soft layer. Whatever you do, I recommend insulating these two boards or you will risk a short...
  4. Connect the breakout terminal VSYS and tie point 1A on the breadboard, preferably using a red wire.
    • I recommend running this wire over the top of the board rather than the side as it would be natural to do, because there will be essentially no space between the Raspberry Pico and this specific Breakout Board when they are eventually mated.
  5. Connect the breakout terminal GND (the one adjacent to VSYS) and tie point 2A on the breadboard, preferably using a black wire.
    • Again, I recommend running this wire over the top of the board.
  6. Connect the data lines to the breadboard, this time allowing the wires to wrap around the side of the board (recommended colors in parenthesis):
    • GP0 to J1 (green)
    • GP1 to J2 (white)
    • GP4 to J5 (yellow)
    • GP5 to J6 (blue)
    • GP6 to J7 (green)
  7. Connect new lines on the breadboard for the RTC module:
    • C2 to C3 (black)
    • D1 to D4 (red)
    • H1 to B5 (green)
    • H2 to B6 (white)
    • H6 to B7 (blue) (I recommend routing this cable up then following the other 2 data lines)
  8. Connect new lines on the breadboard for the piezo buzzer:
    • G5 to F17 (orange)
    • E2 to G13 (black) (I recommend routing this along the top side, then down the gap I left in the I column)
  9. Connect new lines on the breadboard for the vibration motor:
    • G7 to K16 (green)
    • F13 to F15 (black)
  10. Stick the vibration motor onto the bottom of the breadboard.
  11. Attach the vibration motor wires (letting the wires lay to the right):
    • red wire to G16
    • blue wire to G15
  12. Place the piezo buzzer onto pins J17 and J13 (placement will secure the vibration motor wires)
  13. Insert a CR2032 battery into the RTC module.
  14. Place the RTC module onto pins A3, A4, A5, A6, A7, and A8.
  15. Finally, socket the breakout board onto the right slot of the Expansion Board.

Development Environment Setup

NixOS

I recommend running the following to open the VSCodium development environment:

bash
nix develop --command codium .

You can of course just use whatever text editor you like, and simply enter the flake in a terminal with:

bash
nix develop
Other Linux Distros

You'll need Rust installed and set to nightly-2023-11-16. Other versions may not be supported. You will likely also need udev to detect the raspberry pico. To use the makefile, you'll also want gnu make. You can review the flake.nix and attempt to reproduce it in your own OS.

First Time Setup

Your first time opening this repo, you'll need to setup the dependencies and enable the thumbv6m-none-eabi target. This has been automated for you:

bash
make init

Running The Code

The build process performs a number of actions. The sprites will be converted from PNG files to raw binary files containing RGB332 data. Fonts will be converted from PNG files to binary files containg black&white data. The custom PEAT audio files will be converted from plaintext files to the binary custom BEAT format. With all assets converted, the project will finally build and attempt to upload.

All of this is as simple as invoking:

bash
make run

Attributions

Placeholder artwork (lofi.png) copyright belongs to Juan Pablo Machado.

Parts

17
QtyValueFootprintReferences
31uCapacitor_SMD:C_0805_2012MetricC3, C4, C5
35k1Resistor_SMD:R_0805_2012MetricR1, R2, R3
2100kResistor_SMD:R_0805_2012MetricR4, R5
24.7uCapacitor_SMD:C_0805_2012MetricC1, C2
1Conn_01x07_PinConnector_PinHeader_2.54mm:PinHeader_1x07_P2.54mm_VerticalJ3
1HX809T-3.08VPackage_TO_SOT_SMD:SOT-23U3
1LW5233A23EPackage_TO_SOT_SMD:SOT-23-5U2
1MCP73831-2-OTPackage_TO_SOT_SMD:SOT-23-5U1
1PH2.0mm 2PConnector_JST:JST_PH_S2B-PH-K_1x02_P2.00mm_HorizontalJ2
1PWRButton_Switch_THT:SW_Slide_SPDT_Angled_CK_OS102011MA1QSW1
1USB_C_Receptacle_USB2.0_14PConnector_USB:USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_HorizontalJ1

More from bytomancer/pico-pet

2
  • 2 layersPicopet, the printed circuit board in 3D

    Picopet

    bytomancer/pico-pet

    A vpet built on embedded hardware in rust

    56 parts1MIT
  • 2 layers28 × 21 mmRtc+nvm, the printed circuit board in 3D

    Rtc+nvm

    bytomancer/pico-pet

    A vpet built on embedded hardware in rust

    8 parts1MIT

Similar boards

  • 2 layers76.1 × 87.9 mmBadge ESC 2025, the printed circuit board in 3D

    Badge ESC 2025

    endsummercamp/badge-2025

    120 parts9
  • 2 layers50 × 35 mmServo power, the printed circuit board in 3D

    Servo power

    earthtojake/text-to-cad

    Design physical products with AI

    17 parts26kMIT
  • 2 layers139.7 × 62.2 mmBreakout 60pin EEC IV, the printed circuit board in 3D

    Breakout 60pin EEC IV

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    17 parts1.2k
  • 2 layers29.2 × 55.9 mmDeniseadapter, the printed circuit board in 3D

    Deniseadapter

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    17 parts1kGPL-3.0
  • 2 layers24.5 × 36.5 mmCluster, the printed circuit board in 3D

    Cluster

    JesusFreke/lalboard

    A 3D-printed keyboard inspired by the DataHand

    17 parts993
  • 2 layers56.3 × 55.7 mmStarNecklace, the printed circuit board in 3D

    StarNecklace

    hackclub/OnBoard

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

    17 parts915
  • 2 layers25 × 25 mmSmallEncoder, the printed circuit board in 3D

    SmallEncoder

    DDeGonge/OS-ARM

    This arm is not industrial and it will not be fast, but that is not my goal. But it will hopefully be a very nice looking arm fully capable of 6dof motion, cheap enough to keep it accessable but capable enough to…

    17 parts498MIT
  • 2 layers38.9 × 16.1 mmAmoeba spc, the printed circuit board in 3D

    Amoeba spc

    mtl/keyboard-pcbs

    Keyboard PCBs

    17 parts485

Questions

How big is the Usb PCB?

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

What parts does the Usb use?

17 parts, built around the HX809T-3.08V and LW5233A23E. 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 Usb KiCad files?

From the bytomancer/pico-pet repository on GitHub, at the commit this page was made from: the board is kicad/usb/usb/usb.kicad_pcb and its schematic kicad/picopet/picopet.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Usb design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).