tda1387 dac pcb "front end"

Sounds like in general they are a good thing to have. What would the optimal R values be for them?

I'm not sure, I normally use 470R. You could go higher but that increases the rise time at the DAC's input pins, not normally a good outcome as it tends to increase jitter. However I've not yet encountered a jitter problem in my listening (by other means than series resistors, e.g. using disrespected USB->I2S interfaces) so perhaps attention to jitter is overrated?
 
Curiouser and curiouser...

I no longer think the Pi DAC noise is a grounding issue. I don't know what I'm talking about, but I believe it could be EMI. Here's why...

I can affect the noise without physically touching a thing. Matt, if you have a headphone amp, you can put on your headphones and try this yourself (for science!) by just cranking the volume with no music on. Now move your hands around the DAC as if you are playing the theremin. :) I find the area near the big output caps to be particularly sensitive. Once my hands are less than an inch away, the buzz increases significantly with proximity. Wild.

I'm happy to say that I have tracked down my mystery noise cure. Recall that I accidentally attained complete elimination of noise when I connected the Pi DAC into the same switch box as my Mac's Firewire DAC via RCA plugs. Early on, I tried to see if I could just ground something to get the same results. Nope. I find that the noise actually increases when I run a wire from any part of the Pi stack (or the barrel of the iPower, for that matter) directly to earth. I tried earthing the audio ground wire too. No luck. Bizarrely, touching these same metal areas with my fingers reduces noise, a little.

Eventually I set about trying to narrow down how the noise was disappearing when I connected my Mac's Firewire DAC to the switch box with the Pi DAC. I guess the effect has to do with leakage currents getting absorbed somewhere in my Mac (yikes!) or more likely its PSU. I unplugged the Firewire cable (which supplies the power) from the DAC, and the noise came back. Finally, I realized that I could bypass the Firewire DAC entirely. By leaving the Firewire cable connected only to my Mac, and simply touching the steel outer barrel of the Firewire cable connector to the audio ground wire (center screw terminal on the Pi DAC board) I can get sweet, sweet silence! Weird, especially since the Googling Firewire pinouts suggests that the outer barrel has no function. I guess it must be grounded, though, right?

How in the world does this work? And does anybody have any suggestions for eliminating noise that does not necessitate using my Mac as a dedicated noise scrubber? :eek:
 
Yeah EMI could indeed be it, very hard to track down though. I had a problem when I connected an early prototype of my lingDAC to an SD card player. Its using a much, much slower CPU than a RPi (100MHz or so I think) but I could not place my DAC within the same enclosure without getting nasty clicking noises on the audio. In the end I mounted the lid of the box on 20mm long spacers creating a 'power bulge' and taped my DAC to the underside of the lid. The extra distance was enough to render the clicks inaudible.
 
Hi Randy,

A quick guess is it should be under 50mA. The tda1387 datasheet says the max current at 5v is 6.5mA. The other active components are the tl431 shut regulator, two bc560 common base transistors, and the power-on LED. Maybe I can try to take a reading this weekend...

Thanks, don't worry about measuring, it should be fine.

I'm going to start with a linear walwart I have in my junk drawer, puts out around 7.5v at 2a. Will just use a 7805, or a lm317(if I'm more motivated lol) to generate 5v. Probably also add a couple lifepo4 batteries.

FYI, lifepo4 batteries are pretty easy to implement, relatively cheap, and do a great job, especially for digital circuits, imho. They can be charged with a constant voltage, unlike normal lithiums which need a special charging circuit.

So, for 5V, I take two in series, discharge them with a power resistor until their voltage is a little less than 5V, then connect to regulated 5v, and you have a high quality 5v ps. If you leave power on all the time, you don't have to worry about switching. I plan to add a two pole switch or relay, and only connect battery when dac is on. Keeps battery from getting discharged when dac is off. If no switch, you do have to be REALLY careful when you connect, because it will be hot.

Deciding if I will make a 5v ps for the dac, and another one for the allo. I know this should be done to best sound. For this project, it would just mean two 7805's, two pairs of batteries, and two switches or relays.

I'll power the pi from a different 5v ps, just a little usb charger for now.
 
Randy, your battery power scheme sounds rather ideal. I was thinking about trying battery power as well, yet now I don't think my problems are PSU related any more. Many use the iPower with various DAC hats and have reported very low noise. I have to assume that Allo and other commercial manufacturers have some tricks for isolating their products from the noise and EMI of the Pi itself. I don't know how much is coming through the GPIO versus just being radiated upward as EMI. But I guess a long GPIO ribbon cable and a wide enclosure might help the latter, at least. I have worked with muMetal foil before too (all the power bricks for my Mac and peripherals are stuffed in a grounded steel ammo box lined with the stuff!) and the results were good. But man, there must be a much easier (and cheaper) way!
 
