tda1387 dac pcb "front end"

I've been playing with dietpi recently.

For an easy dietpi solution, use picoreplayer. You just have to download the image, and burn to sd. Picoreplayer is built on a minimal dietpi. It can be both the player and the LMS. If you're familiar with the old squeezebox software, you'll understand this.

Or, on Dietpi, you can choose to install a bunch of programs easily
dietpi programs

Randy
 
Thanks, Matt, for the helpful suggestions.

Here's what I did that worked:
1) Hooked up a keyboard and monitor
2) Typed in username: "volumio" and password: "volumio" (Hard to remember, eh?)
3) Typed command "sudo alsamixer"
4) Entered that darn password again
5) Changed the PCM level from 40% (-19.65dB gain) to 86% (0dB gain)
6) Never turn off the device again because it resets to 40% at each reboot :(

attachment.php


I have deduced that Volumio initially booted with the PCM level set to 100% (4dB gain...hence all that clipping I heard initially) and then, for whatever reason, because I toggled the volume control preferences via the wifi GUI, it now forever boots to 40%. Both settings are equally useless.

Now I have more questions...
Surely there must be a way to load the correct value at boot time??? And I wonder, why is 0dB not the default in the first place? Is there any reason to believe that this behavior will be different when I ditch the onboard sound for an i2s DAC? Matt, are you managing this setting every time you power up?
 

Attachments

  • 2018-03-14 09.35.48.jpg
    2018-03-14 09.35.48.jpg
    75.2 KB · Views: 629
I've been playing with dietpi recently.

For an easy dietpi solution, use picoreplayer. You just have to download the image, and burn to sd. Picoreplayer is built on a minimal dietpi. It can be both the player and the LMS. If you're familiar with the old squeezebox software, you'll understand this.

Or, on Dietpi, you can choose to install a bunch of programs easily
dietpi programs

Randy

Hi Randy,
I really like the Volumio GUI and the ability to control playback from any mobile device on my wifi network. Perhaps I will eventually slip deeper into the world of Linux, and look into the dietpi/picoreplayer option.
 
Member
Joined 2008
Paid Member
Here's what I did that worked:
1) Hooked up a keyboard and monitor
2) Typed in username: "volumio" and password: "volumio" (Hard to remember, eh?)

I strongly encourage you to invest 15 minutes or so learning how to login to your RPi over ssh. The payback in time will be realized the first time you avoid hooking a keyboard and monitor up to your RPi. If your desktop OS is Windows, use PuTTY as your ssh client. All you need after that is your RPI's IP address, which it appears you already know if you're successfully controlling Volumio from other devices. Bonus: you can take screenshots with your PC OS, rather than physically taking pictures of your monitor! :)


Surely there must be a way to load the correct value at boot time??? And I wonder, why is 0dB not the default in the first place? Is there any reason to believe that this behavior will be different when I ditch the onboard sound for an i2s DAC? Matt, are you managing this setting every time you power up?

I know that in general, Linux supports a way to set mixer values to whatever you want at boot-time. But Volumio is basically a layer on top of Linux, so it might be doing its own thing. Or maybe it does nothing at all, and those are the pure Linux defaults you are seeing? I'd be surprised if you were the first person to experience this, though. You might try searching the Volumio forums to see if anyone else has raised this question.

I am currently using software volume control, so yes, I am changing this setting every time I power up. But I don't have to login and do it through the CLI, I do it through whatever client I'm using to control music selection, playback, etc. Because of my use case, it feels very natural/normal. Plus I practically never reboot my RPIs.

