Skip to the content
2 layers80.5 × 92 mmDepthSensor, the printed circuit board in 3D

Kepp track of my salt in water conditioner

Size
80.5 × 92 mm
Copper layers
2
Thickness
1.6 mm
Parts
40
Nets
50
Pads
142
Tracks, vias
390, 10
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
28 Sep 2026
Updated
3 Nov 2026

Overview

DepthSensor is an open-source printed circuit board by 0x4765654b, from the 0x4765654b/distance_sensor repository on GitHub, published under the MIT licence. It is a 2-layer board of 80.5 × 92 mm with 40 parts on 50 nets, routed with 390 tracks and 10 vias.

It is built around the ESP32-C6-DEVKITM-1-N4, TBD62783APG and P6KE6.8A, with the PJ-102AH and RXEF075 among its other parts. Its parts include 12 resistors, 8 capacitors, 4 connectors, 2 ICs and 2 diodes. It belongs with the ESP32 and RISC-V boards of this library.

Main components

5

README

README.md

SaltMon — Water-Softener Salt Level Monitor

SaltMon watches the salt tank of a Culligan Gold Series water softener. A US-100 ultrasonic sensor, mounted under the tank lid, measures the distance down to the salt. An ESP32-C6 in a wall-mounted box turns that distance into a salt level. It shows the level on lid LEDs and publishes readings to AWS IoT Core. A SaltMon AWS stack stores the history, forecasts when the salt will run out, and publishes the results over SNS. There, the ChoreCore household app picks them up and creates an "Add salt" chore.

Status: design phase. The requirements, the carrier schematic and the routed carrier PCB are done. Firmware, the cloud stack and the tooling are not started yet.

Repository Layout

text
docs/                     requirements, pin map, integration contract, pick list, datasheets
kicad/lib/                ESP32-C6-DevKitM-1 symbol + socketed footprint (generated)
kicad/DepthSensor/        carrier PCB project (KiCad 10): schematic, board, Gerbers, generator scripts
models/                   ESP32-S3 dev-kit library (not used; kept for reference)
firmware/                 ESP-IDF application                      (planned)
cloud/                    SaltMon-<env> CDK stack + Lambdas        (planned)
tools/                    provision.py, saltmon-config.py          (planned)

Documents

DocumentContents
docs/requirements.mdSystem requirements: design decisions, parts, power, LEDs, sensor, firmware, cloud, mechanics, verification
docs/pinmap.mdKit header pads, carrier connectors, U2 pinout. Source of truth for firmware board.h
docs/integration-contract.mdSNS message contract between SaltMon and its consumers (ChoreCore)
docs/pick-list.mdEverything to buy or gather for one build (carrier, cables, enclosure)
docs/lid-pick-list.mdThe lid panel board: parts, LED spacers, mounting hardware, assembly order

Hardware

  • Carrier PCB: 80.5 × 92 mm, 2-layer, all through-hole. The ESP32-C6-DevKitM-1 plugs into female headers. The board also carries a TBD62783APG LED driver, the power path (fuse, lid switch loop, Schottky diode), the sensor-line filters, and keyed headers for the lid ribbon (J_PANEL) and the sensor ribbon (J_SNS).
  • Lid panel PCB: 50 × 63 mm, passive, on standoffs behind the lid. It holds 8 flat-top LEDs (salt level, network, activity, power) and pads for the panel-mounted on/off slide switch and push-button. A 16-way ribbon with an IDC socket at each end connects it 1:1 to the carrier. The same KiCad file carries the 1:1 lid drilling template on User.Drawings. What each LED shows is in requirements §5.4.
  • Sensor: a US-100 in UART mode on a 6-way ribbon, about 1.2 m long.
  • Enclosure: a gasketed ABS junction box, wall-mounted through its 4 corner holes.

Gerbers for fabrication are in kicad/DepthSensor/depth_gerber/ (also zipped as depth_gerber.zip).

Regenerating the Schematic and PCB

The schematic, the kit footprint and the PCB are all generated by scripts. Change the script, not the KiCad file, then regenerate:

sh
KICAD=/Applications/KiCad/KiCad.app/Contents
KPY=$KICAD/Frameworks/Python.framework/Versions/Current/bin/python3   # KiCad's Python (has pcbnew)
CLI=$KICAD/MacOS/kicad-cli

python3 kicad/lib/gen_devkit.py                    # kit symbol + footprint
python3 kicad/DepthSensor/gen_schematic.py         # schematic (deterministic UUIDs)
$CLI sch erc kicad/DepthSensor/DepthSensor.kicad_sch

$KPY kicad/DepthSensor/gen_pcb.py                  # place, autoroute (Freerouting), pour GND
$KPY kicad/DepthSensor/gen_pcb.py --no-route       # placement only
$CLI pcb drc --schematic-parity kicad/DepthSensor/DepthSensor.kicad_pcb

python3 kicad/LidPanel/gen_schematic.py           # lid panel: same steps
$KPY kicad/LidPanel/gen_pcb.py
$CLI pcb drc --schematic-parity kicad/LidPanel/LidPanel.kicad_pcb
$CLI pcb export pdf --mode-single -l User.Drawings --scale 1 -o lid-template.pdf kicad/LidPanel/LidPanel.kicad_pcb

