
Assembly preview
ripclap/rm520n-carrier
KiCad RM520N-GL carrier with 2.5 GbE, passive PoE, dual SIM interfaces and independent LoRa management.

Household car km tracker: FastAPI + SQLite service on a Raspberry Pi, with ESP32 device API
Carrier is an open-source printed circuit board by SantiBarrios2002, from the SantiBarrios2002/car-km repository on GitHub. It is a 2-layer board of 69 × 49.9 mm with 30 parts on 26 nets, routed with 142 tracks and 35 vias.
It is built around the TPS3808G01DBVR-TP, M2.5 and SS34, with the SMAJ5.0A among its other parts. Its parts include 8 resistors, 5 connectors, 4 capacitors, 2 diodes and 1 IC.
Logs every ride of the family car automatically and works out who drove how many kilometres each month.
A small device in the car reads distance from the OBD-II port over Bluetooth and records each ride. Tapping an NFC fob says who is driving. Rides are uploaded over WiFi to a Raspberry Pi at home, and the family uses a phone web app to see monthly totals, assign untapped rides ("that was me") and export CSV.
car home
┌──────────────────────────────────────┐ ┌───────────────────────────────┐
│ Vgate iCar Pro ─BLE─► ESP32-S3 module │ WiFi │ Raspberry Pi │
│ (OBD-II speed) + carrier PCB │ ─────► │ FastAPI + SQLite (app/) │
│ PN532 NFC ─I²C─► (supercap hold- │ HTTP │ web app at /, device API │
│ (who drives) up, 5 V input) │ │ at /api/ ◄── family phones │
└──────────────────────────────────────┘ └───────────────────────────────┘| Part | Where | State |
|---|---|---|
| Pi service + web app | app/ | In use on the family Pi. |
| Carrier PCB | hardware/carrier/ | Schematic done (ERC clean); first-pass board placed, autorouted and passing DRC. Not reviewed, not ordered. |
| Car device firmware | firmware/ | Not started. Conventions are already fixed in CLAUDE.md. |
None of these have been done yet. They come before anything is sent to a fab; details and commands are in hardware/README.md.
app/ Pi service: FastAPI + SQLite, web app and device API
main.py all routes (web app + device API), sections marked with # ----
db.py schema and SQLite helpers
static/index.html the whole web app: one file, vanilla JS, Spanish/English
install.sh Pi install: venv, systemd unit, nightly backup cron (safe to re-run)
car-km.service systemd unit template used by install.sh
hardware/ car device hardware: Waveshare module + custom carrier PCB
README.md hardware design document: start here for the electronics
carrier/ KiCad 10 project (schematic + PCB)
bom-rev2.csv bill of materials
vendor/ Waveshare schematic and mechanical drawing (PDF)
CLAUDE.md working notes for Claude Code and contributors: conventions, hard rules, hardware factsdata/ (database, device token, firmware images, backups) is created at runtime and is not committed.
git clone <this repo> ~/car-km
cd ~/car-km && chmod +x install.sh && ./install.shThe script creates a venv, installs a systemd unit (car-km.service, port 8080) and a nightly SQLite backup cron, then prints the Tailscale URL to share with the family. Logs: journalctl -u car-km -f.
http://<pi-tailscale-name>:8080 on a phone (see Links). On iOS, Share → Add to Home Screen makes it feel like an app.| Where | URL |
|---|---|
| Anywhere, phone with Tailscale | http://iot-hub.tail8fe499.ts.net:8080 |
| Same, by Tailscale IP (if the name doesn't resolve) | http://100.102.81.29:8080 |
| Home WiFi, no Tailscale needed | http://192.168.1.140:8080 |
| API docs | http://iot-hub.tail8fe499.ts.net:8080/api/docs |
At home the LAN link works for anyone on the WiFi. From outside, each person needs Tailscale. Prefer sharing the Pi over inviting people into the tailnet: someone you share with can reach only iot-hub, not your other devices.
iot-hub → Share… and copy the invite link.iot-hub in it.iot-hub → Share… (or the Sharing tab) and remove them.Alternatively, Users → Invite users makes them full tailnet members. That's simpler when they have many devices, but by default they can then reach every machine, so restrict them in Access controls.
| Method | Path | Auth | Purpose |
|---|---|---|---|
| POST | /api/rides/batch | bearer | JSON array of rides; idempotent on (device_id, start_ts) |
| GET | /api/fobs | none (also used by the web app) | fob → user map; send If-None-Match with the last ETag to get a 304 |
| GET | /api/time | bearer | server unix time, for setting the RTC |
| GET | /api/firmware | bearer | latest firmware.bin; send X-Version to get a 304 when current |
Bearer = Authorization: Bearer <token>. The token is in data/device_token, created on first start and shown in Ajustes. OTA images go in data/firmware/ (firmware.bin + version.txt).
Ride object:
{"device_id":"meriva-1","start_ts":1759742400,"end_ts":1759744230,"km":23.4,
"fob_uid":"04A1B2C3D4E580","source":"obd","fw":"0.3.1","end_reason":"brownout"}Interactive docs at /api/docs.
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
.venv/bin/uvicorn app.main:app --reload --port 8081Port 8081 lets the dev server run alongside the live service on 8080. Run from the repo root: the default paths under data/ are relative to the working directory.
There are no logins: the app is reachable only on the home LAN and over Tailscale, and a household km log doesn't need more. The device API uses a bearer token. Don't expose port 8080 to the internet; if wider access is ever needed, put it behind Tailscale Serve or a reverse proxy with authentication.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 3 | M2.5 | MountingHole:MountingHole_2.7mm_M2.5_Pad | H2, H3, H4 |
| 2 | 10k | Resistor_SMD:R_0805_2012Metric | R4, R5 |
| 2 | 5F 2.7V | Capacitor_THT:CP_Radial_D8.0mm_P3.50mm | C1, C4 |
| 2 | 5k1 | Resistor_SMD:R_0805_2012Metric | R6, R7 |
| 2 | SS34 | Diode_SMD:D_SMA | D1, D2 |
| 1 | 100k 1% | Resistor_SMD:R_0805_2012Metric | R1 |
| 1 | 100n | Capacitor_SMD:C_0805_2012Metric | C3 |
| 1 | 10u 16V | Capacitor_SMD:C_0805_2012Metric | C2 |
| 1 | 11k3 1% | Resistor_SMD:R_0805_2012Metric | R2 |
| 1 | 22R 1W | Resistor_SMD:R_2512_6332Metric | R3 |
| 1 | 4k7 | Resistor_SMD:R_0805_2012Metric | R8 |
| 1 | BAT->VCAP (closed) | Jumper:SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mm | JP2 |
| 1 | M2.5 NPTH | MountingHole:MountingHole_2.7mm_M2.5 | H1 |
| 1 | PTC 1.1A hold | Fuse:Fuse_1812_4532Metric | F1 |
| 1 | SMAJ5.0A | Diode_SMD:D_SMA | TVS1 |
| 1 | TPS3808G01DBV | Package_TO_SOT_SMD:SOT-23-6 | U2 |
| 1 | UART debug | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J4 |
| 1 | USB-C power only | Connector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12 | J1 |
| 1 | USB_5V | TestPoint:TestPoint_Pad_D1.5mm | TP1 |
| 1 | VCAP | TestPoint:TestPoint_Pad_D1.5mm | TP2 |
| 1 | bypass D1 (closed) | Jumper:SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mm | JP1 |
| 1 | to PN532 (I2C) | Connector_JST:JST_PH_S5B-PH-K_1x05_P2.00mm_Horizontal | J2 |
| 1 | to module J1 (BAT) | Connector_Molex:Molex_PicoBlade_53261-0271_1x02-1MP_P1.25mm_Horizontal | J5 |
| 1 | to module J8 | Connector_JST:JST_SH_SM12B-SRSS-TB_1x12-1MP_P1.00mm_Horizontal | J3 |

ripclap/rm520n-carrier
KiCad RM520N-GL carrier with 2.5 GbE, passive PoE, dual SIM interfaces and independent LoRa management.

hghaken/ESP-iRadio
ESP32 internet radio with Bluetooth A2DP output (headphones/speaker), 1.69" display and web control

alph4345/test
TrinketCore puts everything a small rechargeable gadget needs on one 40 × 60 mm board, ready to order assembled from PCBWay:

Bruhdows/klink
Klink is a magnetic tile system for building programmable machines. First up: a marble run with sensors, buttons, lights, gates, splitters and an elevator.

ChenSiyun1234/nmos-ldo-board
Discrete NMOS LDO, 1.0 V at 1 A. 4-layer KiCad board, ngspice and thermal sims.

desanv01/Flight-Controller-V1
STM32H743 flight controller: staged design, six-layer PCB implementation, manufacturing data and engineering history.
gokselozgur5/pcb-design-collar-tracker
Small GPS and cellular dog-collar tracker. KiCad sources, DFM evidence and ongoing nano-SIM layout work.

itsTasos/RAPS-5
Dual-input power module with independent LiPo protection, buck conversion and ideal-diode OR-ing.
It measures 69 × 49.9 mm and has 2 copper layers, 1.6 mm thick.
30 parts, built around the TPS3808G01DBVR-TP, M2.5, SS34 and SMAJ5.0A. 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.
From the SantiBarrios2002/car-km repository on GitHub, at the commit this page was made from: the board is hardware/carrier/carrier.kicad_pcb and its schematic hardware/carrier/carrier.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask SantiBarrios2002 before reusing the design.