As for I2S DACs: it depends. Simple i2s DACs (like my tda1387 board you're about to receive) don't have any hardware volume control. So there won't even be a mixer device associated with it, and this becomes a non-issue. But fancier i2s DACs, e.g. Allo Boss DAC, will provide a hardware mixer.

Note that if my statements sound conflicting, it comes down to the difference between hardware and software volume control. In my case (simple tda1387 i2s DAC), there is no hardware volume control (and therefore no associated mixer device, i.e. nothing to see in alsamixer). But I am changing volume via software, specifically, by the program that actually plays music (MPD in my case).


I really like the Volumio GUI and the ability to control playback from any mobile device on my wifi network. Perhaps I will eventually slip deeper into the world of Linux, and look into the dietpi/picoreplayer option.

I too can control playback from any device on my LAN, with DietPi + MPD. I haven't used piCorePlayer/LMS as Randy suggests, but from what I understand, it's conceptually the same as MPD. I did use Volumio over a year ago, and back then it was using MPD. (Note: it appears to have been completely overhauled since I used it.) But, basically, Volumio just pre-packages MPD (or LMS or equivalent) for you so you don't have to worry about manually installing this or that package, editing config files, etc. Not saying one is better than the other---it's truly a matter of personal preference---just that there are many options, but the end result is more or less same.
 
I gather that Volumio is not the only game in town...not by a long shot. At least to a noob, it seems pretty slick though. I haven't downloaded the app to test yet, but I love the idea that my wife and I could eventually both control Volumio playback from our iPhones. Hmmm...it now occurs to me that this situation may well devolve into a perpetual battle of dueling remotes...:rolleyes:

Both my"real" computers are Macs, so I'll search out a SSH program for next time I need to access any nitty gritty audio settings on the Pi. Although you just made my day by saying that I may never have to, since the 1387 DAC has no control to fuss with! I prefer to send the full signal out to an analog pot anyway.

Thanks for the links Randy.
 
Last edited:
I'm working on a wiki page for my pi project, if you go about 1/2 down this page
My pi project wiki
It talks about connecting from a MAC thru SSH to a pi.

You can use the Terminal program that comes with the Mac OS. BTW, you can also use the same terminal program as a terminal into your mac, if you ever want to do nerdy stuff with your mac lol

Randy
 
Member
Joined 2008
Paid Member
Nano Group Buy

I mentioned earlier I was going to do a "mini" group buy with the built boards, but some folks contacted me via PM, and now I only have two(*) left. So it seems silly to go post in the GB sub-forum when there are only two boards available.

So I'll announce it here, I have two TDA1387 Raspberry Pi HAT single-ended boards left. Both were continuously run for at least 24 hours. Price is $20, buyer pays shipping. If interested, PM me and let me know what board you want, #2 or #3 (see attached pic). Numbers 4 through 6 are spoken for.

(*) #07 has the 40-pin header soldered on backwards. I haven't tested it yet (though it could be tested/used with jumper wires, I just haven't taken the time yet). If I can't figure out how to cleanly remove that header, I'll sell this board for $5. At that price, shipping will be the dominant cost! (If you're in the Chicago area, stop by with some good beer and you can have it.)
 

Attachments

  • nano_group_buy_tda1387_rpihat_se.jpg
    nano_group_buy_tda1387_rpihat_se.jpg
    161.3 KB · Views: 377
(*) #07 has the 40-pin header soldered on backwards. I haven't tested it yet (though it could be tested/used with jumper wires, I just haven't taken the time yet). If I can't figure out how to cleanly remove that header, I'll sell this board for $5. At that price, shipping will be the dominant cost! (If you're in the Chicago area, stop by with some good beer and you can have it.)

You might be able to cut the connector body off with a good pair of cutters.

Once the body is gone, it would be fairly straightforward to remove the pins one by one. To clean out the holes, but board in a vice, solder sucker on one side and iron on the other side of the hole has worked well for me.
 
Member
Joined 2008
Paid Member
Hey, I used to have one that looked just liked that! :)

More good news: I have my balanced RPI HAT DACs working now. Somehow the pin designations for the TL431 got messed up between schematic and board layout. It's a lousy pic, but eagle-eyed viewers will see the TL431s (through-hole TO-92 devices) are now "rotated" with respect to the footprint silkscreen.

Now the only thing that doesn't work is the power-on indicator LED! Not sure why, that's the simplest part of the circuit. :confused:
 

