

Phone pcb
This is a repository containing some code artifacts but mostly testing fragments for a project to develop a device to connect landline phones to other landline phones via a private VoIP network.
- Size
- 40 × 75 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 29
- Nets
- 47
- Pads
- 163
- Tracks, vias
- 191, 17
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 8.0 (file 20240108)
- Created
- 15 Jun 2024
- Updated
- 14 Dec 2025
Overview
Phone pcb is an open-source printed circuit board by kangp3, from the kangp3/phone repository on GitHub, published under the MIT licence. It is a 2-layer board of 40 × 75 mm with 29 parts on 47 nets, routed with 191 tracks and 17 vias.
It is built around the PCM1802DB and ASE-24.576MHZ-ET. Its parts include 13 capacitors, 2 resistors, 2 connectors, 1 IC and 1 crystal.
Main components
2README
README.mdphone
This is a repository containing some code artifacts but mostly testing fragments for a project to develop a device to connect landline phones to other landline phones via a private VoIP network. At time of writing of this README (July 2024) efforts are mostly focused on the design of the hardware side of the project, but this repository may come to house more complete companion software as the project grows.
Ring phone via software- Completed in ring.py
Play audio on phone speaker- Completed in wav.py
Receive audio from phone and convert to digital signal- Parse DTMF signals for dialing
- Create system for initial phone setup
- Create web app for call routing and social networking
Development Utilities
SSH
The Pi is set up with the hostname peterpi.local and can be SSH'ed to using the username recurse.
ssh recurse@peterpi.localSSH setup
sudo sed --in-place=.bak --expression='s/^#PermitEmptyPasswords no/PermitEmptyPasswords yes/g' /etc/ssh/sshd_config
sudo systemctl restart sshd
sudo passwd -d recurseDial tone generator
These commands are used to send sine wave signals to the speakers of the Pi. By correctly routing the output audio device of the Pi to "headphones" routed to pins, these signals can be sent to the phone. The following two sine waves are the frequencies used in a standard dial tone.
speaker-test -t sine -f 350 -l0
speaker-test -t sine -f 440 -l0Cross-compile to Rasppi (old stinky cross-rs way)
cross build --target=arm-unknown-linux-gnueabihfDevice Tree compile
scp phoneodeo.dts recurse@peterpi.local:
scp bootconfig.txt recurse@peterpi.local:dtc -@ -H epapr -O dtb -o phoneodeo.dtbo -Wno-unit_address_vs_reg phoneodeo.dts
sudo cp phoneodeo.dtbo /boot/overlays
sudo chown root:root bootconfig.txt
sudo chmod 755 bootconfig.txt
sudo cp bootconfig.txt /boot/firmware/config.txtInstall phreak.service
scp goertzel/phreak.service recurse@peterpi.local:
scp goertzel/phreak.timer recurse@peterpi.local:
scp goertzel/target/arm-unknown-linux-gnueabihf/release/goertzel recurse@peterpi.local:sudo chown root:root ~/phreak.service
sudo chmod 777 ~/phreak.service
sudo mv ~/phreak.service /etc/systemd/system
sudo systemctl disable phreak.service
sudo systemctl enable phreak.service
sudo chown root:root ~/phreak.timer
sudo chmod 777 ~/phreak.timer
sudo mv ~/phreak.timer /etc/systemd/system
sudo systemctl enable phreak.timer
sudo systemctl start phreak.timerInstall .asoundrc
scp asoundrc recurse@peterpi.local:.asoundrcsudo cp .asoundrc /rootSet volume
amixer sset PCM -M '40%'
sudo alsactl storeTake down Wi-Fi
sudo nmcli connection delete 'Recurse Center'; sudo rebootCross-compile
Install some cross-compilation dependencies
brew tap messense/macos-cross-toolchains
brew install arm-unknown-linux-gnueabihf
rustup target add arm-unknown-linux-gnueabihf
brew install cmake # dependency of aws-lc-sys
cargo install --force --locked bindgen-cli # dependency of aws-lc-sysNeed to pass the sysroot in order to get around this error:
--- stderr
/Users/peter/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.30.0/aws-lc/include/openssl/base.h:61:10: fatal error: 'stdlib.h' file not found
thread 'main' panicked at /Users/peter/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.30.0/builder/sys_bindgen.rs:110:10:
Unable to generate bindings.: ClangDiagnostic("/Users/peter/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aws-lc-sys-0.30.0/aws-lc/include/openssl/base.h:61:10: fatal error: 'stdlib.h' file not found\n")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtraceGot some help from these sources:
- https://stackoverflow.com/questions/65392271/macos-big-sur-11-1-cant-find-stdlib-h-w
- https://github.com/rust-lang/rust-bindgen?tab=readme-ov-file#environment-variables
- https://aws.github.io/aws-lc-rs/requirements/linux.html#linux-requirements
- https://github.com/apache/opendal/pull/5004/files
BINDGEN_EXTRA_CLANG_ARGS=--sysroot="$(xcrun --sdk macosx --show-sdk-path)" cargo build --release --target=arm-unknown-linux-gnueabihfCross-compile dialbutton
Install some cross-compilation dependencies
brew tap messense/macos-cross-toolchains
brew install x86_64-unknown-linux-gnu
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-linux-gnu-gccHelpful resources:
PATH="$PATH:/opt/homebrew/Cellar/x86_64-unknown-linux-gnu/13.3.0/bin" cargo build --release --target x86_64-unknown-linux-gnu --features http --bin dialbuttonPBX
wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz
tar -xzvf asterisk-20-current.tar.gz
cd asterisk-20.9.3
./contrib/scripts/install_prereq install &&
./configure &&
make &&
make installUpdate users
Edit pjsip.conf on the remote
asterisk -x 'module reload'Certbot
sudo apt-get update
sudo apt-get install -y snapd
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot -d pbx.frandline.com --manual --preferred-challenges dns certonly --manual-auth-hook /home/ubuntu/renew.sh
sudo sucurl -LsSf https://astral.sh/uv/install.sh | shTest:
sudo certbot renew --dry-runsocat wiring on Windows
Cygwin:
socat -t30 -T30 UDP4-RECVFROM:5060,fork UDP4:"$(wsl hostname -I | tr -d ' ')":5062 &
socat -t30 -T30 UDP4-RECVFROM:5061,fork UDP4:"$(wsl hostname -I | tr -d ' ')":5063 &ssh wiring on Windows:
PowerShell (administrator):
netsh interface portproxy add v4tov4 listenaddress=x.x.x.x listenport=22 connectaddress=$($(wsl hostname -I).Trim()) connectport=22
netsh advfirewall firewall add rule name=”Open Port 22 for WSL2” dir=in action=allow protocol=TCP localport=22Helpful links
Relevant Material
- SLIC datasheet
- gpiozero docs
- Cringely-named DT overlay
- Comment out playback and codec_out
- dai-tdm-slot-width to 24
- Add in capture_link block mclk-fs = <256>
- Add in r_codec_dai system-clock-frequency = <2560000>
Parts
29| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | 100n | Capacitor_SMD:C_0402_1005Metric | C5, C7, C9, C11, C13 |
| 4 | 10u | Capacitor_Tantalum_SMD:CP_EIA-3216-18_Kemet-A | C4, C6, C8, C10 |
| 2 | 1uF | Capacitor_SMD:C_0402_1005Metric | C2, C3 |
| 1 | 10n | Capacitor_SMD:C_0402_1005Metric | C1 |
| 1 | 1k | Resistor_SMD:R_0402_1005Metric | R1 |
| 1 | 20k | Resistor_SMD:R_0805_2012Metric | R2 |
| 1 | 470u | Capacitor_SMD:C_Elec_8x10.2 | C12 |
| 1 | ADC_{IN} | TestPoint:TestPoint_THTPad_D2.0mm_Drill1.0mm | TP8 |
| 1 | ASE-24.576MHz | Oscillator:Oscillator_SMD_Abracon_ASE-4Pin_3.2x2.5mm | X1 |
| 1 | Ag1171S | Connector_PinHeader_2.54mm:PinHeader_1x7+7_P2.54mm_Vertical | U1 |
| 1 | FR | TestPoint:TestPoint_THTPad_D2.0mm_Drill1.0mm | TP5 |
| 1 | GND | TestPoint:TestPoint_THTPad_D2.0mm_Drill1.0mm | TP9 |
| 1 | PCM1802 | Package_SO:SSOP-20_5.3x7.2mm_P0.65mm | PCM1 |
| 1 | PCM_{CLK} | TestPoint:TestPoint_THTPad_D2.0mm_Drill1.0mm | TP1 |
| 1 | PCM_{DIN} | TestPoint:TestPoint_THTPad_D2.0mm_Drill1.0mm | TP3 |
| 1 | PCM_{FS} | TestPoint:TestPoint_THTPad_D2.0mm_Drill1.0mm | TP2 |
| 1 | Phones | TestPoint:TestPoint_THTPad_D2.0mm_Drill1.0mm | TP7 |
| 1 | RJ11 | Connector_RJ:RJ11_Ckmtw_A800_Horizontal | J2 |
| 1 | RM | TestPoint:TestPoint_THTPad_D2.0mm_Drill1.0mm | TP4 |
| 1 | Raspberry_Pi_2_3 | Connector_Samtec_HLE_SMD:Liansheng_FH-00369_2x20_P2.54mm_Horizontal | J1 |
| 1 | SHK | TestPoint:TestPoint_THTPad_D2.0mm_Drill1.0mm | TP6 |
Questions
How big is the Phone pcb PCB?
It measures 40 × 75 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Phone pcb use?
29 parts, built around the PCM1802DB and ASE-24.576MHZ-ET. 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 Phone pcb KiCad files?
From the kangp3/phone repository on GitHub, at the commit this page was made from: the board is phone/phone_pcb/phone_pcb.kicad_pcb and its schematic phone/phone.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Phone pcb 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).
Similar boards
- 4 layers177 × 110 mm

- 6 layers51 × 65 mm

- 2 layers101.6 × 137.4 mm

- 2 layers70 × 64.5 mm

Clockgen main board
GDH-Technologies/cx-clockgen
Essentially a fork of Rene Wolf's `cxadc-clock-generator-audio-adc` gitlab project
17 parts1 - 4 layers50 × 90 mm

Tuner pedal
kulovac/tuner-pedal
Source for my tuner pedal project from algorithm design to PCB implementation
108 parts - 2 layers52.3 × 10.5 mm

StackLink
gusmanb/logicanalyzer
24 channel, 100Msps logic analyzer hardware and software
29 parts5.1kGPL-3.0 - 2 layers56 × 20 mm

HallEffectXY Endstop
VoronDesign/Voron-Hardware
Cool Hardware designed by the Voron Design group
29 parts1.1kGPL-3.0 - 2 layers50 × 23.2 mm

Analog
hoglet67/RGBtoHDMI
Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI
29 parts1kGPL-3.0