Skip to the content
PCBKitNew board
2 layers150 × 101 mmSmart scale, the printed circuit board in 3D

Work-in-progress ESP32-S3 smart food scale with custom PCB, enclosure CAD, firmware, mobile app, and backend.

Size
150 × 101 mm
Copper layers
2
Thickness
1.6 mm
Parts
97
Nets
100
Pads
374
Tracks, vias
948, 114
Pours
6
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
12 Sep 2026
Updated
12 Sep 2026

Overview

Smart scale is an open-source printed circuit board by wngxp, from the wngxp/smart-scale repository on GitHub. It is a 2-layer board of 150 × 101 mm with 97 parts on 100 nets, routed with 948 tracks and 114 vias.

It is built around the ESP32-S3-WROOM-1-N8, ADS1232IPW and AT42QT1070-MMH, with the MIC4801YM, TPS63021DSJR and BQ25185DLHR among its other parts. Its parts include 31 resistors, 26 capacitors, 10 connectors, 9 ICs and 4 diodes. It belongs with the ESP32 boards of this library.

Main components

9

README

README.md

Smart Food Scale

A connected 5 kg kitchen scale that displays weight and nutrition locally and syncs stable measurements to a phone.

[!WARNING] Work in progress. The custom PCB, enclosure, and camera-free v1 design are under active development. Review hardware/schematic-review.md before fabricating or powering a board; the repository is not a production-ready hardware release.

Smart scale custom PCB and enclosure work in progress

Project status

AreaStatus
Product directionCamera-free scale with local weight/macros and phone sync
Mechanical3D-printed enclosure and weighing-plate CAD in progress
ElectronicsCustom ESP32-S3 PCB assembled for bring-up; design review ongoing
FirmwareEarlier camera/OLED prototype retained as migration input
Mobile/backendEarlier Expo + FastAPI prototype retained as migration input

The camera-free product baseline is documented in docs/v1-baseline.md. The current custom schematic has diverged from some early component choices in that document, so use the KiCad files and hardware/schematic-review.md when assessing the board as it exists today.

Gallery

Custom PCB in the enclosureEarly breadboard proof of concept
Custom smart-scale PCBLegacy camera and load-cell prototype

Engineering views

These images show the current work-in-progress electrical and mechanical design.

Electrical design

Smart scale KiCad schematic

PCB layoutPCB model
Smart scale board layout in KiCadSmart scale PCB in KiCad's 3D viewer

Mechanical assembly

Smart scale enclosure and PCB assembly in SolidWorks

Legacy camera prototype (retained code)

text
┌──────────────┐  weight + JPEG   ┌─────────────┐  food name   ┌──────────────────┐
│  ESP32-S3    │ ───────────────▶ │   Backend   │ ───────────▶ │  Claude Vision    │
│  + camera    │   POST /identify │  (FastAPI)  │ ◀─────────── │  (claude-sonnet)  │
│  + load cell │                  │             │   macros     ┌──────────────────┐
│  + OLED      │ ◀── live weight  │             │ ───────────▶ │  Open Food Facts  │
└──────────────┘   POST /weight   └─────┬───────┘ ◀─────────── └──────────────────┘
                                        │  GET /weight, /identify, /log, /logs
                                        ▼
                                 ┌─────────────┐
                                 │  Expo app   │  live weight, scan, confirm, log
                                 │  (iOS)      │
                                 └─────────────┘

Pipeline: put food on the scale → press the button (or tap Scan in the app) → the backend identifies the food with Claude Vision → looks up macros on Open Food Facts → the app shows the top matches → you confirm one → the meal is logged.

Repository layout

text
/app         Expo / React Native app for the legacy prototype
/backend     FastAPI + SQLite API for the legacy prototype
/docs        Camera-free v1 requirements and implementation baseline
/enclosure   SolidWorks sources and printable STL files
/firmware    ESP-IDF firmware for the legacy ESP32-S3-CAM prototype
/hardware    KiCad schematic, PCB, libraries, review notes, and fabrication files
README.md    Project overview and status

