Skip to the content
2 layers65 × 56 mmElPiHat, the printed circuit board in 3D

EchoLink Hat for Raspberry Pi

Size
65 × 56 mm
Copper layers
2
Thickness
1.6 mm
Parts
82
Nets
80
Pads
249
Tracks, vias
377, 260
Pours
3
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
2 Sep 2020
Updated
16 Oct 2024

Overview

ElPiHat is an open-source printed circuit board by HB9UF, from the HB9UF/ElPiHat repository on GitHub. It is a 2-layer board of 65 × 56 mm with 82 parts on 80 nets, routed with 377 tracks and 260 vias.

It is built around the ATTINY10-TSH, RPM5.0-2.0 and WM8731SEDS, with the B340 and SP0502BAHTG among its other parts. Its parts include 26 resistors, 20 capacitors, 8 connectors, 5 diodes and 3 ICs. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

5

README

README.md

Introduction

Photo of assembled board

The HB9UF EchoLink Hat is a hat for the Raspberry Pi 3 and 4. It is designed to connect a transceiver to a Raspberry Pi to implement a link transceiver, but can also be used for APRS and any other application where a radio needs to be connected to a Pi. The board features a sound card, a DC/DC converter and some I/O circuitry to interface with the transceiver. A hardware timout-timer is included to clear the PTT line if the Raspberry Pi asserts PTT indefinitely.

Sound Card

The sound card is based on a Cirrus Logic WM8731SEDS Audio CODEC. The line input and line output (both stereo) are routed to JST XH connectors. The I2S bus is routed to the Raspberry Pi expansion header after series-termination with 33 Ω. The microphone input and headphone output are left unconnected, but a small header (1 mm pitch) is provided for prototyping.

The sound card works with a Raspbian stock image (see below).

DC / DC Converter

Since the transceiver will be powered from an external power supply anyway, it makes sense to derive the supply for the Pi from that same power supply. The board is therefore equipped with a RECOM RPM-2.0 2 A DC/DC converter that can be powered from a wide range of input voltages (3 V to 17 V). The output voltage can be trimmed with external resistors (R2 and R3). In Rev. 1.0 of the board, the voltage is slightly incrased to 5.1 V. Rev 1.1 further increases the voltage to 5.25 V. Make sure to read the errata below if you have Rev. 1.0. Input power is provided with a JST XH connector; a crowbar circuit takes out the 2 A SMD fuse in a reverse polarity condition. However, it is critical not to power the Raspberry Pi via the ordinary USB supply when the Hat is plugged in. Starting from Rev 1.1, the Pi can be USB-powered with the Hat inserted, but it is critical not to provide power via the DC/DC converter and the USB power supply simultaneously.

Note that the package of the RECOM part may be difficult to solder by hand, thus in case you decide to order PCBs from a board manufacturers, yu may want to order a stencil from them as well.

I/O circuitry

The PTT line is controlled with GPIO25 on the Raspberry Pi and is active high. It used to be possible to echo 25 to /sys/class/gpio/export and to then assert PTT manually using /sys/class/gpio/gpio25/value. You can still do that on recent versions of linux, but you have to add 25 to the base of gpiochip0, which turns out to be 512+25=537:

text
$ echo 537 > /sys/class/gpio/export
$ cd /sys/class/gpio/gpio537
$ echo 1 > value # Assert PTT
$ echo 0 > value # Clear PTT

However, this is not recommended anymore. Instead, you should use gpiod:

text
$ gpioset 0 25=1 # Assert PTT
$ gpioset 0 25=0 # Clear PTT

This only works as long as the pin is not exported using the deprecated sysfs interface. gpioinfo returns a summary of the current state of all gpio pins.

Asserting PTT activates a transistor configured in open-drain mode, thus the PTT pin on the JST XH connector is grounded when PTT is asserted, and Hi-Z otherwise. A 100 Ω series resistor and a diode are used for protection.

Quasselsperre is used to limit the duration for which PTT can remain active. This duration is set with the potentiometer in 15 minutes increments. Values between 15 minutes and 2 hours can be programmed. The timer is set during startup and the LED flashes once for each 15 minutes. (I.e. two flashes amount to a timer of 30 minutes). The timer is only set during startup. The LED starts to blink when the timer trips, and transmit is disabled until the Raspberry Pi clears PTT. Starting from Rev. 1.1: In case this facility is not used, the PTT input can be connected directly to the switching transistor by populating R5.

Please refer to the README file of our Quasselsperre project for further information on customizing, programming etc. In case this feature is undesired, the microcontroller can be omitted. In this case, you have to bypass the microcontroller with a jumper bridge.

