Simple level shifter

Thread Starter

cmartinez

Joined Jan 17, 2007
8,218
Just got the thing up and running in real life, and it's driving the mosfet's gate quite acceptably. After tweaking it a little, these are the values that worked best for the application:

upload_2018-7-9_21-32-1.png

R1 had to increased to 1M because Q2 was drawing too much power while on. R4 and R5 were adjusted to 470 so as to draw enough current and avoid a nasty voltage drop of almost half a volt at the output when the circuit was activated.

Many thanks to everyone for their timely help.
 

crutschow

Joined Mar 14, 2008
34,280
R4 and R5 are way smaller than they need to be, by at least two orders of magnitude.

Something is wrong with your simulation if it says otherwise.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,218
R4 and R5 are way smaller than they need to be, by at least two orders of magnitude.

Something is wrong with your simulation if it says otherwise.
You mean I could change R4 and R5 to 1K with no problem? Or do you mean two orders of magnitude as in 100x?
 

crutschow

Joined Mar 14, 2008
34,280
Or do you mean two orders of magnitude as in 100x?
Yes I mean by a factor of 100, such as 47kΩ.

Simulation is fine to refine a design but you need to understand what you are designing.
Random selection of parts values is not a good design approach.
That will likely give bad or poorly optimized circuits.

For good switching saturation of a BJT, the base current needs to be no more than 10% of the collector current.
Your circuit has the base current about a factor of 36% (1/3) of the collector current for Q1, and 183,000% (1,830) of the collector current for Q2 (talk about overkill :eek:)
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,218
For good switching saturation of a BJT, the base current needs to be no more than 10% of the collector current.
now that ... I did not know ... I'll start tweaking it a little more, see if I can better comply with the standards you're suggesting ...
 

dl324

Joined Mar 30, 2015
16,839
now that ... I did not know ... I'll start tweaking it a little more, see if I can better comply with the standards you're suggesting ...
Assuming a beta of 10 for saturation mode is a conservative design. Some people use 20, but I was taught to use 10, and all manufacturer data I've seen uses 10; they know more than most of us, so I feel confident using manufacturer specifications.
 

ebeowulf17

Joined Aug 12, 2014
3,307
Yes I mean by a factor of 100, such as 47kΩ.

Simulation is fine to refine a design but you need to understand what you are designing.
Random selection of parts values is not a good design approach.
That will likely give bad or poorly optimized circuits.

For good switching saturation of a BJT, the base current needs to be no more than 10% of the collector current.
Your circuit has the base current about a factor of 36% (1/3) of the collector current for Q1, and 183,000% (1,830) of the collector current for Q2 (talk about overkill :eek:)
Can you help me understand those numbers? Either I'm analyzing paths wrong or I've slipped some digits, but my numbers are nowhere near yours. Here's what I get:

Q1:
Base: (3.3V - 0.7Vbe) / 470R = 5.5mA
Collector: (5V - 0.7Vbe - 0.2Vce) / 470R = 8.7mA
So base is 63% of collector, or 6x what's needed.

Q2:
Base: same as Q1 collector: 8.7mA
Collector: (5V - 0.2Vce) / 1000 = 4.8mA (plus whatever the destination of this circuit's output draws.)
Base current = 181% of collector, or 18x what's needed.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,218
Ok, so according to the previous observations, these are the adjustments I'll be making:

R4 = 10k, R5 = 10k

We have to remember that Q2's function is not to let current through R1, but rather to drive the gate of a mosfet connected to "out". The mosfet in question is the TK40E06N1, whose total gate charge is 23 nC. This nFet won't be switched at frequencies higher than once per second.
 

wayneh

Joined Sep 9, 2010
17,496
Just got the thing up and running in real life, and it's driving the mosfet's gate quite acceptably. After tweaking it a little, these are the values that worked best for the application:


R1 had to increased to 1M because Q2 was drawing too much power while on. R4 and R5 were adjusted to 470 so as to draw enough current and avoid a nasty voltage drop of almost half a volt at the output when the circuit was activated.

Many thanks to everyone for their timely help.
I’m glad you’re getting a solution but I’m a little surprised this is the “simple” solution. It doesn’t seem so simple. I suppose that stipulating low current is to blame for added complexity?
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,218
I’m glad you’re getting a solution but I’m a little surprised this is the “simple” solution. It doesn’t seem so simple. I suppose that stipulating low current is to blame for added complexity?
Yes, as very low current as possible... honestly, I didn't think it would be this "hard" ... and I mean "hard" as in having to do all these calculations. But hey, I'm learning tons about transistors here ... and that's what this place is all about, ain't it? ;)
 

wayneh

Joined Sep 9, 2010
17,496
Yes, as very low current as possible... honestly, I didn't think it would be this "hard" ... and I mean "hard" as in having to do all these calculations. But hey, I'm learning tons about transistors here ... and that's what this place is all about, ain't it? ;)
You bet!

When you get to an actual build, and if you want to experiment with reducing current even more, you can try increasing the ohms of those base resistors. The factor of 10 is a good rule of thumb but you can often squeeze 20-50 or even 100 out of it without ruining the function of the circuit. If you're designing for mass production, you need to keep the safety factor but if you're doing a one-off, tweaking can squeeze down the current draw to the bleeding edge.
 

dl324

Joined Mar 30, 2015
16,839
The factor of 10 is a good rule of thumb but you can often squeeze 20-50 or even 100 out of it without ruining the function of the circuit. If you're designing for mass production, you need to keep the safety factor but if you're doing a one-off, tweaking can squeeze down the current draw to the bleeding edge.
@cmartinez If you use a ratio other than 10, make sure to note the fact that you cherry picked parts on the schematic so no one looks at the circuit and questions the robustness of the design. 10 is the commonly accepted beta for saturation mode.

It'll save you some professional grief and the person who might do a repair in the future using the same part number that happens to have a lower beta.
 

crutschow

Joined Mar 14, 2008
34,280
We have to remember that Q2's function is not to let current through R1, but rather to drive the gate of a mosfet connected to "out". The mosfet in question is the TK40E06N1, whose total gate charge is 23 nC. This nFet won't be switched at frequencies higher than once per second.
So if your frequency is so low, why are you worried about driving the gate charge rapidly?
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,218
why are you worried about driving the gate charge rapidly?
I'm not worried :p ... it's just that when I tried to make the thing work with all of the resistors as 470k, there was a voltage drop of almost 1/2 a volt at the output that I didn't like (because it's too close to the minimum nFet gate trigger value), and so I started tweaking with the values of R4 and R5 ... and now I realize I was too aggressive when I lowered them.
 
Top