• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Is there any multichannel DAC easy to DIY in 2023?

OP
M

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,659
Likes
2,273
It is true that I saw increases in distortion, but I also saw increases in noise.

With the silent switcher + LDO power supply noise went from -113 dB to -108 dB going from 2 channels driven to 8 channels driven. That was after I had optimized the power supply wiring. Before optimizing the wiring, noise was worse than -100 dB with 8 channels driven. More than the numbers your noise floor shape looks suspicious to me.

Just saying I wouldn't discount the difference in -60 dBFS and -15 dBFS noise floor as measurement artifacts as this point, they look real to me.

Michael
tested quickly with only 2 channels on (the two that drive the balanced channel i use to measure). Exactly same result both in terms of THD and noise.
Curiously, in all cases, for each dB you bring the signal down, the noise goes 1 dB down (roughly), until it stabilizes at -110 dB.
I am sure there is something wrong in my setup or parameters, what would not be surprising tbh
 
OP
M

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,659
Likes
2,273
tested now with the soundblaster xfi HD. Much less room to observe the phenomenon, but i believe something similar happens: Same -85dB noise at 0dB fundamental, lowers to -92 dB when i lower the volume and with this card settles there.

Used a different tone at 200 Hz. Distorsion is not as good but noise doesn't change, stays at -96 dB no matter the volume that i play the tone no, doesnt change at the beginning, but if i go to -60 dB also goes down to < -100 dB, obviously
 
Last edited:
OP
M

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,659
Likes
2,273
@mdsimon2 you might be into something. I repeated the tests with a different power supply for the DAC (until now i was powering it from the raspberry pi USB, and i changed for a random phone charger, and both noise and distorsion went a few dB worse when measuring the fundamental at -60 dB. Will try to find a few different ways to power the DAC and see how it affects the results.

And i was so happy with the pi filter i put at the power input....
 

meooms

Member
Joined
Mar 12, 2021
Messages
28
Likes
18
@meooms , the distorsion coeficient at work :D:

View attachment 314601
That is great. So happy to see distortion o_O;) THD is under the noisefloor in your current implementation, but nice to see it work.

Did you write LSB to the first register and use
LSB = value & 0xff
MSB = value >> 8
like @voodooless suggested?

When I have the time I'll try to get it to work here too. I have a Cosmos ADC but never got it to work with my pc and usb isolator (a known problem). Recently changed my DAC to balanced so maybe I can get it to work now without needing usb isolation due to ground loops.
 
  • Like
Reactions: MCH
OP
M

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,659
Likes
2,273
That is great. So happy to see distortion o_O;) THD is under the noisefloor in your current implementation, but nice to see it work.

Did you write LSB to the first register and use
LSB = value & 0xff
MSB = value >> 8
like @voodooless suggested?

When I have the time I'll try to get it to work here too. I have a Cosmos ADC but never got it to work with my pc and usb isolator (a known problem). Recently changed my DAC to balanced so maybe I can get it to work now without needing usb isolation due to ground loops.
Hi @meooms
I have no idea how the coefficients work, other than the formula in the datasheet that doesn't tell much. The values the datasheet suggests as example for C2 are 0x68 (104 in decimal) in register 111 and 0x01 in register 112 (MSB). I first tried those and could not measure any difference. Then i tried (just randomly) 104 in both registers 111 and 112 and i got this:
1695830689914.png

i also tried 128 in both registers and got a similar result.

Then i tried 128 in both registers 113 and 114 for C3 as well, and indeed the third harmonic also increased:
1695830848316.png


To write those registers i don't follow any special sequence other than write the LSB first. As i use a raspberry pi for the moment, i write all the registers using smbus2 in a python script, that section of the script looks like this. The numbers in red are only a note to remember the sugestions of the datasheet. The script just write the numbers in the sequence that they are written. I can see they are indeed written as they should just checking with i2cdump. It works fine. (note that smbus uses the registers in decimal, and note as well that i write the registers for both sets of channels as for measurements i am using balanced outputs that are a combination of channels 5&6 and 7&8)

1695831092257.png


Now, if someone knows how to select meaningful values for the coefficients, i would like to know, as if i understand it right, besides playing with "tube sound", they can also be used to reduce the distorsion.
 
