# How to make a proper DC Power + Battery circuit for audio effect pedals?

I'm building an audio effect pedal. I need to make a circuit that can either run from DC power or batteries. The key is to disconnect the battery if a DC plug is connected (by using a DC jack with a simple switch) and to disconnect the battery if no mono input plug is connected (with a stereo jack).

I've found this method (and here is a sample schematic). As you can see, when no input plug is connected the negative pole of the battery is disconnected from the circuit's ground, and when there's a mono plug connected it routes the negative pole of the battery through the plug into the ground. This works as expected.

From the other perspective, when a DC plug is connected it disconnects the battery positive pole by opening the switch inside the DC jack. However, this assumes you're using a DC plug with negative polarity (tip negative), but common DC power adaptors use positive polarities, with the tip being positive, so it doesn't works as expected.

I could switch the battery poles to fix the DC switch problem, but that would break the input switch (which would waste the batteries even if no input is connected). So, how to fix it?

• – Kaz
Jul 17 '13 at 4:17
• I already know all that @Kaz :) Using a DC jack like that (the same I'm using) would work if connecting the negative pole of the battery to pin 3. My problem is that my circuit requires the negative pole of the battery connecting to something else, and then I can't use the DC jack to switch the positive pole of the battery.
– emi
Jul 17 '13 at 4:36

Is there any reason something like this can't be used:

D1 is there just in case; it provides switching from battery to external power even if the jack doesn't break the contact, or if it momentarily fails to do so.

All switching is on the ground side. The J_PWR jack breaks the ground-side connection of the battery when external power is applied. The J_PWR jack and battery share a common ground-side network which goes through J_IN. The ground for both the battery and J_PWR is interrupted if nothing is plugged into J_IN.

How J_IN works is that when a mono phone plug (TS) is plugged into a stereo jack (TRS), it bridges the sleeve and ring because the two are fused in a mono plug.

AUDIO BOX should still have a power switch to prevent draining the battery when something is plugged into J_IN, and nothing into J_PWR.

Note that this is a simplified design. Transformer-based AC adapters usually put out only a half-wave rectified AC: it is DC, but doesn't have a flat voltage. The device has to provide regulation for itself.

Thus, between the positive input terminal of J_PWR, and D1, we would typically have a three-terminal voltage regulator, flanked by some capacitors. The battery drives the internal, regulated voltage line.

• Of course! You're a genius! :P How does the diode switching work?
– emi
Jul 17 '13 at 7:47
• @esauvisky To a crude approximation, a diode is a one-way valve, perventing "backflow" of current. So you can have two sources of energy driving the same circuit, each through a diode, such that neither can try to charge the other. The symbol shown, with the brackety line for the cathode, depicts a Schottky diode. Schottkys are good for this application because they have only a 0.25V drop compared to the 0.7V drop of common silicon diodes.
– Kaz
Jul 17 '13 at 15:45
• @esauvisky So if the AC adapter drives a voltage that is greater than 0.25 + Vbat, the diode becomes reverse-biased (shut off).
– Kaz
Jul 17 '13 at 15:51