Step 5: Wire Everything Up
I have a lot of wire laying around which made this a lot nicer as I could roughly color code everything.
Basically this is how it works:
When there is no Mains Power (unplugged) the relay is unpowered which connects the voltage meter and regulator (built in step 1) to the battery connection wires (attached in step 3) through one of the fuses. The stereo is then powered by the output of the regulator (as well as the 12V outlet).
When Mains are turned on/plugged in the relay switches connecting the battery charger transformer (24V supply in the diagram) to mains, disconnects the battery contacts from the regulator, and connects the 12V 5A power supply to the stereo.
I was planning on adding a power inverter to allow the stereo to run/charge on 12V power from an automobile [project for later] but that is why the relay switches the charger transformer
The Power switch signals the stereo to turn on, the Voltmeter switch allows the voltmeter to be turned on and off to preserve battery life.
I connected a large Capacitor (10000uF) between the Constant 12V and ground of the stereo, with the hopes it would smooth the transition between mains and battery power and back. This works great when going from mains to battery. However, the 12V 5A power supply takes a little bit to get up to operating voltage so when you connect back to mains, the stereo shuts off momentarily.
The AUX is just a female 3.5mm TRS (headphone) jack wired up to RCA inputs on the back of the stereo.
The speakers are hooked straight up to the stereo.
I mounted the relay and capacitor by warping them in some electrical tape and using pipe hangers to keep them from moving around.
When Not in use the Mains Power Cord can be rolled up and placed inside the door, even with a battery in it.
Couple downsides to the design: If you unplug the unit without a battery in it, stereo memory is lost and On battery, the radio only lasts about an hour or so but that is plenty for my needs.
Hope you enjoyed this, and good luck on your next project.