
AAquad PCB
Fberbari/AAquad
(OUTDATED, see AAQuad-Evolution) a baremetal implementation of a multirotor flight computer.

An SPDIF Hat for the Raspberry Pi 2-X for SPDIF Communication
I2S Hat is an open-source printed circuit board by raptorlightning, from the raptorlightning/I2S-Hat repository on GitHub, published under the GPL-3.0 licence. It is a 4-layer board of 65 × 56 mm with 98 parts on 117 nets, routed with 705 tracks and 199 vias.
It is built around the 74LVC1G125DBV, SN74LV1T34DBV and LD1117S33, with the 74LVC1GU04DBV, NC7SZ157P6X and BSS138 among its other parts. Its parts include 33 resistors, 25 capacitors, 11 ICs, 5 transistors and 5 connectors. It belongs with the AVR (ATmega, ATtiny) boards of this library.
An SPDIF RX and TX I2S Hat for the Raspberry Pi 2, 3, 4, etc. -- all versions that uses the same GPIO pinout for I2S.
This project was developed as a replacement or substitute for the various DSP MCU-based processors available on the market. The goals of the project were:
To make this possible, a combination of software and hardware is required. The schematics and PCB to create the SPDIF hat are provided in KiCAD format in the "I2SHat" folder. Please modify the schematic and PCB as required for component availibility.

