This questions consists of two parts.
Background
I'm designing a digitally controller class D amplifier. Main IC's are a TI TPA3116D2 Class D amplifier, a TI PGA2311 volume control and an ATMega328P (running at 5V with internal 8Mhz oscillator).
Problem 1: Brown out when relay engages
I power my board with 24VDC. For now that's coming from a lab power supply. U303 provides 5V for the MCU.
The MCU in turn, controls relay K301, which will be used to power the other IC's. 24VDC will go directly to the TPA3116D2. U304 regulates 5V for other digital parts that are normally off, like a display. U301 and U302 create ±5V for the analog part of the PGA2311.
When the relay activates, the 5V from U303 drops enough to reset the MCU.
Somehow U303 can't keep up with either (or both) increased current draw from the relay coil or drop in input voltage because the rest of the circuit is powering up.
- Would adding bigger caps on the input/output of U303 (or a big buffer cap on the 24VDC input) resolve this issue?
- Is there a better way than using a bulky relay? Worst case my system would need 4-5A if the amplifier is at full volume. Would it be better to use a MOSFET and gradually bring up VCC to 24VDC?
- I notice that U303 gets quite hot (about 60°C) when the relay is active, this might also be a reason to switch to a MOSFET based setup (or use a bigger regulator).
Problem 2: An unexpected voltage
When powered off, there seems to be about 1.3V on the switched 5V rails.
My PCB is 4 layer. Top and bottom are for signals, the inner layers are GND and power (VCC in most places, ±5V in others).
I've split the GND into two planes (red outline). Left is for the input/digital parts, right is for the analog parts.
- Could this problem occur because I leave the VCC power input floating when powered off?
- What is a good solution for this? Connect VCC to GND with a resistor? Ideally I'd use the relay to switch between 24VDC and a resistor to GND, but I've designed the thing the wrong way around. :-(
Notes
For now, I've by-passed the relay and power the entire circuit directly - so no soft power on/off. The amp functions correctly then (except for some fine-tuning in the software for volume control, etc.)
This is a hobby project, the first one on this scale, so feel free to point out any other obvious mistakes.