0
\$\begingroup\$

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?

\$\endgroup\$
  • \$\begingroup\$ See here: electronics.stackexchange.com/questions/10731/… \$\endgroup\$ – Kaz Jul 17 '13 at 4:17
  • \$\begingroup\$ 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. \$\endgroup\$ – emi Jul 17 '13 at 4:36
0
\$\begingroup\$

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

enter image description here

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.

\$\endgroup\$
  • \$\begingroup\$ Of course! You're a genius! :P How does the diode switching work? \$\endgroup\$ – emi Jul 17 '13 at 7:47
  • \$\begingroup\$ @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. \$\endgroup\$ – Kaz Jul 17 '13 at 15:45
  • \$\begingroup\$ @esauvisky So if the AC adapter drives a voltage that is greater than 0.25 + Vbat, the diode becomes reverse-biased (shut off). \$\endgroup\$ – Kaz Jul 17 '13 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.