Prerequisites

  • Python 3.10+ (backend)
  • Node.js 18+ and the Expo tooling via npx (app)
  • ESP-IDF v5.x (firmware) — install guide
  • An Anthropic API key (console.anthropic.com)
  • An iPhone with Expo Go (or the iOS simulator — note the simulator has no camera, so use a physical device to exercise the in-app Scan button)

The backend, the ESP32, and the phone must all be on the same local network.


1. Backend (/backend)

FastAPI + SQLite (aiosqlite), httpx, and the Anthropic SDK.

bash
cd backend

# Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate          # Windows: .venv\Scripts\activate

pip install -r requirements.txt

# Configure API keys
cp .env.example .env               # Windows: copy .env.example .env
#   then edit .env: set ANTHROPIC_API_KEY=sk-ant-... (required), and for the
#   best per-ingredient macros set USDA_FDC_API_KEY (free, instant signup).

# Run (0.0.0.0 so the ESP32 and phone can reach it)
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload

Find your computer's LAN IP (ipconfig on Windows, ipconfig getifaddr en0 on macOS) — you'll need it for the firmware and the app.

Endpoints

MethodPathPurpose
POST/identifymultipart image (JPEG) + weight (g) → dish split into components + macros
POST/logstore a meal (food_name, weight_g, per-100g macros)
GET/logsall meals, newest first
POST/weightfirmware posts the live weight here ({"weight_g": ...})
GET/weightlatest weight reading (polled by the app)
GET/identify/latestthe most recent /identify result (e.g. a scale-led scan)

/identify sends the image to Claude Vision (claude-sonnet-4-6), which breaks the dish into edible components (a simple food yields one). The measured weight is split across components by the model's estimates, and each is priced with macros from USDA FoodData Central (primary — accurate for generic foods), falling back to Open Food Facts for items USDA lacks. The response lists every component (name, weight, per-100g macros, matched source) plus summed totals for the dish. Components with no database match return null macros.


2. Firmware (/firmware)

ESP-IDF project for the GOOUUU ESP32-S3-CAM (OV2640 camera). Uses the esp32-camera component, esp_http_client, a raw SSD1306 I2C driver, and a bit-banged HX711 driver (both included under components/).

Wiring

PeripheralSignalGPIO
HX711 load cellDT1
HX711 load cellSCK2
SSD1306 OLEDSDA21
SSD1306 OLEDSCL47
Button—0 (boot button, active-low)
OV2640 camera—CAMERA_MODEL_ESP32S3_EYE mapping (GPIO 4–18, reserved)

Load cell: 1 kg, calibration factor -330. PSRAM pins 35/36/37 are reserved.

Configure, build, flash

  1. Copy firmware/main/config.local.example.h to firmware/main/config.local.h, then edit the local file:
    • WIFI_SSID, WIFI_PASSWORD
    • BACKEND_URL → http://<your-computer-ip>:8000
  2. Build and flash:
bash
cd firmware
idf.py set-target esp32s3
idf.py build
idf.py -p <PORT> flash monitor      # e.g. -p COM5  or  -p /dev/ttyUSB0

PSRAM note: sdkconfig.defaults is set for octal PSRAM (the N16R8 module). If your board has quad PSRAM, change CONFIG_SPIRAM_MODE_OCT to CONFIG_SPIRAM_MODE_QUAD.

Behavior

  • On boot: connects to WiFi, then continuously shows the current weight (large, centered) on the OLED, updating every 200 ms. It tares on the first stable reading — keep the scale empty during "TARING".
  • Every 500 ms it POSTs the weight to /weight so the app can poll it.
  • Pressing the button captures a JPEG, POSTs it with the current weight to /identify, shows "SCANNING" during the request, then returns to the weight display. (The device screen only ever shows the weight — no food names or macros — per the design.)

3. App (/app)

Expo / React Native (iOS primary), React Navigation bottom tabs.

bash
cd app
npm install
# If Expo reports version mismatches: npx expo install --fix

npx expo start