For the PCB, general board rules for sensitive traces should be adhered to as seen in the original design. Extra grounding pads are provided around the SPDIF receiver (WM8804) if physical shielding is needed for nearby EMI components. This has not been a problem with my own testing on a Raspberry Pi 4 Model B above the input buck converter. Some BOM cost reductions are as follows:
The other aspects of the circuit have been tested and proven. Resistor tolerances are of no concern, neither are capacitor tolerances. Regardless, don't use a 10uF Y5U 5V rated MLCC capacitor for the regulator outputs. That will violate the datasheet.
The SPDIF input and output are tested as shown to work up to 192kHz. Substituting parts (especially the IC types) is discouraged. However, substituing brands or footprints is okay. For example, on the board there is an NXP part in a very small package that is simply a 2:1 LVCMOS mux - NC7SZ157P6X, same as a 74LVC1G157. If you can find a similar part available in a bigger footprint, please edit the board and substitute. The part package size was due to current availability. Only subsitute the unbuffered and buffered inverters on the SPDIF Coaxial input for appropriate unbuffered and buffered parts from other suppliers. Please maintain phase of inputs and outputs if you substitute multi-gate chips and redesign the board.
The footprints provided for TOSLINK are for the TORX142L and TOTX142L, available currently as the Ali-sourced DLR2180 and DLT2180. Unfortunately the market for US/EU TOSLINK receivers at 25mbps bandwidth is largely dead, and the only source is Aixin. Everlight and Toshiba both no longer produce these modules. If you are sourcing from Aixin, ensure that you order a 25mbps module (DLx2xxx) to guarantee 192kHz operation (192*32(Bits/channel)*2(Channels)*2(BMC)=24.576MHz). Modify the footprints as necessary for the TOSLINK module you purchase.
There is a switch on the PCB for the receiver side to choose SPDIF coaxial or TOSLINK input. This is required but can be wired as desired, autodetection is possible, with great modification in hardware or software, but not advised. Generally, one would set up a system with this DSP in a path of specific choosing. The footprint is provided for a GW12RCP equivalent 0.1" microswitch; however, this could be wired to a front panel switch or the Nano itself with further programming and external control. Note that the silkscreen is correct for the switch, but opposite of the connected pads due to the switch mechanics.
If the HifiBerry case (https://www.hifiberry.com/shop/cases/hifiberry-universal-case-black-pi4/) is used, you will need to trim the TOSLINK devices specified. There are 192kHz (25Mbps) TOSLINK transmitters and receivers available from overseas sources in quantity without the screw mounting terminal, but the DLR2180 and DLT2180 TOXX142L equivalents generally have good availability. If you use these substitutes, trim off the screw terminal and add mechanical strength with solid-core wire through the provided holes on the board as shown. If the HifiBerry case is used, pressing down on the top of the case resets the Nano and the WM8804, which might be useful if your Pi takes longer than 45 seconds to start and you don't modify the code (see the INO). There is diode protection for the 5V supply, so you should be able to program the Nano in-circuit (no warranty...) The Pi+Hat+Nano stack is designed to fit in the HifiBerry case with a little extra filing for the TOSLINK connectors on the bottom of the cutout. Height is tight, but it does fit using the standard height board headers specified.

You will need to flash the project INO file to an Arduino Nano for control of the WM8804 and sample rate detection. The code and functionality could likely be accomplished with an ATTINY, but for the price and seeing as the footprint fits, a Nano is adequate. See the Arduino documentation for proper flashing of the INO file. Modify as you need for your purposes.
On the software side of things, the Raspberry Pi must be responsible for receiving I2S data, transmitting I2S data, and processing it in the middle. Using Ubuntu Server, with a DTS overlay for slave I2S operation:
The tested system consists of Ubuntu Server 20.04.2 LTS running on a Raspberry Pi Model 4B. Modifications are posted below:
[Unit]
Description=CamillaDSP Script Booter
After=multi-user.target
[Service]
ExecStart=/usr/bin/python3 /etc/camilladsp/startdsp.py
#ExecStart=cat
StandardOutput=kmsg
StandardError=kmsg
Restart=always
CPUSchedulingPolicy=rr
CPUSchedulingPriority=99
IOSchedulingClass=realtime
IOSchedulingPriority=0
[Install]
WantedBy=multi-user.target \# This file is intended to be modified by the pibootctl utility. User
\# configuration changes should be placed in "usercfg.txt". Please refer to the
\# README file for a description of the various configuration files on the boot
\# partition.
\#enable_uart=1
\#dtparam=audio=on
\#dtparam=i2c_arm=on
\#dtparam=spi=on
dtparam=i2s=on
cmdline=cmdline.txt
#You may need to specify chunksize (1024) and target_level (512). See default files and CamillaDSP documentation.
devices:
samplerate: 44100
chunksize: 1024
target_level: 512
capture:
type: Alsa
channels: 2
device: "hw:CARD=GenericStereoAu,DEV=1"
format: S32LE
playback:
type: Alsa
channels: 2
device: "hw:CARD=GenericStereoAu,DEV=0"
format: S32LEPlease play around with the files and let me know if you have any better ideas! At heart, I'm a hardware guy, I make the software to work for what I need but don't go beyond. If you have a better solution for the software or find any holes in my instructions, please reach out. I would like to make this as straightforward as possible for anyone to use.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 17 | 10K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R4, R6, R11, R13, R14, R15, R16, R17, R18, R19, R20, R24, R25, R28, R29, R31 +1 |
| 16 | 100n | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C14, C18, C20, C22, C24 |
| 10 | 33 | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R1, R2, R3, R5, R10, R21, R22, R23, R26, R27 |
| 5 | BSS138 | digikey-footprints:SOT-23-3 | Q1, Q2, Q3, Q4, Q5 |
| 4 | 47u | Capacitor_SMD:C_Elec_6.3x5.8 | C19, C21, C23, C25 |
| 4 | Ferrite_Bead_Small | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | FB1, FB2, FB3, FB4 |
| 4 | TestPoint | Mouser:TestPoint_NoSilk_D2.50mm_Drill1.0mm | TP4, TP5, TP6, TP7 |
| 3 | 1u | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C12, C13, C17 |
| 3 | 47uH | Inductor_SMD:L_Taiyo-Yuden_NR-24xx_HandSoldering | L1, L2, L3 |
| 3 | 74LVC1G125DBV | digikey-footprints:SOT-753 | U1, U3, U4 |
| 3 | LD1117S33 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U9, U10, U11 |
| 2 | 110 | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R32, R33 |
| 2 | 22p | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C15, C16 |
| 2 | MountingHole | MountingHole:MountingHole_2.7mm_M2.5_Pad | H1, H2 |
| 1 | 100K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R30 |
| 1 | 110 | Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder | R8 |
| 1 | 210 | Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder | R7 |
| 1 | 74LV1T04DBV | digikey-footprints:SOT-753 | U6 |
| 1 | 74LVC1GU04DBV | digikey-footprints:SOT-753 | U5 |
| 1 | 75 | Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder | R12 |
| 1 | ABMM-12.000MHZ | Crystal:Crystal_SMD_7050-4Pin_7.0x5.0mm | Y1 |
| 1 | Arduino_Nano_v3.x | Module:Arduino_Nano | A1 |
| 1 | GW12RCP | Button_Switch_THT:SW_NKK_G1xJP | SW1 |
| 1 | NC7SZ157P6X | Package_TO_SOT_SMD:SOT-363_SC-70-6 | U2 |
| 1 | RX_RCA | Mouser:CUI_RCJ-04X | J5 |
| 1 | Raspberry_Pi_2_3 | Connector_PinHeader_2.54mm:PinHeader_2x20_P2.54mm_Vertical | J4 |
| 1 | SN74LV1T34DBV | digikey-footprints:SOT-753 | U8 |
| 1 | SS1P3L-M3/84A | SS1P3L:SS1P3L-M3&slash_84A | D1 |
| 1 | TORX142L | Mouser:PLR135T9 | J1 |
| 1 | TOTX142L | Mouser:PLR135T9 | J2 |
| 1 | TX_RCA | Mouser:CUI_RCJ-04X | J3 |
| 1 | TestPoint | TestPoint:TestPoint_Pad_1.0x1.0mm | TP8 |
| 1 | TestPoint | TestPoint:TestPoint_Pad_D1.5mm | TP2 |
| 1 | WM8804 | Package_SO:SSOP-20_5.3x7.2mm_P0.65mm | U7 |
It measures 65 × 56 mm and has 4 copper layers, 1.6 mm thick.
98 parts, built around the 74LVC1G125DBV, SN74LV1T34DBV, LD1117S33 and 74LVC1GU04DBV. 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 raptorlightning/I2S-Hat repository on GitHub, at the commit this page was made from: the board is I2SHat/I2SHat.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Fberbari/AAquad
(OUTDATED, see AAQuad-Evolution) a baremetal implementation of a multirotor flight computer.




sabogalc/KiCad-Arduino-Boards
A collection of Arduino boards recreated from scratch in KiCad. Legacy USB connectors have been replaced with USB-C where applicable.


punkfab/pcb-corpus
235 real KiCad boards from open-source hardware repositories, prepared as a placement and routing benchmark