The board also features a TOS line to report Tone Operated Squelch or Carrier Operated Squelch (TOS/COS) back to the Raspberry Pi. This is routed to GPIO24. There is some amount of input protection circuitry that can be used to reduce the voltage to 3.3 V. Remember that the Raspberry Pi is not 5 V tolerant.

Schematic and BOM

Here is an image of the schematic. A pdf version is available in the Release section of the github page.

Schematic

An interactive BOM is available here for Rev 1.1, and here for Rev 1.0. You can use it to populate the board and copy the BOM to the clipboard to order parts from DigiKey. Note that we keep a local stock of general purpose parts, thus we only added part numbers for specialized parts.

Setup

To enable the sound card, add the following entries to /boot/config.txt and reboot the Raspberry Pi:

text
dtparam=i2c_arm=on
dtparam=i2s=on
dtoverlay=i2s-mmap
dtoverlay=rpi-proto

Test

For the first test do not solder the connector sockets to the PCB.

Here is an image of the 40pin Pi-GPIO Connector. Schematic

(1) Connect IN to 12VDC (limited to 10mA). Measure with DMM at Pin2 on 40pin Pi-GPIO Connector:

  • There should be 5.25VDC
  • Blue PGOOD/D2 LED should be constant on
  • If measured voltage is lower (eg. 4.9VDC), look at R3
  • If there is 0VDC, look at FB1

(2) Connect a second 3.3VDC voltage (limited to 10mA) to Pin17 on 40pin Pi-GPIO Connector:

  • Red PTT/TOT/D3 LED blinks. Disconnect 3.3VDC voltage, change Poti position, connect 3.3VDC voltage again to Pin17.
  • Red PTT/TOT/D3 LED blinks different times. The red PTT/TOT/D3 LED blinks once per 15 minutes Quassesperre. Threshold can be set here with this Poti.

(3) If everything OK, solder all connecors and 40pin Pi-GPIO Connector

(4) Start Pi with 12VDC via ElPiHat (1A limit) Caution! Do not power Pi via USB simultaneously!

(5) As soon Pi has booted: a) Test COS/PTT functionality with GPIO The PTT line is controlled with GPIO25 on the Raspberry Pi and is active high:

text
$ echo 25 > /sys/class/gpio/export
$ echo out > direction
$ cd /sys/class/gpio/gpio25
$ echo 1 > value # Assert PTT
$ echo 0 > value # Clear PTT

Asserting PTT activates a transistor configured in open-drain mode, thus the PTT pin on the JST XH connector is grounded when PTT is asserted, and Hi-Z otherwise. A 100 Ω series resistor and a diode are used for protection.

b) Enable sound card by adding the following entries to /boot/config.txt and reboot the Raspberry Pi:

text
dtparam=i2c_arm=on
dtparam=i2s=on
dtoverlay=i2s-mmap
dtoverlay=rpi-proto

c) Record and (re)play samples to test audio.

  1. Start alsamixer, hit F6 and activate sound card 1 (snd_rpi_proto). Activate the Output Mixer HiFi item and set CAPTURE for the Line item.
  2. Run arecord -V stereo -fdat -D 'hw:CARD=sndrpiproto,DEV=0' > /dev/null and observe the VU meter while injecting a signal into the left and the right channel. Once this works, arecord can be used to record a sample (e.g.arecord test.wav) for playback in the next step.
  3. Play back the sample using aplay -D 'plughw:CARD=sndrpiproto,DEV=0' test.wav

License

This project is released under the terms of the CC-BY-SA license. © 2020 - 2021.

Parts