Helpers shared by both boards are in kicad/lib/schgen.py (schematic) and kicad/lib/pcbgen.py (PCB).

gen_pcb.py needs Java 21+ and the Freerouting jar at kicad/freerouting/freerouting-*.jar. The jar is not in git; download it from the Freerouting releases. It was tested with 2.4.1. Close the board in KiCad before regenerating, and re-export the Gerbers afterwards.

License

MIT

Parts

40
QtyValueFootprintReferences
4100nCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mmC2, C3, C4, C5
4300Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2, R3, R4, R8
4M3MountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
2100Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR11, R12
2180Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1, R7
21nCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mmC7, C8
2470Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR5, R6
1+3V3TestPoint:TestPoint_THTPad_1.5x1.5mm_Drill0.7mmTP2
1100kResistor_THT:R_Array_SIP9RN1
110kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR10
110uCapacitor_THT:CP_Radial_D5.0mm_P2.00mmC6
11N5822Diode_THT:D_DO-201AD_P15.24mm_HorizontalD1
11k5Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR9
1220u 16VCapacitor_THT:CP_Radial_D8.0mm_P3.50mmC1
1ESP32-C6-DevKitM-1SaltMon:ESP32-C6-DevKitM-1_SocketedU1
1GNDTestPoint:TestPoint_THTPad_1.5x1.5mm_Drill0.7mmTP3
1J_PANELConnector_IDC:IDC-Header_2x08_P2.54mm_VerticalJ3
1J_SNSConnector_IDC:IDC-Header_2x03_P2.54mm_VerticalJ2
1J_SPAREConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ4
1P6KE6.8ADiode_THT:D_DO-15_P10.16mm_HorizontalD2
1PJ-102AHConnector_BarrelJack:BarrelJack_CUI_PJ-102AH_HorizontalJ1
1RXEF075Fuse:Fuse_Bourns_MF-RHT070F1
1SNS_RX_CTestPoint:TestPoint_THTPad_1.5x1.5mm_Drill0.7mmTP5
1SNS_TX_CTestPoint:TestPoint_THTPad_1.5x1.5mm_Drill0.7mmTP4
1SW_ATestPoint:TestPoint_THTPad_1.5x1.5mm_Drill0.7mmTP6
1TBD62783APGPackage_DIP:DIP-18_W7.62mm_SocketU2
1V_SYSTestPoint:TestPoint_THTPad_1.5x1.5mm_Drill0.7mmTP1

More from 0x4765654b/distance_sensor

1
  • 2 layers50 × 63 mmLidPanel, the printed circuit board in 3D

    LidPanel

    0x4765654b/distance_sensor

    Kepp track of my salt in water conditioner

    15 partsMIT

Similar boards

  • 6 layers160 × 120 mmPic32main, the printed circuit board in 3D

    Pic32main

    JuanPoueriet/automatic-spork

    Máquina de ruleta física de casino. 6 PCBs: pic32main (cerebro), wheel (rueda de LEDs), displaysa/b/c (paneles de 7 segmentos en cascada) y buttons (botonera).

    256 parts
  • 2 layers105 × 73 mmEH-900, the printed circuit board in 3D

    EH-900

    mm011106/EH900_hardware

    Schematic/PCB drawings

    160 partsCC0-1.0
  • 2 layers200 × 170 mmRav4-tcu, the printed circuit board in 3D

    Rav4-tcu

    gamer927/rav4

    rav4

    118 parts
  • 2 layers75.8 × 74.2 mmSwallow, the printed circuit board in 3D

    Swallow

    kamangir/bluer-designs

    designs

    36 partsCC0-1.0
  • 2 layers120 × 40 mmLemon piano, the printed circuit board in 3D

    Lemon piano

    yupipi93/arduino-lemon-piano

    Hold a ground clip in one hand and touch a lemon with the other: your body closes the circuit, the pin drops three or four ADC counts, and a note sounds. Seven lemons make a keyboard.

    49 parts
  • 2 layers78.5 × 104.5 mmGaggenau, the printed circuit board in 3D

    Gaggenau

    M-o-a-T/moat-hardware

    Schematics and files for MoaT IoT things

    65 parts
  • 2 layersMono Test Pcb, the printed circuit board in 3D

    Mono Test Pcb

    biamanuel/PCB-Medidor-de-consumo-monofasico

    11 parts
  • 2 layersMono Test Pcb, the printed circuit board in 3D

    Mono Test Pcb

    biamanuel/PCB-Medidor-de-consumo-trifasico

    22 parts

Questions

How big is the DepthSensor PCB?

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

What parts does the DepthSensor use?

40 parts, built around the ESP32-C6-DEVKITM-1-N4, TBD62783APG, P6KE6.8A and PJ-102AH. 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 DepthSensor KiCad files?

From the 0x4765654b/distance_sensor repository on GitHub, at the commit this page was made from: the board is kicad/DepthSensor/DepthSensor.kicad_pcb and its schematic kicad/DepthSensor/DepthSensor.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the DepthSensor 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).