Switching between two Loads and two Voltages?

Thread Starter

Falcon69

Joined Nov 11, 2013
19
Hello,

New here, have a question.

I am tryin to create a very simple circuit.

I have a 12V source that goes into 2 diodes into series, then out to the load.

Then I have a 5V source that goes into a single Schottky Diode, then out to the same load.

I need to be able to switch between them with a single jumper. I don't have much space to do this on the circuit board, so the less components, the better.

I've heard this can be done with a PNP and an NPN transistor, but can't figure it out.

Can someone here help me out?

Thanks in Advance!
 

inwo

Joined Nov 7, 2013
2,419
Seems to me that the 5volt supply diode will take care of the switching the way it it's connected now.

All you have to do is turn the 12v supply on or off. So it comes down to how you want to control the switching.
 

Thread Starter

Falcon69

Joined Nov 11, 2013
19
Sorry, I need to add....

I have one voltage source, but I don't know if it will be a 12v or a 5v. If it is a 12v, i need to add the 2 diodes so the reverse voltage through the circuit doesn't fry an LED in the circuit. And if it's 5 volts, I need to add a schottky diode instead of a regular diode, because the voltage would be too low for a TTL circuit.

So, in a sense, I need to make a SPDT switch, using a single jumper to do this. I don't have room on the circuit to add a SPDT switch, they are too big, but I have room to add a few small SMD components.

If I do as you say, then I will be having two regular diodes in series (1.4V or so) along with a schottky diode (.4v or so) in parallel with them. I can't have that.
 

Thread Starter

Falcon69

Joined Nov 11, 2013
19
If I leave the the 2 diodes (in series) parallel with the schottky diode, and put the jumper on the schottky, That should work. :) Just one jumper added, and that's it.
 

inwo

Joined Nov 7, 2013
2,419
I don't understand.
What reverse voltage?
If circuit needs 5volts, how will two forward diode drops bring down the 12 volts to 5?

Are you talking mostly pcb design? Where you have one input jack but need a single jumper to select 5 or 12 volt supply?

Then all three in series with a jumper may work.

Why any diodes at all? Ac source?

If anything, one 7 volt zener from 12vdc.
 

Thread Starter

Falcon69

Joined Nov 11, 2013
19
inwo

It's a circuit using a hall effect sensor, a transistor, and 2 LED's. the output of the sensor is connected to the breakout boards 12v output, which when the sensor is triggered, it sinks it to ground. But there are alot of different breakout boards out there, some are opto isolated, some are not, some output 12 volts, some 5, and some work off TTL circuits. When connected, need to drop the voltage enough so that it still sinks the breakout boards output to ground, yet, keep the reverse voltage through one of the LED's low enough that it doesn't fry the LED.

I solved the problem though.

Simply place a jumper between the breakout board and the single schottky diode, and parallel the schottky with the two diodes in series. Since electric current takes the path of least resistance, it will flow through the schottky if the jumper is there, otherwise, it will go through the two diodes in series. So, when the breakout board outputs 5 volts, simply plug the jumper in, when a breakout board outputs 12 volts, take the jumper out. At least, that works in the simulation I found out.
 

inwo

Joined Nov 7, 2013
2,419
There should be a much better way to do this without any switch or jumper.
I'd need schematic as I don't yet have full picture.
 

wayneh

Joined Sep 9, 2010
17,498
You could build a shunt circuit that directs current to ground for any voltage over a set point, 5V in your case. So the downstream circuit sees only 5V. Such things are used to prevent over charging a battery with a solar panel, for instance. A recent thread here about a "9V battery charger" uses this technique.
 

Thread Starter

Falcon69

Joined Nov 11, 2013
19
inwo

Here's the current schematic of what I'm working with.


Currently, I have switches made already in the Green boxed area. I am having trouble when connecting them in parallel with the breakout boards.

So I need to design a fix for them right now, and then later, if I make more, I'll redesign the circuit board for with the fix or a completely new design.

For the switches being in parallel, I know a diode must be in place, but without the diode after the red led, there is too much reverse voltage (greater than 5volts) going through Red LED and it may burn up. It's max is 5V.

So, I thought adding the diodes as specified in the mini circuit board. The single top diode is a schottky diode at .4V and the other two are regular diodes at .7V each or so.

Now, I've been told that two regular diodes will solve the opto-isolated board problem, but running a simulation, I'm getting -5.65V through to the Red LED. Still too much. Although the Red LED only flashes on for a brief moment when the switch is triggered and goes off.

The single schottky diode is needed for the 74HC circuit, because anything with a forward voltage drop more than .4V, and it won't allow the 74HC circuit sink to ground correctly.

And then there's a direct wired option, no diodes.

I'd like to add that capacitor on the mini circuit board, to help with noise issues that could occur in the cable, to help prevent false triggers.

So, Let me know what ya think of how to fix the existing switches I already had made up, and also a completely new redesigned switch for the future, if I decide to make more.

Thanks in Advance,
Jason
 

inwo

Joined Nov 7, 2013
2,419
The hall effect is an open collector device. Most likely. Will sink at either 5 or 12 volt levels.
I don't see a need for your diodes at all.

If all you are worried about is reverse current thru red led, just add the diode you have shown.

If that can't be done I'll try to think of something else.
 

inwo

Joined Nov 7, 2013
2,419
If the two diode drops aren't enough, use a zener.

The problem is that any voltage drop will prevent the open collector device from pulling load to 0 volts. That leads to problems.

You already have 5vdc available where you are putting diodes and jumpers.

Put in an open collector buffer.

I believe it will take two transistors to keep from inverting the output.

Someone else on here might think of a simpler buffer. Or in a smaller package if needed.
 

inwo

Joined Nov 7, 2013
2,419
An open collector optic isolator will serve as a non-inverting buffer.
You don't need the isolation but might save some room on pcb.
 
Top