Member
Joined 2008
Paid Member
stellarelephant - I have a few more random thoughts; probably low likelihood of success, but fairly easy to try:
  • A different AC outlet, or preferably a different AC outlet in another room. The goal is to get on a different circuit. How well do you know the wiring in your house? Some homes have strange wiring, e.g. a bedroom circuit is shared with the kitchen, and you get the refrigerator compressor noise. I know we think it's probably not power supply issue, but if it's not to hard to move your stuff around (or maybe run a long extension cord), it's an easy test.
  • Have you noticed if time of day makes any difference? If you can say it always goes away at such and such time or a certain day, that might be a clue.
  • Can you try at a friend's house, preferably one that is a good distance from your own? If indeed it is EMI, is it from the RPI itself, something in your house, or something near your house? If you can fire it up at another house without the noise, then we can say there's something in your environment.
  • If the noise is coming from the RPI itself, you might try some of the hacks I mentioned above, or give DietPi a try. I.e., reduce the amount of power the RPI is drawing. In the next few days, I'll try to do the opposite on mine (deliberately turn off those power-saving features and artificially load the CPU and IO on the RPI); maybe I can induce my RPI to create the noise you're seeing.

One more question: are you using wired or wireless networking on your RPI? Looking at that pic you posted, it looks like the wired network port is empty on your RPI... if you're using wireless, do you have the ability to test with wired networking? I've never enabled the WiFi radio on my PIs, that's something else I could try when I have time.
 
@stellarelephant - could this be shield current induced noise (SCIN) which grounding your Firewire shield has the effect of shunting the noise to ground?

@randytush - I believe there is a problem with your 2 LiFePo4 in series to give you 5V. First you are running the batteries just on their min voltage 2.5V & just connecting 2 such batterie sin series & charging with 5V power will almost certainly lead to unbalanced voltages on each battery i.e one battery will be below 2.5V which will shorten it's life or kill it completely.

Usually device with 5V input power regulate this down to 3.3V - worth finding this regulator & supplying a 3.3V Lifepo4 battery power directly to it's output pin - this will also result in better sound as voltage regs add their own noise/stability issues.
 
Last edited:
SE,
It still sounds like a ground problem to me, I find it hard to believe that your Mac is eating noise. The Mac is more likely to be a noise source.

Grounds have to do with current return paths, all the current provided to the DAC/Pi/Allo has to return to the power source, which is your ifi. So the current is not really returning to earth. It does eventually, but for this case I would look at the current return path to the ifi.

I would guess the case of your mac is tied to something that is providing a return path. And if you move the ground from your mac to something else that is tied to the same ground, it will have the same effect. Or run a wire from the Mac case to the audio ground.

Randy
 
Thanks for the ideas, Matt. This is my first rodeo with Raspberry Pi, so maybe it is just intrinsically a ton noisier than I assumed. I will try your tweaks...if I can wrangle those setings out of the Volumio command line with my limited experience. I am using WiFi to control but not to stream...music is on a thumb drive. I'll try Ethernet instead, though WiFi control is one of the main attractions for me with this music player. So far I have used 3 outlets in three separate rooms of my home. I will try elsewhere eventually, but none of my other audio gear has ever had an issue in my house. Sorry if I was off base with the theremin comment...that was hyperbole, obviously. I still love the sound of this DAC in spite of this noise challenge.

Randy, I agree that there has to be another solution beyond the weird Mac FireWire magic. I'll have to try more ways of grounding back to the iFi connector barrel (return path).
 
Last edited:
Those of you who've expressed an interest by PM in getting one of my lingDAC prototypes for a listen, here's an appetizer pic. The DAC board's the lowest floor, then the filter board's in the middle and the latest addition is a buffer stage which means you can drive headphones (lowish impedance, planars not included as not enough swing) directly. Or you can use the buffer stage to drive a classD amp as it has much higher drive than the DAC I/V stage itself.
 

Attachments

  • lingDACc.jpg
    lingDACc.jpg
    67.5 KB · Views: 274
@stellarelephant - could this be shield current induced noise (SCIN) which grounding your Firewire shield has the effect of shunting the noise to ground?

@randytush - I believe there is a problem with your 2 LiFePo4 in series to give you 5V. First you are running the batteries just on their min voltage 2.5V & just connecting 2 such batterie sin series & charging with 5V power will almost certainly lead to unbalanced voltages on each battery i.e one battery will be below 2.5V which will shorten it's life or kill it completely.

Usually device with 5V input power regulate this down to 3.3V - worth finding this regulator & supplying a 3.3V Lifepo4 battery power directly to it's output pin - this will also result in better sound as voltage regs add their own noise/stability issues.

Good point about running two batteries in series.
The "right" way to do it is to make two 2.5V regs, and each battery has its own reg. And 2.5V is low for lifepo4, but they do work down there, not their ideal voltage.

