Separate transformers for digital and analog supply in audio amplifier circuit with MCU based volume control

Thread Starter

szabikka

Joined Sep 3, 2014
113
Hello everyone!

I have previously designed an audio amplifier based on the TPA3122 class-D power amp, which utilised a microcontroller driving a digital potentiometer to set the volume (the volume can be set via an IR remote, that's why the hassle is with the mcu and the digital pot). The digital parts (IR decoder, MCU, digital pot) and the "analog" part (class-D amp IC) is fed from the same transformer. The thing works fine but there is a faint humming coming from the speaker. Thing is, I want to step up the game and feed a higher voltage to the amplifier to give it more power but I'm afraid the humming would get worse. I'm also afraid that since I'd have to drop a higher voltage with my linear voltage regulator for the digital parts, heat dissipation can get out of control. So, I thought I'd redesign and rebuild the circuit using two separate transformers (a 17 VAC one for the amplifier and a 6VAC one for the digital parts). My question is: can it harm my circuit in any way if I wire the transformers as shown in the picture? My other question is: can this arrangement mitigate the humming problem, which I think stems from the fast switching of the MCU coupling into the audio lines? (In the picture I omitted the fuses and the rest of the circuitry for simplicity).

1643909868601.png
 

Attachments

dl324

Joined Mar 30, 2015
16,839
I'm afraid the humming would get worse
My other question is: can this arrangement mitigate the humming problem, which I think stems from the fast switching of the MCU coupling into the audio lines?
Hum is generally considered to be a low frequency phenomenon. Higher frequency noise can be filtered more easily.
I'm also afraid that since I'd have to drop a higher voltage with my linear voltage regulator for the digital parts, heat dissipation can get out of control.
Are you planning to use an adequately sized heatsink?
can it harm my circuit in any way if I wire the transformers as shown in the picture?
What harm are you concerned about?
 

michael8

Joined Jan 11, 2015
410
Doesn't the AC have to be converted to DC (by circuits not shown) to be used in your (not shown) circuits?

When you convert the AC to DC the DC ground is not likely to be the same as the AC ground above,
I suspect there will be a conflict between the grounds which will wind up shorting out something...
 

KeithWalker

Joined Jul 10, 2017
3,063
Before you attempt to get rid of your hum problem, you need to identify it. An oscilloscope is the best tool for the job but just listening to it may give you some clues. Is it a smooth low frequency mains hum or is it a harsh higher frequency sound?
 

Thread Starter

szabikka

Joined Sep 3, 2014
113
Hum is generally considered to be a low frequency phenomenon. Higher frequency noise can be filtered more easily.
Are you planning to use an adequately sized heatsink?
What harm are you concerned about?
Unfortunately, there is no room for large heatsinks on the board. I must try to get away with a small heatsink, that's why I 'd like to have a separate, low voltage supply for the digital parts. The harm I'm concerned about is mainly shorting something out, but class-d amplifier related supply pumping might also be a problem.
 

Thread Starter

szabikka

Joined Sep 3, 2014
113
Doesn't the AC have to be converted to DC (by circuits not shown) to be used in your (not shown) circuits?

When you convert the AC to DC the DC ground is not likely to be the same as the AC ground above,
I suspect there will be a conflict between the grounds which will wind up shorting out something...
Of course, the AC is converted to DC, with separate diode bridges. You are right, I oversimplified the picture and left it out. :oops:

This is what I meant:
1643913401455.png
 

Thread Starter

szabikka

Joined Sep 3, 2014
113
Before you attempt to get rid of your hum problem, you need to identify it. An oscilloscope is the best tool for the job but just listening to it may give you some clues. Is it a smooth low frequency mains hum or is it a harsh higher frequency sound?
The hum is a low frequency one. Might be the 50 Hz from the mains? I have tried an oscilloscope to identify the problem, but the circuit doesn't like it and spits out even more noise when I connect the probe. I think it might form a ground loop.
 

Ian0

Joined Aug 7, 2020
9,667
Is it 50Hz or is it 100Hz? What sort of transformer have you used (or are you going to use)? How big are the capacitors? Whereabouts does the input signal come from? Is the ground of the input socket connected to the case? Is anything else connected to the case?
 
Last edited:

dl324

Joined Mar 30, 2015
16,839
Unfortunately, there is no room for large heatsinks on the board. I must try to get away with a small heatsink
Is there something preventing you from mounting the regulator on the chassis and using a large heatsink?
The harm I'm concerned about is mainly shorting something out, but class-d amplifier related supply pumping might also be a problem.
That's under your control.
 

Ian0

Joined Aug 7, 2020
9,667
How much current does the digital part take? 25mA for the MCU, 1mA for the digital pot, 5mA for the IR receiver? About 30mA altogether. That's only 1W for a 30V supply. You could put a power resistor in series with the 5V regulator and wouldn't need a heatsink.
 

KeithWalker

Joined Jul 10, 2017
3,063
The hum is a low frequency one. Might be the 50 Hz from the mains? I have tried an oscilloscope to identify the problem, but the circuit doesn't like it and spits out even more noise when I connect the probe. I think it might form a ground loop.
How are the different circuits connected to the power supply? The best arrangement for minimizing ground loops and interference is a star ground:
https://resources.pcb.cadence.com/blog/2020-what-is-a-star-ground-layout-and-why-do-you-need-it
 

crutschow

Joined Mar 14, 2008
34,280
If you have a center-tapped transformer as you show, here's a way to get two voltages from that using one bridge rectifier (simulation below).
The lower voltage is approximately 1/2 the higher voltage.
The bridge acts as a full-wave bridge rectifier for the higher voltage, and the two grounded diodes act as a full-wave rectifier for the lower voltage from the center-tap.
Edit: Normally the two diodes for the full-wave, center-tapped configuration are placed at the two ends of the transformer output with the center-tap grounded, but it works just as well if the diodes are connected to ground from those points, and the output is taken from the center-tap.

The bridge must be able to handle the total current of both outputs, of course.

1643940402058.png
 
Last edited:

Thread Starter

szabikka

Joined Sep 3, 2014
113
Is it 50Hz or is it 100Hz? What sort of transformer have you used (or are you going to use)? How big are the capacitors? Whereabouts does the input signal come from? Is the ground of the input socket connected to the case? Is anything else connected to the case?
Based on hearing, the hum is about 50 Hz. I played a 100 Hz tone through the speakers and it's not the same that comes from the idle speaker when no music is played, however an 50 Hz tone is bang on. I used a toroid transformer with 230 VAC input, and 2x12VAC output, connected in parallel to handle the large switching currents of the amplifier. The ground of the input socket is not connected to the case. Actually the case is not even grounded, because it's made of a non-conductive material (cardboard).
 

Thread Starter

szabikka

Joined Sep 3, 2014
113
How are the different circuits connected to the power supply? The best arrangement for minimizing ground loops and interference is a star ground:
https://resources.pcb.cadence.com/blog/2020-what-is-a-star-ground-layout-and-why-do-you-need-it
Yes, I know the trick with the star ground, that's why I included it in the drawings I posted. In the current version of the board, even though I tried, I couldn't design it with a star ground. The analog and digital grounds connect to each other in three places. The board is single sided and home made and I couldn't make too thin copper traces, because they would have got destroyed during the etching... and of course there is the thing with the large switching currents of the amp, they also need wide traces, I think.
 

Thread Starter

szabikka

Joined Sep 3, 2014
113
How much current does the digital part take? 25mA for the MCU, 1mA for the digital pot, 5mA for the IR receiver? About 30mA altogether. That's only 1W for a 30V supply. You could put a power resistor in series with the 5V regulator and wouldn't need a heatsink.
That's a good idea to drop the voltage via a power resistor. Thanks for the tip! ;)
 

Thread Starter

szabikka

Joined Sep 3, 2014
113
If you have a center-tapped transformer as you show, here's a way to get two voltages from that using one bridge rectifier (simulation below).
The lower voltage is approximately 1/2 the higher voltage.
The bridge acts as a full-wave bridge rectifier for the higher voltage, and the two grounded diodes act as a full-wave rectifier for the lower voltage from the center-tap.

The bridge must be able to handle the total current of both outputs, of course.

View attachment 259596
The transformer I'm using currently can be made centertapped, because it has two 12V secondary windings. This is a good idea too for getting a lower voltage and a higher one from the same transformer. Current is not a problem, I have some 8A diode bridges at hand.
 

Ian0

Joined Aug 7, 2020
9,667
I used a toroid transformer with 230 VAC input, and 2x12VAC output, connected in parallel to handle the large switching currents of the amplifier. The ground of the input socket is not connected to the case. Actually the case is not even grounded, because it's made of a non-conductive material (cardboard).
There's a couple of misconceptions here.
1) Class D amplifiers don't take large switching currents. The current in the transistors is the same as the output current give or take the current circulating in the filter, but that should be small if the filter is well-designed. There may be some brief current pulses as transistors switch, but they will be very short.
2) The output current is provided by the smoothing capacitors. The transformer charges the capacitors for 1ms or 2ms in every half-cycle. The larger (and lower impedance) the transformer the shorter time the charging current flows, and consequently the larger the peak charging current. But if the hum is 50Hz not 100Hz, that's not the problem.

Is the 0V connection grounded?
 

Thread Starter

szabikka

Joined Sep 3, 2014
113
There's a couple of misconceptions here.
1) Class D amplifiers don't take large switching currents. The current in the transistors is the same as the output current give or take the current circulating in the filter, but that should be small if the filter is well-designed. There may be some brief current pulses as transistors switch, but they will be very short.
2) The output current is provided by the smoothing capacitors. The transformer charges the capacitors for 1ms or 2ms in every half-cycle. The larger (and lower impedance) the transformer the shorter time the charging current flows, and consequently the larger the peak charging current. But if the hum is 50Hz not 100Hz, that's not the problem.

Is the 0V connection grounded?
No, it's not. So far I used a mains cable with two wires, one for neutral, one for line. It might help if I connect the 0V to ground?
Also, thanks for clarifying the output current thing. I'm new to using class D amlifiers and didn't quite get everything so far. Guess that's why the manufacturer of the IC recommends low ESR caps - which I have used.
 
Top