Attachments

  • tda1387_rpi_hat_balanced.jpg
    tda1387_rpi_hat_balanced.jpg
    110.1 KB · Views: 339
I'm in love with this thing. I have set up an A/B switch box but I hardly need it to hear the difference. The delicacy is addictive...imaging is insane. Its an incredible match for my Fostex planars but the real magic happens with speakers...I finally got a taste of that "holographic" thing that the 1543 lovers rave about. Real listening impressions to come.
 
Member
Joined 2008
Paid Member
I'm in love with this thing. I have set up an A/B switch box but I hardly need it to hear the difference. The delicacy is addictive...imaging is insane. Its an incredible match for my Fostex planars but the real magic happens with speakers...I finally got a taste of that "holographic" thing that the 1543 lovers rave about. Real listening impressions to come.

Great news! I'm thrilled you like it!

The radio silence had me worried that maybe my "baby bias" had finally gone off the deep end. (And I fully acknowledge that I suffer baby bias; it's a huge part of the fun and appeal of DIY for me. But I'd like to think I retain a semblance of objectivity!)

:cheers:
 
Nah, it's legitimately killer sound.

I prefer it to my AKM and both of my Cirrus DACs, and the Dragonfly Black (Sabre) I had for a bit. I can see why people compare the sound of these chips to analog. I am especially thrilled at how this DAC allows me to enjoy music without the usual listening fatigue.

Only caveat is that I am still trying to troubleshoot a substantial level of background noise from this Pi hat. I did not expect to have any noise problems at all, with the super clean iPower PSU. The hum/switching noise is almost certainly the fault of the Pi, and not the DAC, because when I crank the volume with music paused, I can actually hear the noise fluctuate in sync with the flashing red LED on the Pi board! The iPower is not grounded, but I found somebody recommend grounding the barrel of the iPower to reduce noise. I have yet to try this. But unexpectedly, I solved the issue last night (on accident) by connecting the new DAC to my A/B switch box. I had the same noise at first, with just the Pi stack connected. But as soon as I connected my Mac's Firewire DAC to the switch box, the Pi noise dropped to zilch!!! This gives me hope that it can be fixed pretty easily. Both DACs are hooked up via RCA. Matt, you have the same exact setup as me (iPower->Pi->Kali->1387). Do you have any noise issues or a recommendation about this? Before my accidental remedy, the noise got worse when I touched the audio connector cable, and better when I touched any metal part on the Pi.
 
Last edited:
Member
Joined 2008
Paid Member
stellarelephant - My gut instinct to what you describe is a ground loop or a similar grounding problem. That the A/B box fixes it suggests to me that the box is breaking the ground loop or providing the "missing" piece of the grounding scheme.

Yes, I am using the same setup. In fact I have two setups, my main one with the Kali, and the basement setup for testing and burn-in (which does not have a Kali). In both cases I'm using the iFi iPower PSU.

I don't have any noise, but I'm also using software volume control. On my main system, I have to keep the volume very low due to small room, semi-sensitive speakers, and an over-powered amp. However, if there is noise, I think that by definition, software-based digital volume control should keep the noise proportional to the signal. Meaning, if there was noise I think I should be able to here it, even at my low volume setting. On the basement system, I've cranked it to roughly 3/4 max volume, and still nothing like what you describe (there I can't go louder because the speakers can't handle it).

What are you using for volume control?

Do your preamp, amp and other downstream components have a safety earth connection on the mains plug (i.e. 3-pin plug)?

Lastly, I'd be surprised if this made a big difference, but I'm using DietPi as my RPi distro. It has a setting "PSU Noise Reduction", which sets the CPU governer to Powersave and disables HDMI output. Though I don't do this, I've heard of people disabling the status LEDs on their RPI to further reduce power consumption (and implicitly help with PSU noise). Even better than using the powersave governer is to set the CPU to a fixed frequency (the lowest frequency you can get away with). This would also present the power supply with a more fixed load. But still my gut says all this should be "fine tuning" rather than the core of the problem, which I still suspect is a grounding issue.

