Maker Pro
Maker Pro

Transistor pair to switch between Voltages

fatman57

May 27, 2013
110
Joined
May 27, 2013
Messages
110
I have a 400w ATX PSU that I want to drive an array of Peltiers. I would like to have 2 power settings, the 12v output and 5v output of the PSU.

My question is: can I simply have 2 transistors each with unique inputs (12v & 5v respectively) whose output is combined to the Peltiers? In this way either the 12v or 5v will be on and supply power.

Previously I have only made a setup where a single voltage is used (12v) and its wired so the transistor intersects ground from load and ground to PSU. This makes sense as there will be less power to handle at that end - this setup however may require transistors being between the positive output of PSU and positive input of Peltier. Can this be done? I am aware of leakage voltage issues too and am hoping diodes will solve this.

Failing that I presume a PWM setup using 12v is the only other option...?

Much obliged for any help!
 

dorke

Jun 20, 2015
2,342
Joined
Jun 20, 2015
Messages
2,342
I'm Assuming you can control the 12v and 5v being on/off separately.
All you need are a couple of schottky diodes to steer the voltage to your "Peltier load".
The diodes should have breakdown voltage greater than 12v,and current capability greater than the load.
The diodes will drop the voltage a bit (less than 0.5V).

If the 12V is present(regardless of the 5V) , the load will get 12V.
If the 12V isn't present and the 5v is the load will get 5V.

like so:
untitled2.JPG
 

fatman57

May 27, 2013
110
Joined
May 27, 2013
Messages
110
I'm Assuming you can control the 12v and 5v being on/off separately.
All you need are a couple of schottky diodes to steer the voltage to your "Peltier load".
The diodes should have breakdown voltage greater than 12v,and current capability greater than the load.
The diodes will drop the voltage a bit (less than 0.5V).

If the 12V is present(regardless of the 5V) , the load will get 12V.
If the 12V isn't present and the 5v is the load will get 5V.

like so:
View attachment 30236

Thanks! And much obliged for the diagram. What is F1 and F2?

Yes I was aware that the higher voltage would always win, but great that you confirmed it. I was also wondering how the PSU itself would be affected by having both its 5V and 12V lines literally wired together (both on at the same time). I also presume that it doesn't matter about the negatives as there can be a shared negative?

Using an Arduino it will have programatic controls to try and prevent both being on at the time, but some one in a million hardware failure could maybe lead to this happening. Would it cause voltage stress (or something else) on any component such as the PSU?
 

dorke

Jun 20, 2015
2,342
Joined
Jun 20, 2015
Messages
2,342
F1 and F2 are fuses to protect against malfunction(they are not a necessity but good to have).

The voltages are not wired together .
One diode is reversed biased(blocking)at any given time.
There may be a very short neglectable transition time(order of nsec) in which both diodes may be on at the same time.
It will have no effect.

This circuit allows for both voltages to be on at the same time.
the result is the load gets 12V and the 5v is blocked and isolated.

In fact one possible mode of operation is having the 5V constantly on,
and only turning the 12v on /off at will.

The "negatives"?
If you mean Ground (GND) of the power supply,then yes they are common.
 

fatman57

May 27, 2013
110
Joined
May 27, 2013
Messages
110
F1 and F2 are fuses to protect against malfunction(they are not a necessity but good to have).

The voltages are not wired together .
One diode is reversed biased(blocking)at any given time.
There may be a very short neglectable transition time(order of nsec) in which both diodes may be on at the same time.
It will have no effect.

This circuit allows for both voltages to be on at the same time.
the result is the load gets 12V and the 5v is blocked and isolated.

In fact one possible mode of operation is having the 5V constantly on,
and only turning the 12v on /off at will.

The "negatives"?
If you mean Ground (GND) of the power supply,then yes they are common.

Thanks! Really is a great help.

In fact one possible mode of operation is having the 5V constantly on,
and only turning the 12v on /off at will.
In this case to cut down the number of components would it be ok to only have a single transistor on the 12v and then 2 Schottky diodes on each voltage (12v and 5v).

Isn’t leakage voltage an issue on the 12v transistor?

Yes by ‘negatives’ I mean Ground (GND).
 

dorke

Jun 20, 2015
2,342
Joined
Jun 20, 2015
Messages
2,342
Yes, you can use a single Transistor on the 12V instead of S1(and eliminate S2).
A Mosfet Transistor is a good choice.
 

fatman57

May 27, 2013
110
Joined
May 27, 2013
Messages
110
Yes, you can use a single Transistor on the 12V instead of S1(and eliminate S2).
A Mosfet Transistor is a good choice.

Awesome, I've got all that stuff. Many thanks for all your help, its a much better circuit now.
 

dorke

Jun 20, 2015
2,342
Joined
Jun 20, 2015
Messages
2,342
Your welcome.
When you have the all circuit put together , post it if you like more review .
 

fatman57

May 27, 2013
110
Joined
May 27, 2013
Messages
110
Your welcome.
When you have the all circuit put together , post it if you like more review .

So I have penned a circuit together, I have all the parts on a circuit board waiting to solder, just wanted to confirm something. Please see image below, it is as I was advised to construct apart from one addition, two Red LEDs - my question is, I am not sure if it will work in this current configuration as I haven't tested it.