Then press i for the iOS simulator, or scan the QR code with Expo Go on your iPhone.

Set the backend URL in app/src/config.ts:

ts
export const API_BASE_URL = 'http://192.168.1.50:8000'; // your computer's LAN IP

(Use http://localhost:8000 only for the iOS simulator on the same Mac as the backend.)

Screens

  • Scale tab — polls GET /weight every 500 ms and shows the live weight. Scan takes a photo, POSTs it with the current weight to /identify, and opens the results.
  • Results — the dish broken into components (each with its weight, macros, and matched source) plus a total card for the whole meal, and a Log this meal button → POST /log → back to the Scale tab.
  • Log tab — all logged meals with full macros, plus today's running totals (calories, protein, carbs, fat) at the top.

Design note — where the photo comes from. The hardware pipeline has the scale capture the image (button → /identify). For a self-contained app that works without the hardware, the in-app Scan button captures with the phone camera and calls the same /identify endpoint. To instead surface a scale-initiated scan in the app, poll GET /identify/latest (the backend caches the most recent result).


End-to-end test (no hardware required)

  1. Start the backend (uvicorn ...).
  2. Start the app, set API_BASE_URL to your computer's IP, open it on your phone.
  3. Tap Scan, photograph some food, pick a match, and check the Log tab.

To simulate the scale's weight feed without hardware:

bash
curl -X POST http://localhost:8000/weight \
  -H "Content-Type: application/json" -d '{"weight_g": 152.0}'

The Scale tab will show 152 g.

Parts

97
QtyValueFootprintReferences
14100nCapacitor_SMD:C_0603_1608MetricC1, C6, C10, C12, C14, C15, C16, C18, C20, C21, C22, C24, C25, C26
710kResistor_SMD:R_0603_1608MetricR11, R14, R19, R20, R21, R22, R23
61KResistor_SMD:R_0603_1608MetricR5, R6, R8, R15, R16, R17
622uCapacitor_SMD:C_1206_3216MetricC2, C7, C8, C9, C11, C17
5Conn_01x01Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ6, J7, J8, J9, J10
410KResistor_SMD:R_0603_1608MetricR9, R10, R26, R27
4MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
310uCapacitor_SMD:C_1206_3216MetricC4, C5, C23
20RResistor_SMD:R_0603_1608MetricR30, R31
2100RResistor_SMD:R_0603_1608MetricR28, R29
21uCapacitor_SMD:C_0603_1608MetricC3, C13
222Resistor_SMD:R_0603_1608MetricR3, R4
24K7Resistor_SMD:R_0603_1608MetricR12, R13
25K1Resistor_SMD:R_0603_1608MetricR1, R2
11.5uHInductor_SMD:L_Coilcraft_XxL4020L1
1100KResistor_SMD:R_0603_1608MetricR24
118KResistor_SMD:R_0603_1608MetricR7
11N5817Diode_SMD:D_SOD-123D1
13V3TestPoint:TestPoint_Pad_D1.0mmTP3
13V3ATestPoint:TestPoint_Pad_D1.0mmTP6
147KResistor_SMD:R_0603_1608MetricR18
14u7Capacitor_SMD:C_0603_1608MetricC19
161K9Resistor_SMD:R_0603_1608MetricR25
1ADS1232IPWPackage_SO:TSSOP-24_4.4x7.8mm_P0.65mmU9
1AT42QT1070-MPackage_DFN_QFN:VQFN-20-1EP_3x3mm_P0.45mm_EP1.55x1.55mmU7
1BATT_ConnConnector_JST:JST_PH_S2B-PH-K_1x02_P2.00mm_HorizontalJ2
1BLM18AG601Inductor_SMD:L_0603_1608MetricFB2
1BLM21PG221Inductor_SMD:L_0805_2012MetricFB1
1BQ25185DLHRsmartscale:WSON10_DLH_TEXU2
1Btn_BOOTButton_Switch_SMD:SW_SPST_B3U-1000PSW2
1Btn_RSTButton_Switch_SMD:SW_SPST_B3U-1000PSW1
1CLV1L-FKBLED_SMD:LED_Cree-PLCC4_3.2x2.8mm_CCWD4
1ESP32-S3-WROOM-1RF_Module:ESP32-S3-WROOM-1U5
1FNDTestPoint:TestPoint_Pad_D1.0mmTP4
1GNDATestPoint:TestPoint_Pad_D1.0mmTP7
1GRNLED_SMD:LED_0603_1608MetricD2
1HDC3022smartscale:Texas_DEJ0008A_WSON-8-1EP_2.5x2.5mm_P0.5mm_EP1.2x1.9mmU6
1LCD_ConnConnector_FFC-FPC:Hirose_FH12-10S-0.5SH_1x10-1MP_P0.50mm_HorizontalJ4
1LC_ConnTerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1-4-3.81_1x04_P3.81mm_HorizontalJ5
1MAX17048G_T10smartscale:MAX17048G_T10U4
1MIC4801YMsmartscale:SOIC-8_M_MCLU8
1Pin 2x3Connector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_VerticalJ3
1Polyfuse 1AFuse:Fuse_1206_3216MetricF1
1REDLED_SMD:LED_0603_1608MetricD3
1TPS63021DSJRsmartscale:DSJ14_2P85X1P58U3
1USBLC6-2SC6Package_TO_SOT_SMD:SOT-23-6U1
1USB_C_Receptacle_USB2.0_16PConnector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12J1
1VBATTTestPoint:TestPoint_Pad_D1.0mmTP5
1VBUSTestPoint:TestPoint_Pad_D1.0mmTP1
1VSYSTestPoint:TestPoint_Pad_D1.0mmTP2

Questions

How big is the Smart scale PCB?

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

What parts does the Smart scale use?

97 parts, built around the ESP32-S3-WROOM-1-N8, ADS1232IPW, AT42QT1070-MMH and MIC4801YM. 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 Smart scale KiCad files?

From the wngxp/smart-scale repository on GitHub, at the commit this page was made from: the board is hardware/smart-scale.kicad_pcb and its schematic hardware/smart-scale.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Smart scale design in my own project?

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

Similar boards

  • 2 layers142 × 23 mmMassue bento v4, the printed circuit board in 3D

    Massue bento v4

    benkuper/BenTo-Legacy

    Legacy repository for the former BenTo-Club project

    101 parts1GPL-3.0
  • 4 layers102.6 × 148 mmLoRa Monitor, the printed circuit board in 3D

    LoRa Monitor

    m-scasserra/TrabajoFinal_MIoT

    242 parts
  • 2 layers45 × 100 mmWalkiepcb, the printed circuit board in 3D

    Walkiepcb

    houseofthe051010/ESP32-Walkie-Talkie-V2

    This ESP32 Walkie Talkie is redesigned with a SX1262 radio, a PCB, and a full case redesign.

    93 parts1
  • 2 layers50 × 61 mmESP32 Falcon, the printed circuit board in 3D

    ESP32 Falcon

    Patkra77111/ESP32_Falcon

    This is custom ESP32 board with the IMU BMI270.

    28 partsApache-2.0
  • 4 layers86.3 × 91.4 mm485toSDI12, the printed circuit board in 3D

    485toSDI12

    sihyun-noh/zephyr_485toSDI12

    Zephyr RTOS 기반 Dajilog MCU 장비의 firmware, custom board 정의, 공통 component, KiCad hardware source를 함께 관리하는 repository입니다.

    156 partsApache-2.0
  • 2 layers118.1 × 76.2 mmTartarSauce, the printed circuit board in 3D

    TartarSauce

    patchez98/TartarSauce

    Replacement for Razer Nostromo / Tartarus / Orbweaver with mechanical switches and analog thumbstick

    105 parts2
  • 4 layers192 × 71.8 mmVfd clock, the printed circuit board in 3D

    Vfd clock

    MG-5/vfd-clock-hardware

    Hardware for controlling six VFD IV-17 tubes as clock (HH:MM:SS)

    130 parts1MIT