For what it's worth: one of my highly modded x8 DACs has a ton of noise. For a long time, I didn't know, because I was using a stepped attenuator between it and the amp for volume control. This was a nearfield setup, so volume was again super low. I never heard any noise because the volume was so low (analog volume control, which should lower noise along with the signal). I never took the time to debug it, though.

Do you have a way to provide the RPI stack with 5v power via battery? That breaks the connection with your mains on the source (RPI) end. 5v is an uncommon battery voltage, but you could whip something up quickly with a couple 18650 cells or a car battery and a heatsinked LDO. E.g., I have a couple adjustable LT1083-based regulators like this that come in handy from time to time. You can use a transformer + AC to get a target output voltage, or just use a battery in place of AC input and adjust down to what you need.
 
Member
Joined 2008
Paid Member
Another thing that might be relevant, and hoping Abraxalito can jump in and offer some thoughts: if you look at the DAC PCB, you'll see I have resistors in series with DAC pins 1, 2 and 3, which are the I2S input pins. I've seen other people put those resistors in place, but not always. I kinda-sorta have a vague notion of their function, but not enough to set their value appropriately. So those are actually zero-ohm resistors currently. I was hoping eventually someone would come along and improve my understanding of those resistors, and enable me to set them to a more appropriate value (or omit them entirely).
 
So far I have fed the hat DAC into my battery-powered DIY Pocket Class A headphone amp (it is silent with every other source I have tried) as well as two different Tripath amps with pots in front of them, each powered by a two prong (floating ground) SMPS. These are also normally quiet. I got the noise with all three scenarios. Have you tried pausing playback and then putting software volume to max, to listen for noise? I might have a crude way of testing the Pi battery power with some wimpy boost converters I have lying around, if I get creative...but they aren't totally silent either to my knowledge.
 
@matt - the resistors on the I2S do a couple of things. They work to reduce ringing on the wires (they're a kind of 'series termination') and they low pass filter any noise on them so hopefully the noise is less likely to affect the DAC.
On my schematics with the 74HC86 before the DAC they have a third function - current limiting any voltage swings above the HC86's supply voltage (2.5V).

@se - I agree with matt that your noise problems are grounding related. Without a full picture of what's connected to your RPi I wouldn't be able to diagnose further. I'd guess when you inserted the Mac Firewire DAC that (or the switch box) provided a path to earth for the leakage currents. The give-away is when you touch a 0V connected part, the noise reduces - in that situation you're providing a not-very-effective earth connection via your body.
 
Member
Joined 2008
Paid Member
Have you tried pausing playback and then putting software volume to max, to listen for noise?

I did that just now - only the slightest of hissing if I put my ear right up to the tweeter. I also did another test: I picked a song I know that starts out extremely quietly (Ravel Bolero), and then I could safely crank the volume all the way up with music playing. Again, a bit of hiss with my ear close to the speaker, but nothing like you describe (and that could very well be tape hiss from the recording itself).


@matt - the resistors on the I2S do a couple of things. They work to reduce ringing on the wires (they're a kind of 'series termination') and they low pass filter any noise on them so hopefully the noise is less likely to affect the DAC.

Sounds like in general they are a good thing to have. What would the optimal R values be for them?
 
The give-away is when you touch a 0V connected part, the noise reduces - in that situation you're providing a not-very-effective earth connection via your body.

This was my initial thought as well. Curiously, a little experiment I tried seems to contradict this. I have an anti-static wrist strap that plugs into an electrical outlet ground hole. When I touch it to the same metal parts (the Pi's steel Ethernet jack housing, for example), the noise gets louder!!! My finger still makes it quieter, so long as I am not grounded.

This pic shows my cheap Radio Shack switch box. I have no idea what the circuit inside is like...could all the RCA barrels share a ground? I need more time to experiment but I can confirm that all noise disappears completely when the second DAC gets connected. When I took the pic, I was running through the Pocket Class A as a preamp, but the noise is the same when going direct.
 

Attachments

  • IMG_3130.jpg
    IMG_3130.jpg
    944.7 KB · Views: 288