Desired functionality is that either red LED (D3 & D4) will turn on when its respective power source is operating (5V or 12V). I haven't checked the resistor values yet but quickly used an online calculator, should the LEDs be completely behind the schottky diodes?

final_circuit_v1.png
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
That circuit will always have 12V present at the output.

Also the LEDs across the Schottky diodes will never illuminate.

You should use P channel mosfets, and if the purpose of the LEDs is to show the activity of the 5 or 12 volt channels, place the LED between the Schottky's anode and ground.

Edit: you'll also need to pull the gates high instead of low to turn off the MOSFET.
 

fatman57

May 27, 2013
110
Joined
May 27, 2013
Messages
110
That circuit will always have 12V present at the output.

Also the LEDs across the Schottky diodes will never illuminate.

You should use P channel mosfets, and if the purpose of the LEDs is to show the activity of the 5 or 12 volt channels, place the LED between the Schottky's anode and ground.

Edit: you'll also need to pull the gates high instead of low to turn off the MOSFET.

Hi Steve, thanks for your input, I will adjust the LEDs as advised.

It will not have 12V at the output if the 12V MOSFET is off, no?

Why can I not use N Channel MOSFETs? I feel these better suit the use case as the majority of the time the supply will not be needed, it only needs to turn on when required - so I believe it will be more efficient to not have to pull the gates high to turn them off.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Using N channel mosfets like you have, the power can't be switched off. The current will be conducted through the body diodes.

You are high side switching. Use P channel mosfets.

You currently have resistors R2 and R4 pulling the gates low. Change them so they pull the gates high. Then use the microcontroller to pull the gates low to tun on the mosfet.

To work correctly with a device that doesn't have open collector outputs, you'll need to use a transistor to pull the gates low. Conveniently this will require a logic 1 (high) on the microcontroller output which is exactly what you have now.

You can use n channel mosfets as a high side switch, but you need an even higher voltage to pull the gates high.
 

fatman57

May 27, 2013
110
Joined
May 27, 2013
Messages
110
To work correctly with a device that doesn't have open collector outputs, you'll need to use a transistor to pull the gates low. Conveniently this will require a logic 1 (high) on the microcontroller output which is exactly what you have now.

Thanks steve, can I just use the microcontroller with the current setup (but replaced current N-Channel with P-Channel mosfet) and logic 1 (high) to keep the voltage high then logic 0 (low) to pull the gates low? This way I avoid adding extra components and modifying the layout of my circuit board.

You can use n channel mosfets as a high side switch, but you need an even higher voltage to pull the gates high.

Can you explain a little please?

I am thinking of going for IRF9530, max expected operating conditions are 12V@6 amps:
http://www.vishay.com/docs/91076/sihf9530.pdf

I have never used a P-Channel before so any advice would be much appreciated. Kind regards.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
To keep it simple, you must use a P channel MOSFET and an additional transistor to do level switching.
 

fatman57

May 27, 2013
110
Joined
May 27, 2013
Messages
110
To keep it simple, you must use a P channel MOSFET and an additional transistor to do level switching.

Thanks, would this circuit suffice to control the P Channel MOSFET:

p_channel_switch.png


The aim is that the NPN transistor only allow the Gate to be High if the microcontroller is outputting a high signal itself. When this signal is cut the Gate drops to GND. Much obliged for any input.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
No, you want the gate to be high UNLESS the output is high. With the gate high the MOSFET is off.

You have drawn the MOSFET upside down.
 

fatman57

May 27, 2013
110
Joined
May 27, 2013
Messages
110
You have drawn the MOSFET upside down.

Apologies, was drawn in a hurry!

No, you want the gate to be high UNLESS the output is high. With the gate high the MOSFET is off.

OK great, so gate wants to be high ONLY IF the output of MOSFET is wanted to be off - I think thats what you meant.

What I was saying is I added the NPN Transistor in a configuration (hopefully) that when the Arduino outputs high to the NPN Transistor it will be 'on' and connect the gate to +5 Volts (make it high). Otherwise the Arduino will be low and then the +5V rail will be disconnected to the gate, pulling the MOSFET gate low.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Resistor from gate to source. Source connected to +12V.

NPN transistor with emitter grounded, collector to gate, and base via a resistor to the microcontroller.

When the output is high, the MOSFET will be on. Some of the other gobbledygook was autocorrect nonsense.
 

fatman57

May 27, 2013
110
Joined
May 27, 2013
Messages
110
Resistor from gate to source. Source connected to +12V.

NPN transistor with emitter grounded, collector to gate, and base via a resistor to the microcontroller.

When the output is high, the MOSFET will be on. Some of the other gobbledygook was autocorrect nonsense.

My most sincere apologies, I really don't mean to be messing you around. Please see revision below:
p_channel_switch.png
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
That's perfect.

You weren't messing me around. I was posting on a phone and some words were autocorrected to other words which didn't make any sense. In addition it makes it really hard to draw pictures so I have to describe in words. You have done a great job!

In your drawing, r1 and r2 can be about 10k. They're not especially critical.
 
Top