Last edited:
OP
M

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,659
Likes
2,273
Another thing i need to figure out and that i know nothing about is to calculate the impedance matching circuit of the wifi antenna. From what i understand, this is done mostly empirically, like test and see what works better (??). Is there a way to calculate at least a starting point?

I made the trace to the antenna and chose the thickness of the PCB in a way the impedance is 50 Ohm, as recommended by the datasheet and left footprints for a capacitor-inductor-capacitor, but now what? i don't think i have the means, know how and patience to start soldering and desoldering capacitors until it works best. The datasheet of the ESP32 does not help, just says something like "values to be determined".... any hints??
and we have wifi!
Without populating the capacitors in the impedance matching circuit of the antenna, i get -59 dB signal from my router. Not impressive. A commercial esp32-c3 dev board with a similar chip antenna gives -55 dB.
will start testing capacitors to try to improve the result. i saw schematics where they use values of 3.3 pF or 4.7 pF, will start there.
my DAC board;
1695990594940.png

commercial dev. board with chip antenna:
1695990642174.png


I think I will go for something like this for the volume control to start with (with a safety max value)

1696010414384.png
 
Last edited:

gordoste

Member
Joined
Nov 19, 2023
Messages
33
Likes
29
This thread is very interesting to me... I am looking to do almost the same thing. I'm using Raspberry Pi with Camilla DSP, but there is not really any nice non-USB option for multichannel audio output. Currently I am using a HDMI extractor (Suptronics X6000 7.1) but it seems to have occasional channel syncing issues - it's still usable, but quite annoying.
Raspberry Pi 5 should have 8ch I2S output (it is mentioned in the RP1 datasheet but not in any Pi5 document, and it's unverified). I was considering making a Pi HAT based around ES9017 (because it's cheap, has H/W mode and pins I can solder :)) and came across this thread.
 
  • Like
Reactions: MCH
OP
M

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,659
Likes
2,273
Thanks and good luck with your project!
I have left this in the drawer temporarily because I have other things going on but I plan to finish one day. I even got a touch display from AliExpress but don't feel tempted to start messing with the software.
Yes, the pi 5 is very promising. If I knew it was coming I would had adopted a hat form factor.
I don't regret going for a software mode DAC though, it gives more flexibility and things like the volume control can be handy. I would recommend you to think about it, most specially if you are thinking about building a hat for a raspberry, as you will be able to control everything with the same raspberry quite easily.
And keep us posted about your progress if you decide to go for it!
 

gordoste

Member
Joined
Nov 19, 2023
Messages
33
Likes
29
I am going to just hook up volume knob to the Pi and do volume in CamillaDSP as that is my active crossover in my system (that’s why I need 8 channels - 2 each of tweeter/mid/bass/monitor).
Fitting power, DAC, output stage and isolation (pi is very noisy) onto hat might be tricky, I just found AD1934 which has SE outputs… this might make things a little bit easier and then I can include 2 input channels as well.
 
  • Like
Reactions: MCH

gordoste

Member
Joined
Nov 19, 2023
Messages
33
Likes
29
I am going to just hook up volume knob to the Pi and do volume in CamillaDSP as that is my active crossover in my system (that’s why I need 8 channels - 2 each of tweeter/mid/bass/monitor).
Fitting power, DAC, output stage and isolation (pi is very noisy) onto hat might be tricky, I just found AD1934 which has SE outputs… this might make things a little bit easier and then I can include 2 input channels as well.
Since you seemed interested, I thought I'd give an update. I changed away from AD1934 and went to PCM3168 from TI. It has 6 inputs and 8 outputs, and I2C interface (the AD one was SPI). Also, it can produce the I2S clocks which means I don't need my own frequency divider. The outputs are differential, but the output circuit in the datasheet only has one op-amp per channel so it isn't a huge problem - I'll just use 2 quad amps.
All of this is not going to fit on a single HAT so I'm thinking to have the power and digital stuff on the HAT itself, with all of the analog circuitry and audio connectors on a second board with interconnects via good old dual-row 2.54mm pin header/socket.
I should have a full schematic and PCB layout for comments within a week or two. I need to think a bit about the power architecture - what power supply options I want to provide for the op-amps and what I'll use to generate the analog supply for the main chip.
 