82
QtyValueFootprintReferences
75.6kResistor_SMD:R_0603_1608MetricR4, R15, R17, R23, R24, R27, R28
60.1uCapacitor_SMD:C_0603_1608MetricC3, C6, C8, C9, C11, C12
610uCapacitor_SMD:C_0805_2012MetricC1, C2, C4, C10, C18, C19
5100Resistor_SMD:R_0603_1608MetricR7, R13, R16, R25, R26
51M4Resistor_SMD:R_0603_1608MetricR1, R3, R14, R18, R29
533Resistor_SMD:R_0603_1608MetricR8, R9, R10, R11, R12
4RPi_Hat:RPi_Hat_Mounting_Hole, , ,
4220pCapacitor_SMD:C_0603_1608MetricC15, C20, C21, C22
4GNDhb9uf:GNDGND, GND, GND, GND
3Ferrite_Bead_SmallResistor_SMD:R_0603_1608MetricFB1, FB2, FB3
21uCapacitor_SMD:C_0603_1608MetricC13, C14
222pCapacitor_SMD:C_0603_1608MetricC5, C7
22N7002Package_TO_SOT_SMD:SOT-23Q1, Q2
247kResistor_SMD:R_0603_1608MetricR21, R22
2B340Diode_SMD:D_SMCD1, D5
2NPResistor_SMD:R_0603_1608MetricR2, R5
1hb9uf:Logo_silk_CC-BY-SA_10x4.5mmCC-BY-SA-LOGO
110uInductor_SMD:L_0805_2012MetricL1
112.88MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
112VConnector_JST:JST_XH_S2B-XH-A_1x02_P2.50mm_HorizontalJ1
12 AResistor_SMD:R_1210_3225MetricF1
150kPotentiometer_SMD:Potentiometer_Bourns_TC33X_VerticalRV1
1ATtiny10-TSPackage_TO_SOT_SMD:SOT-23-6U2
1HP OUTConnector_PinHeader_1.00mm:PinHeader_1x03_P1.00mm_VerticalJ8
1LINE INConnector_JST:JST_XH_S3B-XH-A_1x03_P2.50mm_HorizontalJ7
1LINE OUTConnector_JST:JST_XH_S3B-XH-A_1x03_P2.50mm_HorizontalJ6
1LOGOhb9uf:hb9uf_logo_midG***
1MICConnector_PinHeader_1.00mm:PinHeader_1x03_P1.00mm_VerticalJ5
1PGOODLED_SMD:LED_0805_2012MetricD2
1PTTLED_SMD:LED_0805_2012MetricD3
1RPM5.0-2.0Converter_DCDC:Converter_DCDC_RECOM_RPMx.x-x.0U1
1Raspberry Pi HeaderConnector_PinSocket_2.54mm:PinSocket_2x20_P2.54mm_VerticalJ3
1SP0502BAHTPackage_TO_SOT_SMD:SOT-23D4
1Symbol_OSHW-Logo_SilkScreen_07Jul2012hb9uf:Symbol_OSHW-Logo_SilkScreenOSHW
1TRXConnector_JST:JST_XH_S3B-XH-A_1x03_P2.50mm_HorizontalJ4
1UARTConnector_PinHeader_1.00mm:PinHeader_1x03_P1.00mm_VerticalJ2
1WM8731SEDSPackage_SO:SSOP-28_5.3x10.2mm_P0.65mmU3

Similar boards

  • 2 layers78.7 × 53.3 mmExternalCodec, the printed circuit board in 3D

    ExternalCodec

    lucidcoding/daisy-seed-development-kit

    A modular development kit for the Electrosmith Daisy Seed development board. Currently modules include the central breakout board, a MIDI adapter and an array of 16 potentiometers.

    26 parts29
  • 2 layers108.1 × 61.2 mmSignl, the printed circuit board in 3D

    Signl

    afms135/signl

    An Open Source Real-Time Audio Effects Processor running on Raspberry Pi

    67 parts11
  • 4 layers120 × 75 mmPortapack hackrf one, the printed circuit board in 3D

    Portapack hackrf one

    dronefpgabasedarchitecture-pizza/portapack

    Portable software-defined radio add-on for HackRF Jawbreaker

    92 parts7GPL-2.0
  • 2 layers100 × 60.3 mmDsp dev board 2layer, the printed circuit board in 3D

    Dsp dev board 2layer

    eric-wood/dsp-dev-board

    An audio-oriented dev board for the STM32F4

    74 parts
  • 4 layers61.2 × 44.1 mmSTM32+Codec, the printed circuit board in 3D

    STM32+Codec

    Nothingbutthebest1209/STM32F_Audio_Codec_PCB

    This project is designed to interface STM32F405 with the audio codec WM8731. The board supports the development of audio applications.

    70 parts
  • 4 layers50 × 60 mmWolkje brain, the printed circuit board in 3D

    Wolkje brain

    lennartquerter/euro-rack-synth

    Lenimal Github for DIY for a Eurorack Synth

    50 parts13
  • 2 layers121.9 × 61 mmTeensy41 main board v2, the printed circuit board in 3D

    Teensy41 main board v2

    fpga-theremin/theremin

    Open source digital FPGA based theremin project

    81 parts11
  • 70 × 40 mmSilent symphony, the printed circuit board in 3D

    Silent symphony

    jayis1/hacker-devices

    Full-cycle hardware designs for security research devices — each device is a subfolder with its own README, schematics, PCB layout, and software stack

    27 parts2

Questions

How big is the ElPiHat PCB?

It measures 65 × 56 mm and has 2 copper layers, 1.6 mm thick.

What parts does the ElPiHat use?

82 parts, built around the ATTINY10-TSH, RPM5.0-2.0, WM8731SEDS and B340. 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 ElPiHat KiCad files?

From the HB9UF/ElPiHat repository on GitHub, at the commit this page was made from: the board is el_pi_hat.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the ElPiHat design in my own project?

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