After finishing my 4-ways and using them for several months with a 8 channel DAC/DSP based on 4 cheap $2.00 PCM5102A boards, I decided to venture into electronics design for the first time and try to build a decent 8 channel DAC/DSP.
My system is all active, so crossover duty is performed by a Raspberry Pi 5 running CamillaDSP. The key concepts of this new DAC/DSP are:
In the next posts I'll describe each of the circuits, providing Kicad schematics and pictures of the populated boards. Here are the boards as they came from JLCPCB. Black one is the linear PSU, blue is the control circuit, green the isolator shield and the white ones the 4 DACs. Their build quality is amazing!
My system is all active, so crossover duty is performed by a Raspberry Pi 5 running CamillaDSP. The key concepts of this new DAC/DSP are:
- Modular design: Each major part has its own PCB. This increases repairability and upgradability, especially important for a first timer.
- The Raspberry Pi must not be on all the time. I've encountered corrupt file systems more than once on power losses, so I decided to add a controller circuit that will turn on/off the pi. I decided to go with an Arduino Nano for this.
- The Raspberry and the MCU circuit will be powered by a 5V 5A SMPS of good quality. A 5A linear PSU would be too expensive and/or complex for this project.
- A linear PSU with active noise cancellation will power the DAC boards, (both digital and analog parts), the galvanic isolator output side and 12V trigger out.
- To avoid noise from the Raspberry into the DAC (through I2S lines), a 6 channel galvanic isolator circuit will be part of the I2S signal path.
- There are 4 DAC boards. Each is basically a set of 8 TDA1387 in parallel (like the ones as used in ProtoDAC) with an active I/V stage using 2 NE5534 and a relay based muting circuit.
- A IEC socket with a switch, fuse and a CLC EMI filter
- A meanwell RS-25-5 SMPS (5V 5A)
- A 220VAC -> 12V-0-12VDC toroidal transformer (custom made from a local supplier)
- A Linear PSU with 3 rails (+5/+12/-12), each rail with a de-noizator active noise cancelling circuit, all on a single PCB
- A Raspberry Pi 5 running CamillaDSP and other support softwares
- An Arduino based system control board, on its own PCB
- A Raspberry Pi shield with a galvanic isolator for the I2S signal and a serial connection to the system control board
- Four TDA1387x8 stereo DAC boards, each on their own PCB
- Several minor components, like a two color LED power button, shielded cables, connectors, etc.
In the next posts I'll describe each of the circuits, providing Kicad schematics and pictures of the populated boards. Here are the boards as they came from JLCPCB. Black one is the linear PSU, blue is the control circuit, green the isolator shield and the white ones the 4 DACs. Their build quality is amazing!
Linear PSU
The Linear PSU is a 3-rail circuit. I decided to go with a single transformer and a single full bridge rectifier. The transformer is a 12-0-12 (center ground), so the positive output of the rectifier feeds the +12VDC and the +5VDC rail, and the negative feeds the -12VDC. The GND is the transformer center wire.
I am aware that using several rectifiers and even more than one transformer would be a better solution, but that would increase complexity and require more space.
Main filter capacitors (six in total) are EPCOS 4700uF 35V and all other electrolytics are ELNA RA3 capacitors. I went with SMD ceramic caps as I found them not complicated to solder and a better solution overall.
The regulation is performed by two LM317 and one LM337. Each rail has a de-noizator circuit, which is the simplest de-noizator version with no relevant mods. I would like to thank Elvee and Trileru for helping me out with the tweaks.
The 5V rail powers the I2S isolator and the DAC chips. The +12V and -12V rails power the DACs’ I/V stages. +12V rail also supplies the trigger out - I had to use the linear rail instead of an SMPS because my amplifiers do not have isolated trigger-in circuits, and I was concerned about feeding them an unfiltered SMPS signal. I tried in the past with a boost converter (5V to 12V) and it was noisy as hell.
The PCB has all tracks on the bottom (except the SMD caps) and a ground plan on the top. Kicad project is attached to this message.
The circuit and the PCB schematic:
And here are pictures of the PCB already populated
The Linear PSU is a 3-rail circuit. I decided to go with a single transformer and a single full bridge rectifier. The transformer is a 12-0-12 (center ground), so the positive output of the rectifier feeds the +12VDC and the +5VDC rail, and the negative feeds the -12VDC. The GND is the transformer center wire.
I am aware that using several rectifiers and even more than one transformer would be a better solution, but that would increase complexity and require more space.
Main filter capacitors (six in total) are EPCOS 4700uF 35V and all other electrolytics are ELNA RA3 capacitors. I went with SMD ceramic caps as I found them not complicated to solder and a better solution overall.
The regulation is performed by two LM317 and one LM337. Each rail has a de-noizator circuit, which is the simplest de-noizator version with no relevant mods. I would like to thank Elvee and Trileru for helping me out with the tweaks.
The 5V rail powers the I2S isolator and the DAC chips. The +12V and -12V rails power the DACs’ I/V stages. +12V rail also supplies the trigger out - I had to use the linear rail instead of an SMPS because my amplifiers do not have isolated trigger-in circuits, and I was concerned about feeding them an unfiltered SMPS signal. I tried in the past with a boost converter (5V to 12V) and it was noisy as hell.
The PCB has all tracks on the bottom (except the SMD caps) and a ground plan on the top. Kicad project is attached to this message.
The circuit and the PCB schematic:
And here are pictures of the PCB already populated
Attachments
System control board
I was aiming to include a set of features commonly found in most DACs and preamps, like trigger in/out, IR control (power and volume control) and others. So I decided to design a dedicated control circuit instead of using the Raspberry Pi. And, as described before, the Pi won't be on all the time to avoid issues on power losses and to decrease power consumption on standby.
The control circuit has an Arduino Nano as MCU, is powered by the Meanwell SMPS and has the following features:
The 6 pin connector (J13) is used to connect the PCB to the front of the case to the IR receiver, power button and power/standby LEDs (part of the button).
All 3.5mm trigger ports are isolated from the controller circuit by optocouplers and all relays are controlled through BJT transistors. Only the relay that controls the AC power is also isolated by an optocoupler.
Startup sequence begins when the button is pressed, 5V to 12V is provided in trigger-in or with the IR power command. Then, the following steps happen:
The agent that runs on the Pi is a node.js/typescript application that gets commands from the arduino through serial and performs a few operations:
The circuit and the PCB schematic:
And here are pictures of the PCB already populated:
I was aiming to include a set of features commonly found in most DACs and preamps, like trigger in/out, IR control (power and volume control) and others. So I decided to design a dedicated control circuit instead of using the Raspberry Pi. And, as described before, the Pi won't be on all the time to avoid issues on power losses and to decrease power consumption on standby.
The control circuit has an Arduino Nano as MCU, is powered by the Meanwell SMPS and has the following features:
- IR control. It uses a VS1838B 38kHz IR receiver, which is a very simple 3-pin component that can be connected directly to arduino pins without any extra components.
- Raspberry Pi power ON/OFF. This circuit controls the startup and shutdown of the Pi, turning it on only when necessary. There is a relay that controls the 5V Pi supply
- Linear PSU power ON/OFF. Just like the Pi, the linear PSU is turned on only when needed. So, the circuit has a relay that controls AC power to the transformer
- Trigger In: Another way to power up the DAC/DSP is via trigger in. So the circuit has a 3.5mm jack that gets from 5V to 12V to fire everything up
- Trigger Out: There are 4 3.5mm jacks that output 12V when the system is powered up. As this is a 8 channel DAC, 4 ports (one for each amplifier) are available
- Mute control: Each DAC board has a relay based mute. So the control circuit has a 5V output that is enabled when the system is enabled to play music.
- OLED display: This is an optional feature that I still don't know if I will implement. The arduino sketch is capable of controlling an I2C OLED display to show basic information, like the current volume, current depth/rate of the stream, etc. I added a connector (J1)
- Pi communication: Several of the features above require communication with the Raspberry Pi. So there is a connector from the arduino serial port to the Pi serial port.
The 6 pin connector (J13) is used to connect the PCB to the front of the case to the IR receiver, power button and power/standby LEDs (part of the button).
All 3.5mm trigger ports are isolated from the controller circuit by optocouplers and all relays are controlled through BJT transistors. Only the relay that controls the AC power is also isolated by an optocoupler.
Startup sequence begins when the button is pressed, 5V to 12V is provided in trigger-in or with the IR power command. Then, the following steps happen:
- Power on led starts blinking to tell that the startup sequence has began
- AC power relay is activated, starting up the linear PSU
- Power from the SMPS is sent to the Pi
- The arduino, which is connected to the pi through serial pins (connector J2), wait for signal from an agent that runs in the pi, telling that CamillaDSP has started
- The DACs are unmuted by commanding the mute relays (connector J4)
- Enable 12V to all 4 trigger out ports, coming from the Linear PSU (connector J7)
- Stop blinking the power LED and set it to ON
The agent that runs on the Pi is a node.js/typescript application that gets commands from the arduino through serial and performs a few operations:
- Shuts down the raspberry Pi safely
- Retrieve and send back CamillaDSP current status (running/stalled/etc)
- Gets the current CDSP volume and bitrate/depth
- Changes the volume in CDSP
- Switch the current CDSP active configuration
- Control Bass/Treble CDSP filters
The circuit and the PCB schematic:
And here are pictures of the PCB already populated:
Attachments
Isolator and serial Shield
To avoid noise from the Pi to get to the DACs, I designed an isolator circuit that relies on a SI8660AB 150Mbps 6 channel galvanic isolator chip. This chip gets BCK, LCK and 4 DATA pins from the Pi GPIO, through 220 ohms resistors, and outputs these signals in a new isolated circuit, powered by the linear PSU (connector J3).
The PCB has a ground plane on the bottom that is connected to the Pi GND. The top has two ground planes, one for each side of the circuit. I forgot to add a GND pin in the 4 output I2S connectors(J4, J5, J6 and J7), which can turn into a problem. Both circuits are powered by the same PSU, but the lack of ground in the wire can cause noise, I guess. Time will tell.
This shield also has a connector that allows serial communication with the control circuit. TX, RX and also another GPIO pin, that outputs 5V when the pi has booted up, are in this connector.
The circuit and the PCB schematic:
And here are pictures of the PCB already populated (connected to an older Pi 3b for testing)
To avoid noise from the Pi to get to the DACs, I designed an isolator circuit that relies on a SI8660AB 150Mbps 6 channel galvanic isolator chip. This chip gets BCK, LCK and 4 DATA pins from the Pi GPIO, through 220 ohms resistors, and outputs these signals in a new isolated circuit, powered by the linear PSU (connector J3).
The PCB has a ground plane on the bottom that is connected to the Pi GND. The top has two ground planes, one for each side of the circuit. I forgot to add a GND pin in the 4 output I2S connectors(J4, J5, J6 and J7), which can turn into a problem. Both circuits are powered by the same PSU, but the lack of ground in the wire can cause noise, I guess. Time will tell.
This shield also has a connector that allows serial communication with the control circuit. TX, RX and also another GPIO pin, that outputs 5V when the pi has booted up, are in this connector.
The circuit and the PCB schematic:
And here are pictures of the PCB already populated (connected to an older Pi 3b for testing)
Attachments
DACs
Finally, the DAC boards. I designed and built 4 DAC identical boards.
The DAC is inspired by the famous ProtoDAC, which is based on a TDA1541 replacement - a small PCB that has 8 TDA1387 in parallel. There are 220 ohms resistors in the I2S signal path, between the connector and the TDAs.
However, I decided to take a different route on the I/V stage. Instead of a passive approach, I used a simple NE5534 based I/V stage, one for each channel (L/R), with a 1k ohm feedback resistor and the usual decoupling capacitors. This gives me about 2V RMS at 0db with a 1Khz sine wave signal.
The boards are powered by +5V (DAC chips), +12V and -12V (I/V stage) from the linear PSU.
All ceramic capacitors required by the opamps are SMD, and decoupling electrolytic capacitors are ELNA RA3. The coupling capacitors are 4.7uF Jantzen standard Z-Caps. The price difference to a Superior Z-cap scared me and, as I am aiming for a decent but not necessarily ultra high end system, these caps felt good enough.
A relay based mute circuit stays between the coupling caps and the RCA connectors, which are also soldered to the PCB.
The circuit and the PCB schematic:
And here are pictures of the PCB already populated (Z-Caps not soldered yet)
Finally, the DAC boards. I designed and built 4 DAC identical boards.
The DAC is inspired by the famous ProtoDAC, which is based on a TDA1541 replacement - a small PCB that has 8 TDA1387 in parallel. There are 220 ohms resistors in the I2S signal path, between the connector and the TDAs.
However, I decided to take a different route on the I/V stage. Instead of a passive approach, I used a simple NE5534 based I/V stage, one for each channel (L/R), with a 1k ohm feedback resistor and the usual decoupling capacitors. This gives me about 2V RMS at 0db with a 1Khz sine wave signal.
The boards are powered by +5V (DAC chips), +12V and -12V (I/V stage) from the linear PSU.
All ceramic capacitors required by the opamps are SMD, and decoupling electrolytic capacitors are ELNA RA3. The coupling capacitors are 4.7uF Jantzen standard Z-Caps. The price difference to a Superior Z-cap scared me and, as I am aiming for a decent but not necessarily ultra high end system, these caps felt good enough.
A relay based mute circuit stays between the coupling caps and the RCA connectors, which are also soldered to the PCB.
The circuit and the PCB schematic:
And here are pictures of the PCB already populated (Z-Caps not soldered yet)
Attachments
Well, that is it for now.
The software (both arduino sketch and Raspberry Pi agent) are still in progress.
And, after that, I have to design and build a case for it. I have two paths to follow: a standard aluminum case, which is clean and professional; or a wood based case, using the same finish as I used in my 4-ways, with a black aluminum front plate.
I'll update this post with the progress.
The software (both arduino sketch and Raspberry Pi agent) are still in progress.
And, after that, I have to design and build a case for it. I have two paths to follow: a standard aluminum case, which is clean and professional; or a wood based case, using the same finish as I used in my 4-ways, with a black aluminum front plate.
I'll update this post with the progress.