
Analog Frontend
kelu124/Analog_Frontend
An analog circuit that consists of a transmitter and receiver for an ultrasound system.

A digital audio interface in the shape of a Raspberry Pi Hat for AES42 microphones and more.
AES42HAT is an open-source printed circuit board by s13n, from the s13n/AES42HAT repository on GitHub. It is a 6-layer board of 65 × 55.8 mm with 232 parts on 266 nets, routed with 2,502 tracks and 405 vias.
It is built around the LPC865M201JHI48/0E, SN74LV1T125DCK and TLV61046ADBV, with the PAM2306AYPKE, 74HCT4053D and MIC4417 among its other parts. Its parts include 80 resistors, 72 capacitors, 26 ICs, 19 diodes and 10 inductors. It belongs with the audio and music and interfaces and adapters boards and the NXP (LPC, Kinetis, i.MX RT) boards of this library.
The AES42HAT is a Raspberry Pi compatible HAT with up to 4 channels of AES3/AES42 interface. At present it is a work in progress.
AES3 is the stereo digital audio interface for professional applications, which is compatible to some extent with SPDIF as used on consumer gear.
AES42 is building on AES3 to provide power and control for digital microphones.
Depending on what is fitted on the board, AES42HAT supports up to 4 stereo channels of input/output, with or without SRC on input, and with or without external synchronization.
Raspberry Pi models up to the Raspberry Pi 4B, and various clones, support only one stereo channel in/out. The Raspberry Pi 5 supports the full set of 4 stereo channels. The BeagleY-AI also supports 4 stereo channels in/out.
The 4 inputs and outputs are available on a header that supports the "Tascam pinout" (or AES59 pinout) for a 25-pin SubD connector for multichannel digital input/output. A standard IDC cable adapter between the header and the SubD connector is needed.
The design supports different variants, depending on which parts are fitted on the board. This allows a tradeoff between cost and feature set, depending on user's needs.
See the schematics for the function blocks that can be omitted if desired. The bare minimum consists of the parts that are shown outside of an optional block.
The Raspberry Pi uses the ID EEPROM to determine the build variant.
The minimum build uses a DIX4192 for U10, and omits everything in the optional blocks. It provides a stereo input/output in AES3 format, without SRC. It is compatible with most Raspberry Pi models and some clones, provided they feature a PCM interface on the standard pins, and a finely adjustable clock source on GCLK0. It offers minimal cost for stereo applications that don't need AES42 support or SRC.
The lack of SRC means that there are only two sensible clocking options:
In both cases input and output use the same clock, i.e. they are synchronous to each other.
The lack of a clock synthesizer means that the HAT is dependent on the Raspberry Pi for a clock source. The original Raspberry Pi contains finely tunable PLLs which can output a clock signal on GCLK0 that acts as a clock master. If a clone doesn't support this, it won't work.
The lack of a control processor means that the DIX4192 is configured and controlled directly by the Raspberry Pi through its SPI0 interface.
This is the AES42HAT lite with an SRC4392 for U10, plus the clock synthesizer.
This adds the capability of using SRC on input, so the input clock can be independent from the output clock. The presence of a clock synthesizer eliminates the dependency on the Raspberry Pi clock generator, and adds a separate wordclock input and output to support synchronization.
The clock syntheziser may also be slaved to a 10 MHz reference input as commonly used in measurement equipment and frequency references. This can be used for measurement purposes, or for creating audio clocks from GPS receivers and highly stable oscillators.
The clock synthesizer is controlled by the Raspberry Pi through its I2C bus.
This adds 3 more stereo channels to the AES42HAT stereo to form a bidirectional 8-channel interface. SRC is supported on all channels by virtue of 3 more SRC4392 chips, so that each input can run on its own clock, while all outputs share a common clock generated by the local clock synthesizer.
The addition of more channels also requires the local control processor. The SPI0 interface on the Raspberry Pi is no longer needed. All control is done via the I2C bus, with the control processor managing the multiple channels.
Any of the input channels can be used as a synchronization source, instead of the separate wordclock input.
The usage of a Raspberry 5 or a BeagleY-AI is needed to handle all the audio channels.
This adds AES42 compatible phantom power and remote control capability to all 4 stereo input channels of the AES42HAT octal. All synchronization modes of AES42 are supported, and the microphones can be remote controlled, independently for each of the 4 inputs.
This requires a power supply that can deliver the necessary current for powering the microphones in addition to the Raspberry Pi with the HAT. It is recommended to use a 25W power supply capable of delivering 5A@5V to the Raspberry Pi 5. Appropriate cooling should be provided.
The local control processor takes care of the AES42 specifics, and the Raspberry Pi controls and monitors it via I2C.
If the goal is to merely power and control AES42 microphones, whose audio signal is made available on the AES3 outputs, with no intent to process the audio with the Raspberry Pi, then a cheaper/smaller Raspberry Pi can be used, for example a Pi Zero 2. When intending to process the audio with the Raspberry Pi, use a Raspberry Pi 5 or a BeagleY-AI.
The AES42HAT is powered through the HAT connector's 5V supply. Only the board ID EEPROM (U3) is powered from the 3.3V supply on the HAT connector (J1). A dual DC/DC converter (U4) generates local 3.3V and 1.8V rails for most of the electronics on the board. The DC/DC converter is enabled by the 3.3V supply from the HAT connector, so when the Raspberry Pi is powered down, the AES42HAT is also powered down, even though the 5V rail may remain on.
The Raspberry Pi is responsible for lifting the RESET line after powerup, otherwise the AES42HAT will remain in reset due to R5 pulling down the RESET line. The ID EEPROM can be accessed regardless if the board is in reset or not.
The 8-channel variants of the AES42HAT have a local control processor (U1) fitted, which configures and controls the receivers and transmitters, and handles the phantom powering, the remote control and the synchronization of the AES42 interfaces.
The Raspberry Pi accesses the control processor primarily through I2C, using pins 3&5 on the HAT connector. The Raspberry Pi controls this interface, and the AES42HAT is the target. The communication protocol is TBD.
There is also a UART connection between the Raspberry Pi and the control processor on pins 8&10. This connection can be used for updating the firmware of the control processor from the Raspberry Pi. It may also be used during normal operation for a console-like communication interface. The details are TBD.
There is an additional signal on Pin 26 of the HAT connector (REQ/ISP), which serves two purposes:
When the control processor is fitted, the Raspberry Pi's own SPI interface on HAT connector pins 19,21,23&24 is not used and must be disabled.
The clock synthesizer supports generating arbitrary audio clock frequencies, and to reference them to an external clock source. This provides considerable flexibility in setting up the clocking structure of a system. The following features are supported:
All those features are controlled from software. The clock synthesizer is connected to the I2C bus (HAT connector pins 3&5) that is controlled by the Raspberry Pi. It produces two output clocks:
The MCLK frequency should be between 10 and 25 MHz. For a single-speed sampling rate up to a nominal 48 kHz, MCLK should be 512 * Fs. For a double-speed rate up to 96 kHz it should be 256 * Fs. For a quad-speed rate up to 192 kHz it should be 128 * Fs. The dividers in U10 must be set up to divide this down to the right bit clock and word clock.
The clock synthesizer has a separate synchronization input that is driven by the RCLK signal. Its use is optional, determined by software.
The RCLK signal can be fed from different sources:
The clock syntheizer can be a CS2000 (obsolete), a CS2500 or a THAT7200. Its I²C address is 0x4F (0x9E for write, 0x9F for read).
Decoding and encoding of the AES3 signal is done by U10 (on 8-channel variants also U20, U30 and U40). There are three pin-compatible chips that can be fitted alternatively:
Whichever chip is fitted, most of the functionality is the same. It has an extensive register set for controlling the details of operation, which is accessed through an SPI compatible interface.
When the local control processor is fitted, it is in control of the SPI interface used to configure and control the receivers/transmitters.
The chips have flexible internal signal routing and clocking, which is set up through the SPI control interface. Routing and clocking is set up as follows:
Each receiver/transmitter has 4 GPO pins that have programmable functionality. On the AES42HAT, they are used as follows:
If the intended functionality of GPO3&4 is not required, other signals may be chosen to be fed to the control processor.
Each receiver/transmitter can generate an interrupt signal. The interrupt signal is handled by the control processor, if it is fitted. Otherwise the interrupt from U10 is fed to the Raspberry Pi on HAT connector pin 26.
AES42 defines a way of powering a connected microphone using a 10 V phantom power scheme. Additionally, remote control signals can be sent to the microphone by modulating them on top of the phantom power. The "AES42HAT microphone", the fully featured variant, supports both.
Phantom power is generated by a DC/DC converter (U51, U61, U71, U81). Each input can be powered separately, controlled by GPO1 of the respective receiver/transmitter. The DC/DC converter works from the +5V rail, and each circuit potentially draws up to 600mA from this rail, depending on the load represented by the microphone that is connected. The power supply used must be able to deliver this amount of current.
The control processor can monitor the phantom voltage through signals PVx, so it can diagnose short circuits or overload.
Remote control using AES42 Mode 2 is handled by raising the phantom voltage for each pulse generated. This is achieved by temporarily switching the DC/DC converter to output 12 V instead of 10 V. Edge speed is shaped by an additional driver (U52, U62, U72, U82).
Mode 3 is supported by a different circuit built from a signal transformer (L50, L60, L70, L80) driven by a bandpass amplifier (U53, U63, U73, U83). It is based on a clock signal WCLK generated by the control processor.
For both modes, the modulating signal (MODx) is generated by the control processor. Switches (U50, U60, U70, U80) are used to select between the two modes, depending on signals M3x sourced by GPO2 of the receiver/transmitter.
An LED shows the presence of phantom power on each channel. Its brightness is modulated by the remote control pulses.
The control processor must be fitted if any of U20, U30 or U40 are fitted. It must also be fitted when the AES42 circuitry is fitted.
The clock synthesizer is controlled by the Raspberry Pi and can be fitted without the control processor. The clock synthesizer is independent from any other function block and can be fitted or omitted, regardless of which other options are fitted. However, if not fitted, the Raspberry Pi must supply the audio master clock (GCLK0).
The AES42HAT is fully compatible with the Raspberry Pi 5, including support for up to 8 channels of audio input and output.
Previous models of the Raspberry Pi up to the 4B only support stereo audio. The 8-channel variants of AES42HAT can therefore not be fully supported, i.e. the audio signals of the additional channels can't be accessed by the Raspberry Pi. The additional channels can be controlled and configured, however, so it is possible to support use cases where the audio signals need not be touched by the Raspberry Pi (for example using pass-through from input to output, without or with SRC).
Raspberry Pi clones may or may not support the PCM interface, so it is up to the user to check compatibility. In many cases only stereo is supported, if at all.
The BeagleY-AI is a clone that can support all 8 channels, albeit with some special arrangements. The pin assignment for the PCM interface is only partly compatible with the Raspberry Pi 5, and AES42HAT contains some additional wiring to make up for the difference.
With the BeagleY-AI, the McASP0 is used for all the input signals with up to 8 channels. The output channels are generated by McASP1 and McASP2 in SPDIF transmit mode. The latter is necessary because of limitations of clock signal connectivity. The input multiplexers in the receivers/transmitters are used to route the output signals directly to the balanced line driver, bypassing the DIT block. To deal with wiring differences for input channels, audio port B is used on U30 and U40.
The Espressif ESP32-P4 is a microcontroller with a dual-core RISC-V CPU and a rich set of peripherals, including I2S and 100 MBit/s Ethernet. It appears to have some potential for a very low cost platform for low-end networked audio devices, below the price point of a Linux-based solution. Its evaluation board has a set of GPIO signals routed to a Raspberry Pi HAT connector. This opens the possibility to use the AES42HAT as an audio interface.
The ESP32-P4 has 3 I2S function blocks that can be freely assigned to GPIO pins, and it includes a PLL dedicated for audio. It therefore should be able to work with the AES42HAT directly, with no need for a wiring change. At the time of writing, the information available for the ESP32-P4 is sparse, hence the suitability is somewhat unclear at this point, but it certainly looks promising.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 31 | 100n | Capacitor_SMD:C_0402_1005Metric | C10, C12, C13, C14, C15, C16, C20, C22, C23, C24, C25, C26, C30, C32, C33, C34 +15 |
| 10 | 3k9 | Resistor_SMD:R_0402_1005Metric | R1, R2, R4, R5, R14, R24, R34, R44, R90, R92 |
| 8 | 100R | Resistor_SMD:R_0402_1005Metric | R11, R21, R31, R41, R50, R60, R70, R80 |
| 8 | 74930030 | AES42HAT:Transformer_Wuerth_74930030 | T1, T2, T3, T4, T5, T6, T7, T8 |
| 6 | 10p | Capacitor_SMD:C_0402_1005Metric | C59, C69, C79, C89, C91, C92 |
| 6 | 4µ7/10V | Capacitor_SMD:C_0603_1608Metric | C1, C2, C51, C61, C71, C81 |
| 6 | 680k | Resistor_SMD:R_0402_1005Metric | R8, R9, R52, R62, R72, R82 |
| 5 | 1n | Capacitor_SMD:C_0402_1005Metric | C56, C66, C76, C86, C93 |
| 5 | 470R | Resistor_SMD:R_0402_1005Metric | R12, R22, R32, R42, R91 |
| 4 | 0µ1 | Capacitor_SMD:C_0402_1005Metric | C11, C21, C31, C41 |
| 4 | 10k | Resistor_SMD:R_0402_1005Metric | R58, R68, R78, R88 |
| 4 | 10µ | Inductor_SMD:L_Wuerth_MAPI-2512 | L51, L61, L71, L81 |
| 4 | 110R | Resistor_SMD:R_0402_1005Metric | R10, R20, R30, R40 |
| 4 | 12k | Resistor_SMD:R_0402_1005Metric | R16, R26, R36, R46 |
| 4 | 150R | Resistor_SMD:R_0402_1005Metric | R96, R97, R98, R99 |
| 4 | 15k | Resistor_SMD:R_0402_1005Metric | R59, R69, R79, R89 |
| 4 | 1n5 | Capacitor_SMD:C_0402_1005Metric | C55, C65, C75, C85 |
| 4 | 1µ | Capacitor_SMD:C_0402_1005Metric | C50, C60, C70, C80 |
| 4 | 1µ5 | Capacitor_SMD:C_0603_1608Metric | C53, C63, C73, C83 |
| 4 | 2k | Resistor_SMD:R_0402_1005Metric | R56, R66, R76, R86 |
| 4 | 2k2 | Resistor_SMD:R_0402_1005Metric | R54, R64, R74, R84 |
| 4 | 2µ2 | Capacitor_SMD:C_0603_1608Metric | C52, C62, C72, C82 |
| 4 | 48k7 | Resistor_SMD:R_0402_1005Metric | R53, R63, R73, R83 |
| 4 | 4k7 | Resistor_SMD:R_0402_1005Metric | R55, R65, R75, R85 |
| 4 | 59k | Resistor_SMD:R_0402_1005Metric | R51, R61, R71, R81 |
| 4 | 6k2 | Resistor_SMD:R_0402_1005Metric | R57, R67, R77, R87 |
| 4 | 74HCT4053 | Package_SO:TSSOP-16_4.4x5mm_P0.65mm | U50, U60, U70, U80 |
| 4 | BZX884B5V1L | Diode_SMD:D_0402_1005Metric | D53, D63, D73, D83 |
| 4 | MIC4417 | Package_TO_SOT_SMD:SOT-143 | U52, U62, U72, U82 |
| 4 | Red | LED_SMD:LED_0402_1005Metric | D12, D22, D32, D42 |
| 4 | SMF15A | Diode_SMD:D_SMF | D52, D62, D72, D82 |
| 4 | SRC4392xPFB | Package_QFP:TQFP-48_7x7mm_P0.5mm | U10, U20, U30, U40 |
| 4 | TLV61046ADB | Package_TO_SOT_SMD:SOT-23-6 | U51, U61, U71, U81 |
| 4 | TLV9052S | Package_SO:MSOP-10_3x3mm_P0.5mm | U53, U63, U73, U83 |
| 4 | Würth 74488540250 | AES42HAT:Coupled_Choke_Wuerth_74488540250 | L50, L60, L70, L80 |
| 4 | Yellow | LED_SMD:LED_0402_1005Metric | D54, D64, D74, D84 |
| 3 | 1k5 | Resistor_SMD:R_0402_1005Metric | R25, R45, R94 |
| 2 | 10µ/6V3 | Capacitor_SMD:C_0603_1608Metric | C3, C4 |
| 2 | BAV99T | Package_TO_SOT_SMD:SOT-523 | D93, D94 |
| 2 | DNP | Resistor_SMD:R_0402_1005Metric | R15, R17 |
| 1 | 10 MHz | Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mm | Y1 |
| 1 | 100p | Capacitor_SMD:C_0402_1005Metric | C90 |
| 1 | 1k | Resistor_SMD:R_0402_1005Metric | R3 |
| 1 | 2p | Capacitor_SMD:C_0402_1005Metric | C94 |
| 1 | 2µ2 | Inductor_SMD:L_Wuerth_MAPI-2010 | L4 |
| 1 | 4µ7 | Inductor_SMD:L_Wuerth_MAPI-2512 | L3 |
| 1 | 51R | Resistor_SMD:R_0402_1005Metric | R93 |
| 1 | AESA | TestPoint:TestPoint_Pad_D1.0mm | TP1 |
| 1 | AESB | TestPoint:TestPoint_Pad_D1.0mm | TP2 |
| 1 | AESC | TestPoint:TestPoint_Pad_D1.0mm | TP3 |
| 1 | AESD | TestPoint:TestPoint_Pad_D1.0mm | TP4 |
| 1 | AT24CS32-STUM | Package_TO_SOT_SMD:SOT-23-5 | U3 |
| 1 | CS2000-CP | Package_SO:MSOP-10_3x3mm_P0.5mm | U2 |
| 1 | Conn_01x03_Male | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J8 |
| 1 | Conn_02x13_Odd_Even | Connector_IDC:IDC-Header_2x13_P2.54mm_Vertical | J2 |
| 1 | Green | LED_SMD:LED_0402_1005Metric | D91 |
| 1 | LPC865M201JHI48 | Package_DFN_QFN:QFN-48-1EP_7x7mm_P0.5mm_EP5.1x5.1mm | U1 |
| 1 | PAM2306AYPKE | Package_DFN_QFN:WDFN-12-1EP_3x3mm_P0.45mm_EP1.7x2.5mm | U4 |
| 1 | RDYA | TestPoint:TestPoint_Pad_D1.0mm | TP5 |
| 1 | RDYB | TestPoint:TestPoint_Pad_D1.0mm | TP6 |
| 1 | RDYC | TestPoint:TestPoint_Pad_D1.0mm | TP7 |
| 1 | RDYD | TestPoint:TestPoint_Pad_D1.0mm | TP8 |
| 1 | Raspberry_Pi_2_3 | local:Raspberry_Pi_HAT | J1 |
| 1 | Ref | Connector_Coaxial:U.FL_Hirose_U.FL-R-SMT-1_Vertical | J93 |
| 1 | SN74LV1T125DCK | Package_TO_SOT_SMD:SOT-353_SC-70-5 | U6 |
| 1 | SN74LVC1T45DRL | Package_TO_SOT_SMD:SOT-563 | U5 |
| 1 | WCK In | Connector_Coaxial:U.FL_Hirose_U.FL-R-SMT-1_Vertical | J94 |
| 1 | WCK Out | Connector_Coaxial:U.FL_Hirose_U.FL-R-SMT-1_Vertical | J98 |
| 1 | WP | TestPoint:TestPoint_Pad_D1.0mm | TP10 |
| 1 | XO | TestPoint:TestPoint_Pad_D1.0mm | TP9 |
It measures 65 × 55.8 mm and has 6 copper layers, 1.6 mm thick.
232 parts, built around the LPC865M201JHI48/0E, SN74LV1T125DCK, TLV61046ADBV and PAM2306AYPKE. 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 s13n/AES42HAT repository on GitHub, at the commit this page was made from: the board is hw/AES42HAT.kicad_pcb and its schematic hw/AES42HAT.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask s13n before reusing the design.

kelu124/Analog_Frontend
An analog circuit that consists of a transmitter and receiver for an ultrasound system.

Kofen/PoE_Ethernet_GPIB_Adapter
This folder contains the necessary hardware files for the PoE Ethernet GPIB Adapter project.



L0czek/rakieta
The starter board provides the ignition impulse to fire the engine. It includes an I2C IO expander and an 8-channel digital comparator to require a correct safety byte/address to be present before firing.


tebl/C64-Joystick-Switcher
Wanted a joystick switcher for my Commodore 64, so I built one by adapting C64 Mega Switcher for use with Atari-style joysticks.

tebl/C64-Mega-Switcher
Adapter for using Sega Mega Drive/Genesis controllers on a C64, with builtin port switcher so no more cable switching!