Skip to the content
PCBKitNew board
2 layers55.5 × 45.9 mmDomofon, the printed circuit board in 3D

An interface that connects a classic 2-wire analog intercom handset line (Polish: domofon) to an ESP32-C3 SuperMini (HW-466B) running ESPHome, so the intercom can be used from Home Assistant.

Size
55.5 × 45.9 mm
Copper layers
2
Thickness
1.6 mm
Parts
31
Nets
21
Pads
87
Tracks, vias
128, 0
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
15 Oct 2026
Updated
30 Oct 2026

Overview

Domofon is an open-source printed circuit board by pit3k, from the pit3k/domofon-esp32 repository on GitHub. It is a 2-layer board of 55.5 × 45.9 mm with 31 parts on 21 nets, routed with 128 tracks and 0 vias.

It is built around the LTV-814, BAT85 and AQY214EH, with the LM-NP-1001-B1L, MTJ-642BX2 and P6KE220CA among its other parts. Its parts include 12 resistors, 8 capacitors, 3 diodes, 2 crystals and 1 IC. It belongs with the ESP32 and RISC-V boards of this library.

Main components

6

README

README.md

domofon-esp32 — analog intercom ↔ ESP32-C3 / ESPHome / Home Assistant

An interface that connects a classic 2-wire analog intercom handset line (Polish: domofon) to an ESP32-C3 SuperMini (HW-466B) running ESPHome, so the intercom can be used from Home Assistant.

Status: design only — not yet tested on real hardware. Schematic, single-sided PCB, BOM and firmware are complete; the board has passed KiCad DRC, but nothing has been built or measured yet.

PCB, top view with traces

Features

  • Ring detection — AC-input optocoupler (LTV-814) on the line, debounced input on GPIO3.
  • Off-hook — PhotoMOS relay (AQY214EH, 400 V) connects a load resistor and a 600:600 line transformer, just like lifting the handset. The line is forced back on-hook when a configurable limit elapses (default 60 s), whatever took it off-hook.
  • DTMF transmit — sine PWM (ESPHome component in this repo) summed and filtered, coupled through the transformer. Any DTMF sequence; the default sends "1" to open the gate.
  • DTMF receive (software) — line audio via the transformer to ADC1 (GPIO1), decoded on the ESP with a Goertzel filter bank (ESPHome component in this repo). Works only while off-hook.
  • Galvanic isolation — ESP ground never touches the line; 4 mm isolation gap + milled slot on the PCB.
  • Extra handset jack — RJ11 (J1) wired in parallel with the line.

Home Assistant entities