OP
M

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,659
Likes
2,273
Since you seemed interested, I thought I'd give an update. I changed away from AD1934 and went to PCM3168 from TI. It has 6 inputs and 8 outputs, and I2C interface (the AD one was SPI). Also, it can produce the I2S clocks which means I don't need my own frequency divider. The outputs are differential, but the output circuit in the datasheet only has one op-amp per channel so it isn't a huge problem - I'll just use 2 quad amps.
All of this is not going to fit on a single HAT so I'm thinking to have the power and digital stuff on the HAT itself, with all of the analog circuitry and audio connectors on a second board with interconnects via good old dual-row 2.54mm pin header/socket.
I should have a full schematic and PCB layout for comments within a week or two. I need to think a bit about the power architecture - what power supply options I want to provide for the op-amps and what I'll use to generate the analog supply for the main chip.
Cool, keep us posted please.
Regarding power, I have been trying to find an excuse project to use of USB PD chip and use up to 20V from a usb-c charger. I am curious to know how it works, the sort of connectors available etc etc.
 
OP
M

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,659
Likes
2,273
I am still far from finishing my DIY dac, but today i saw this in AliExpress amd i couldn't resist. ES9018 at 2 euros a pop shipped. That is roughly 5 times less it's current price at Mouser.

IMG_20231223_184515.jpg


And this is the challenge: to build a DIY multichannel dac, this time all with components from the most dubious provenance via AliExpress.
Anyone knows where to find the cheapest new 100% original op-amps??

If this works and hits any close to specs (I will have trouble to measure that this time) I will definitely lose any respect for the smsls of this world. Wish me good luck!

PS: bought a second one. This dac has a feature I was not aware of: a 8 input spdif muxer with auto sensing. I might use them to build that: a stereo dac with spdif auto sensing.
 
Last edited:

jmf11

Member
Joined
Mar 25, 2023
Messages
88
Likes
44
Location
France - Aix en Provence
Hello, this is really an interesting project. On my side, I would like to spend some time on using a stm32 nucleo board for USB to multi I2S (possibly at first limited to 48khz and 24 bits).

Do you consider share your kiCad files once happy with the results?

Jmf
 
OP
M

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,659
Likes
2,273
Do you consider share your kiCad files once happy with the results?
Hi. Do you mean the one in post #48?
sure i can share them if you wish. The DAC works, what i am being too lazy to do is the firmware for the microcontroller. I went too ambitious and even bought a touchscreen display, and now every time i think about starting working on it.....:eek:
 

jmf11

Member
Joined
Mar 25, 2023
Messages
88
Likes
44
Location
France - Aix en Provence
Yes ! If my stm32 my multichannel Usb to I2S succeeds, it could make a good combo with a simplified version of your board.

From your measurements, do you think you got OK compared to ES9080 datasheet figures?

Balanced outputs are working as you expected?

Jmf
 
OP
M

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,659
Likes
2,273
Yes ! If my stm32 my multichannel Usb to I2S succeeds, it could make a good combo with a simplified version of your board.

From your measurements, do you think you got OK compared to ES9080 datasheet figures?

Balanced outputs are working as you expected?

Jmf
Distorsion was ok, noise was a bit worse. Balanced operation was fine, you only need to invert one of the channels.

If you read the thread, you will see that i had difficulties soldering the dac and when it was not properly soldered, i had strange behavior like DC offset, high distorsion etc. I am attaching the fab files that i sent to JLCPCB, but if i was doing it again, i would change a couple of things:
- find a better footprint for the DAC IC: if you see post 48, there was no mask around the pins of two of the sides, and i think that was the cause of the soldering issues
- i added a toslink and coax spdif outputs. They work fine, but the coax has no transformer. I would add it for peace of mind. For a toslink transmitter that fits that footprint, i can share the aliexpress or TME link if you wish. Same thing for the XLR sockets footprints: they fit standard Neutrik or Amphenol, but let me know if you need the exact part numbers, as there are so many different ones...

