# Powering amplifier from battery or 230V power supply with automatic switch

I'm trying to figure out the best way to power my amplifier using either a battery OR a 230V power supply.

The amplifier has a wide input range that'll happily take the ~12V from the battery or the 24V from the power supply, but i'm not really sure about the best way to handle all of it.

What i want is for the power supply to take priority whenever it has power, so that the battery is only used when there's no mains power. Additionally i also have a battery charger that i want to keep the battery topped up when the amp is running on mains power and battery isn't used.

How do i isolate and switch everything properly? Obviously i would like to waste as little power on the whole isolation/switching as possible to save battery power.

Do i just litter the circuit with relays to switch everything?

My devices is the following: J1: 230VAC input jack PS1: 230VAC to 24VDC power supply for the amp PS2: Battery charger for the battery

• Diode from battery and diode from supply to load. Highest voltage wins. – Russell McMahon Jun 6 at 11:49

• The amp should be off when turning on AC to avoid contact wear from additional surge current on contact unless rated for this. Ic= CdV/dt or $\Delta V/ESR$ also a DPST may be better to isolate CM SMPS charger noise on the common Bat- – Tony Stewart EE75 Jun 5 at 13:31