EntityNameWhat it does
binary_sensorDomofon dzwonekon while someone rings (50 ms on / 1.5 s off filter)
switchDomofon otwórz furtkęsends the DTMF sequence; stays on while the tones play and turns itself off when they finish (does not change off-hook)
textBrama - sekwencja DTMFdigits to dial (default 1; 0-9 * # A-D, comma = pause)
numberBrama - czas …pause before, tone length, inter-digit gap, pause after (defaults 1000 / 200 / 80 / 1000 ms)
switchDomofon off-hookmanual off-hook / on-hook (always off after reboot; also forced on-hook by the time limit)
numberDomofon - maks. czas off-hookmaximum off-hook time, any cause (default 60 s, range 10–3600 s)
eventDomofon DTMFfired for every decoded digit (0–9, *, #, A–D)
text_sensorDomofon DTMF ostatnia cyfralast decoded digit
text_sensorDomofon DTMF sekwencjadigits concatenated, cleared after 3 s silence or on-hook

Schematic

Schematic

Repository layout

text
├── README.md
├── docs/
│   ├── design-notes.md          # English summary of the circuit
│   └── design-notes-pl.md       # full design notes (Polish): netlist, pin numbers, rationale
├── hardware/
│   ├── schematic/
│   │   ├── schematic.py         # source (schemdraw)
│   │   └── schematic.svg/.png   # generated output
│   ├── pcb/
│   │   ├── domofon.kicad_pro/.kicad_pcb/.kicad_dru   # KiCad 9 project (single-sided, THT)
│   │   ├── drc-report.txt       # KiCad DRC: 0 violations, 0 unconnected
│   │   ├── README-pl.md         # PCB notes (Polish)
│   │   ├── gerbers/             # Gerber X2 + Excellon (mm) — input for CNC
│   │   ├── previews/            # PNG renders
│   │   └── scripts/             # Python/KiCad generators, autorouting, DRC, export
│   ├── bom/
│   │   ├── bom.csv              # full bill of materials
│   │   └── tme-order.csv        # original TME order (history, pre rev. 5)
│   └── enclosure/               # 3D-printed wall box (CadQuery source, STL, 3MF, STEP, previews)
├── firmware/esphome/
│   ├── domofon.yaml
│   ├── secrets.yaml.example
│   ├── intercom-package.example.yaml   # HA builder example (packages)
│   └── components/

PCB

  • Single-sided (copper on B.Cu only), all parts THT on top, 55.6 × 46.0 mm, designed for isolation milling with a 30° / 0.2 mm V-bit.
  • Rules: clearance ≥ 0.4 mm, tracks 0.6 mm (signal) / 1.0 mm (power and line), no vias, one wire jumper (JP1).
  • Low parts sit under the ESP32-C3 module → mount the module on female headers (~8–11 mm).
  • gerbers/domofon-F_Cu-jumpers_DO_NOT_MILL.gtl only models the wire jumper for DRC — do not mill it.
PlacementBottom copper (mirrored, as milled)

How to regenerate

Requirements: Python 3, schemdraw + pillow; KiCad 9 (kicad-cli and the pcbnew Python module); rsvg-convert (librsvg) for previews; optionally Freerouting 2.x + Java for re-routing.

bash
# Schematic -> hardware/schematic/schematic.svg + schematic.png
cd hardware/schematic
python3 -m venv .venv && .venv/bin/pip install schemdraw pillow
.venv/bin/python schematic.py

# PCB checks and outputs (run from anywhere)
hardware/pcb/scripts/drc.sh              # DRC -> hardware/pcb/drc-report.txt
hardware/pcb/scripts/export_gerbers.sh   # -> hardware/pcb/gerbers/
hardware/pcb/scripts/make_previews.sh    # -> hardware/pcb/previews/

# Full re-generation of the board from footprints.py / netlist.py / placement.py (optional)
FREEROUTING_JAR=/path/to/freerouting.jar JAVA=java hardware/pcb/scripts/build_and_route.sh 30
#   -> hardware/pcb/work/routed.kicad_pcb ; review, then copy to hardware/pcb/domofon.kicad_pcb

Autorouting is not deterministic; the committed domofon.kicad_pcb is the reviewed result.

Firmware

bash
cd firmware/esphome
cp secrets.yaml.example secrets.yaml   # fill in Wi-Fi credentials
esphome run domofon.yaml

The DTMF components are fetched from this repository (ref: ${git_ref}, default main) by external_components in domofon.yaml, so no extra files need to be copied.

Home Assistant (ESPHome builder, recommended)

Create a new device in the HA ESPHome builder and paste firmware/esphome/intercom-package.example.yaml. It pulls domofon.yaml as a package from main with refresh: 0s (re-fetched on every build). Add the secrets from secrets.yaml.example to the builder's Secrets. The example configures the device name, API encryption, OTA, Wi-Fi, fallback AP, and captive portal; these device-level settings are kept out of the reusable firmware package. To pin a version, set git_ref in substitutions to a commit SHA or tag; it selects both domofon.yaml and the DTMF components (default main). The HA URL defaults to http://homeassistant.local:8123; override ha_url in substitutions if needed.

Voice prompts (WAV)

Prompts are generated automatically during compilation by the dtmf_tone component: "wprowadź kod", "drzwi otwarte" and "kod nieprawidłowy" are rendered by Home Assistant's Piper TTS (tts_get_url API), and ringback is a synthesized 425 Hz tone (1 s on / 4 s off). Add to the builder's Secrets:

yaml
ha_token: "<long-lived access token>"   # HA profile -> Security -> Long-lived access tokens

Results are cached in the build directory, so rebuilds work even if HA is unreachable (the first build needs HA reachable). No WAV files are needed. Voice or language can be changed per clip with tts: {text, engine, language, voice}.

Each prompt is a switch ("Domofon głos: …"). Turning it on plays the clip and the switch turns itself off when playback finishes, so an automation can turn it on and wait for off instead of watching the diagnostic "Domofon audio aktywne" sensor. The same applies to "Domofon otwórz furtkę" (the DTMF sequence). These switches do not take the line off-hook and do not change the DTMF decoder, except the gate switch, which pauses the decoder for the duration of its own tones. "Domofon sygnał oczekiwania" is the exception: it plays ringback in a loop and stays on until something turns it off (a manual turn-off, another clip starting, or hangup — including the off-hook time limit). In YAML: dtmf_tone.play_wav: {id: dtmf_gen, name: enter_code, loop: false}; stop with dtmf_tone.stop.

Enclosure

3D-printed flat wall box: 93 × 68 × 26 mm, a base glued to the wall plus a lid held by 4 countersunk M3×10 screws in brass M3 Ø4×4 heat-set inserts. The PCB is flipped (components toward the wall) and shifted +25 mm to the right, leaving a 25.3 mm left chamber.

  • Seen from the room: the RJ11 plug sits inside the left chamber (plugged into J1), its flat cable exits through a 5 × 2.5 mm floor slot at the bottom of the left wall (sealed and pinched by a reinforced 5 mm thick plunger on the lid), the USB-C plug goes in from the top, and the wall cable comes in through a Ø12 mm hole in the back plate at (16.0; 15.5) mm.
  • Source and print files are in hardware/enclosure/. The Polish print and assembly guide is in its README.

CNC

Machine: PrintNC + Flexi-HAL (grblHAL), sender ioSender. Ready G-code lives in cnc/gcode/. Operator guide (PL): cnc/OPERATOR_GUIDE.md. Overview / regenerate: cnc/README.md. Do not mill domofon-F_Cu-jumpers_DO_NOT_MILL.gtl — solder jumper JP1 as a wire on the component side.

Safety

  • Measure the line first: idle voltage, ring voltage (DC and AC), off-hook voltage and loop current. Pick R5 to match the original handset's current (typically 20–60 mA).
  • Line side is rated for ETSI ES 201 970 / TBR21 ringing (up to 100 Vrms on DC; measured idle 42 V DC): K1 AQY214EH 400 V, TVS D2 P6KE220CA (VRWM 185 V), C5 1 µF/100 V, ring-detect DC-blocking C8 0.47 µF/250 V (replaces the former 4k7 R2, same holes). On-hook the device draws no DC (otherwise the exchange sees the line off-hook). Details: design notes.
  • Never connect the ESP ground to the intercom line. Power the ESP from an isolated 5 V USB supply.
  • Test on a bench supply through a resistor before connecting to the building installation.
  • The intercom is part of the building installation — get the administrator's consent.
  • Do not connect J1 to a public telephone line.

Datasheets

Vendor datasheets are not included in the repo; see e.g. Adam Tech MTJ-642BX2, Bourns LM-NP-1001-B1L, Liteon LTV-814, Panasonic AQY214EH, Diotec P6KE220CA, WIMA MKS2 1 µF/100 V.

Parts

31
QtyValueFootprintReferences
3220ndomofon:CFILM_P5.08C2, C3, C6
34k7domofon:R0207_P7.62R1, R10, R11
2330Rdomofon:R0207_P7.62R8a, R8b
2BAT85domofon:DO34_P5.08D4, D5
1100Rdomofon:R0207_P10.16R6b
1100Rdomofon:R0207_P7.62R6a
110kdomofon:R0207_P7.62R3
110u/16V NPdomofon:CP_D5_P2.0C4
110u/25Vdomofon:CP_D5_P2.0C1
11u/100Vdomofon:CFILM_P5.08C5
12k2domofon:R0207_P7.62R9
1330domofon:R0207_P7.62R4
1330 1Wdomofon:R0414_P15.24R5
133ndomofon:CFILM_P5.08C7
1470n/250Vdomofon:CFILM_P7.62C8
14k7 CA9Vdomofon:CA9VR7
1AQY214EHdomofon:DIP4K1
1ESP32-C3 SuperMini HW-466Bdomofon:ESPESP
1LM-NP-1001-B1Ldomofon:T1T1
1LTV-814domofon:DIP4U1
1MTJ-642BX2domofon:MTJ642J1
1P6KE220CAdomofon:DO15_P5.08_VD2
1XY308-2P 5V/GNDdomofon:XY308_2PX2
1XY308-2P LINIAdomofon:XY308_2PX1
1zworka drutdomofon:WIRE_P10.16JP1

Questions

How big is the Domofon PCB?

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

What parts does the Domofon use?

31 parts, built around the LTV-814, BAT85, AQY214EH and LM-NP-1001-B1L. 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 Domofon KiCad files?

From the pit3k/domofon-esp32 repository on GitHub, at the commit this page was made from: the board is hardware/pcb/domofon.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Domofon design in my own project?

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

Similar boards

  • 2 layers75 × 50 mmSlidersOfSociety PCB, the printed circuit board in 3D

    SlidersOfSociety PCB

    OE1KHZ/SlidersOfSociety-PCB

    A CANbus controlled closed loop motor fader module based on Microchip's PIC18F25K83

    26 partsMIT
  • 4 layers80 × 38 mmIntercat, the printed circuit board in 3D

    Intercat

    BarceP/CAT_Interface

    CAT Interface for HAM Radio, USB-C

    99 partsCERN-OHL-S-2.0
  • 2 layers99.1 × 76.2 mmSsr, the printed circuit board in 3D

    Ssr

    Miceuz/triac-bloc

    An universal power block based on triac. In essence this is a solid state relay with some bells and whistles

    39 parts54
  • 2 layers65 × 56 mmDebounce shield, the printed circuit board in 3D

    Debounce shield

    MayaPosch/DebounceHat

    Fully isolated, input debounce Hat for Raspberry Pi, for up to 6 switches, relays and powered devices

    83 parts24BSD-3-Clause
  • 2 layers25.4 × 26 mmWirelessTeleInfo, the printed circuit board in 3D

    WirelessTeleInfo

    Domochip/WTeleInfo

    Un D1 Mini et quelques composants pour envoyer votre Téléinfo (Compteur EDF) sur votre Domotique

    9 parts22
  • 2 layers21.9 × 17.1 mmAlimTeleinfoMySensors, the printed circuit board in 3D

    AlimTeleinfoMySensors

    tdouez/TeleinfoMySensors

    Interface Téléinfo pour compteur Linky avec MySensors

    14 parts14
  • 2 layers45.8 × 40.2 mmGoProControl, the printed circuit board in 3D

    GoProControl

    synfinatic/GoProControl

    GoPro WiFi controller board using an ESP8266 allowing easy integration with other circuits

    27 parts13GPL-3.0