The PCB is 10x10cm so that you can print it for peanuts in JLCPCB. I believe i paid something like 6.5 euros shipped. If you want to use the wifi antenna, to keep the trace impedance in 50 Ohm, you need to print a PCB thickness of 1 mm. All the small SMD are 0805 that are for me easier to solder, maybe there are a couple of 0603, can't remember now.
The MCU is ESP32-C3FH4, only this will work with my schematic, but i guess you want to use the STM32 as MCU too. If you want to know the LDOs or wifi antenna or any other part number that i used, just let me know.
Also, remember that for the analog outputs of the DAC, you need to use thin film resistors and C0G/NP0 capacitors.
I never populated the oscillators, as i used the dac always in slave mode, but i identified the part numbers in Mouser that fit. The necessary frequencies are difficult to find, if you need them, let me know.
Well, that is what i remember now, good luck and if you have any questions, just ask.

Edit: added a zip with the Kicad files. Not sure if it is going to work for you as a many footprints are not from the standard kicad libraries but i sourced them myself. I am very noob in kicad so i am not sure how to make it so that the files work for you.... sorry in advance.
 

Attachments

  • 8Ch DAC ES9080v2 fab files.zip
    314 KB · Views: 28
  • kicad files.zip
    798.1 KB · Views: 25
Last edited:

jmf11

Member
Joined
Mar 25, 2023
Messages
88
Likes
44
Location
France - Aix en Provence
Thanks a lot for sharing! This is a, let's say, "mid term" project and will be conditioned by success on my stm32 part. Having the KiCad files will help a lot. If I need more precise part numbers I may come back to you.

In my previous projects, I used Jlcpcb assembly service. I want to have look to see if they have the parts and it could drive some changes.

I already used KiCad and I'm still not clear about best practices. I clearly see your point, but can do my home work.

I'm read (quickly) all the thread and the events related to soldering. I had same type of issues with my previous projects (hot air soldering). I may have to look for a better solution. You used an hot plate: which type?

Thanks again for sharing: this looks like a very good project for a reasonably priced multi channel DAC!

Happy new year!

Jmf
 
OP
M

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,659
Likes
2,273
Thanks a lot for sharing! This is a, let's say, "mid term" project and will be conditioned by success on my stm32 part. Having the KiCad files will help a lot. If I need more precise part numbers I may come back to you.
You're welcome
In my previous projects, I used Jlcpcb assembly service. I want to have look to see if they have the parts and it could drive some changes.
Last time I checked they didn't have the es9080, that is the most difficult to solder :-/
I already used KiCad and I'm still not clear about best practices. I clearly see your point, but can do my home work.

I'm read (quickly) all the thread and the events related to soldering. I had same type of issues with my previous projects (hot air soldering). I may have to look for a better solution. You used an hot plate: which type?
Laboratory ones that allow for accurate temperature control. Probably an overkill. but the dac and MCU I soldered manually afterwards with the soldering iron (was my first time with that kind of packages)
Thanks again for sharing: this looks like a very good project for a reasonably priced multi channel DAC!

Happy new year!

Jmf
To you too ;)
 

gordoste

Member
Joined
Nov 19, 2023
Messages
33
Likes
29
You're welcome

Last time I checked they didn't have the es9080, that is the most difficult to solder :-/

Laboratory ones that allow for accurate temperature control. Probably an overkill. but the dac and MCU I soldered manually afterwards with the soldering iron (was my first time with that kind of packages)

To you too ;)

I can personally recommend a pretty cheap PID-controlled solution which you can find at https://www.siliconchip.com.au/Issue/2020/April/A+DIY+Reflow+Oven+Controller+for+modern+soldering . You can buy the PCB, preprogrammed micro and various other parts from their shop. I bought a small toaster oven for AUD$29 (~USD$20) and it works really well. The most expensive part is the mains relay. It makes it much quicker to build things with high part count, and you can get JLCPCB to provide a stencil so that you can solder leadless packages easily - and more importantly, reliably. If you do decide to build this, let me know as there are a couple of changes to the design that I would recommend.

There are several other similar things available elsewhere on the internet at various price points, but this is a very cheap solution with exteremely clear instructions on how to do the mains wiring - which is something you definitely don't want to get wrong.
 
  • Like
Reactions: MCH

AUDIO FREQ

New Member
Joined
Mar 31, 2024
Messages
4
Likes
3
Amazing work sir! I was thinking about building ES9017S 8 channels in hardware mode. Im a noob, and thought it would be a fun project.
 
  • Like
Reactions: MCH
Top Bottom