I have been running my PC like this for 2-3 years now, with no problems. Figured if I did get an unbalanced battery, I would replace the pair. I decided to tradeoff long term reliability for simplicity and easier implementation, but that was a decision I made when I implemented, and one that worked for me.

Thinking about it, the way I'm using the batteries may be why I haven't seen imbalance issues yet. I don't drain the batteries at all in use, since they always have a 5v ps in parallel with them when under load. Since they don't drain, maybe they won't get imbalanced. Or at least not for a long time. In the PC, the batteries are always connected to a 5v ps, 24/7.

For this application, I will use a two pole switch or relay to make sure they never drain. Wiring of the switch is
s1-1 and s2-1 are open (top terminals of the switch)
s1-2 and s2-2 are tied together, and go to the 5v input of the board.
s1-3 to +5 power supply
s2-3 to +5 battery (+ terminal of 2nd battery)
So battery is isolated until switch is turned to on. This connects both battery and 5v ps to the load.

ground of first battery goes to ground of power supply goes to ground of board (not actually wired like that, I would wire to make the battery the return for the current).

This dac does use +5V, its an older dac. The allo board has a bunch of converters to generate different voltages, but I think they are converting from 5V, so am going to be a little lazy and just feed it 5V as described above.

I run a pi2 from one lifepo4, 3.3V through a switch. He's on 24/7, and I just tied the battery to the 3.3reg on the pi2. This is currently acting as my music server. Although I try the pi2 for this project, and move a pi3 to the server. It looks harder to connect a battery to the pi3, reg pads got smaller, but I need to look into this further.

Thanks for bringing this stuff up, it made me describe some decisions I made a long time ago, and give more details about my use of lifepo4's.

Randy
 
Those of you who've expressed an interest by PM in getting one of my lingDAC prototypes for a listen, here's an appetizer pic. The DAC board's the lowest floor, then the filter board's in the middle and the latest addition is a buffer stage which means you can drive headphones (lowish impedance, planars not included as not enough swing) directly. Or you can use the buffer stage to drive a classD amp as it has much higher drive than the DAC I/V stage itself.

Looks good.
Did you get volume control working well with the dac?

I'm guessing you need + and -15 or 18vdc or something like that for the buffer? Makes the power supply a little more complicated, always a tradeoff lol.

Randy
 
mmerrill, I haven't had a chance yet, but I look forward to studying that SCIN article.

abraxalito, congrats on successful first sound out of your new PCB stack! The filter board with the tiny inductors has quite an attractive layout. How is the buffer stage biased? And have you tried measuring a 1kHz wave to see the distortion harmonic ratio, maybe with and without the buffer? Exciting work.

Matt, I have been throwing all different resolution files at your 1387 Pi Hat since I got it, all the way up to 24/192. It plays them all, through the Kali. Against all expectations, I seem to prefer brute hardware truncation to dithering to 16 bits with Volumio! Seems like the immediacy and imaging accuracy is better. Tell me, am I crazy?
 
@randytsuch - Maybe if you are drawing low current & keeping it constantly trickle charged this may work once the batteries are fairly balanced to start with?

You say you ran a PC with this 5V battery config for 2-3 years - current draw on PC 5V can be intermittently high.

If you were thinking of using two 2.5 Vregs then one of them would have to be isolated otherwise it will short + of one battery to ground through the Vreg ground on the other battery
 
Did you get volume control working well with the dac?

I've been using digital volume control and haven't found any drawbacks with that so far. I did play for a moment with using a stepped attenuator on pin7 of the DAC, there was some excess noise so have given up on that for now.

I'm guessing you need + and -15 or 18vdc or something like that for the buffer?

No, its all single supply, 8-9V. I sometimes use a boost converter from an 18650 cell.

@se - the biassing of the buffer stage? Its an SE buffer so there's a single MOSFET biassed by a current source. A total of 3 transistors per channel. I made some distortion measurements without the buffer, it showed a rising distortion profile with frequency, I think mostly 2nd harmonic. I plan to build a balanced version to see if the 2nd H gets cancelled.
 
Those of you who've expressed an interest by PM in getting one of my lingDAC prototypes for a listen, here's an appetizer pic. The DAC board's the lowest floor, then the filter board's in the middle and the latest addition is a buffer stage which means you can drive headphones (lowish impedance, planars not included as not enough swing) directly. Or you can use the buffer stage to drive a classD amp as it has much higher drive than the DAC I/V stage itself.

looks very compact ! does that buffer board require +/- 15V?
I wonder if a JG (joachim gerhard) buffer from the ES9023 thread could be used in adition to the filter board in the middle cause I have one lying around
anyway, I would be curious of a listening test with this filter board, I have heard the raw (paralelled) sound of the TDA1387 using just a simple I/V resistor of 390 ohm and indeed has huge potential, so I'm curious what magic does that filter board bring to the sound in terms of 3d stage and microdetails :)