Simple level shifter

crutschow

Joined Mar 14, 2008
34,281
I_IN = 10nA for R1 = 1Meg.
I_IN = 38nA for R1 = 100k.
The input current equals the R3 emitter resistor current divided by the transistor beta, and that current is unaffected by the value of R1 (the collector of Q1 is connected to the +5V through the low-impedance of the base-emitter junction of Q2. which swamps the value of R1).

So for 3.3V input, the emitter current is ≈ 2.7V / 240k = 11.25μA
For the 2N3904 simulation model transistor Beta of 300, that would make the base current 37.5nA, very close to your second value (was that measured or calculated?).
 

Danko

Joined Nov 22, 2017
1,829
The input current equals the R3 emitter resistor current divided by the transistor beta, and that current is unaffected by the value of R1 (the collector of Q1 is connected to the +5V through the low-impedance of the base-emitter junction of Q2. which swamps the value of R1).

So for 3.3V input, the emitter current is ≈ 2.7V / 240k = 11.25μA
For the 2N3904 simulation model transistor Beta of 300, that would make the base current 37.5nA, very close to your second value (was that measured or calculated?).
@crutschow, you are right, as always:).
My mistake - that 10nA is rounded I_IN in circuit, where all 3 resistors are 1Meg:(.
They values - 10nA and 38nA are from simulation (calculated by LTspice).
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,218
That I don't understand. :confused:
Both transistors are off when idle (post #43 circuit).
What you fail to understand, my dear crutschow, is that your graphically challenged friend here inadvertently mirrored the transistor's symbols while drawing the PCB, so the collector and emitter of both components were flipped when they were soldered :mad:... it wasn't until I did a step by step retrace of everything I did that I found the error ... on top of that, there was a 0 ohm SMT resistor that I had used as a bridge between two traces that was properly soldered only on one side, while the other side looked soldered, but was in fact "floating" :mad: ... the thing is now working perfectly well, using resistor of values that I had in stock. I might change the 1M pull-down resistor (R2) to one of a more conservative value in the future (say, 100k), to allow for a quicker discharge of the mosfet's gate. But at this point, the circuit is working perfectly fine.


upload_2018-7-11_12-27-47.png
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,218
One question. What does resistor R4 do? Eats 6uA only. This circuit does not need it at all.
It pulls Q1's gate down. Q1 is triggered by an MCU's output that goes through a diode before reaching the transistor's gate, therefore the gate is left floating when the 3.3V goes down to zero. Now, I know that transistors are current-driven devices, so in theory, that pull-down is not needed (yes, I understand, the 2n3904 is not a mosfet) ... but I'm willing to listen to your advice ... would it be safe to remove R4?
 

Danko

Joined Nov 22, 2017
1,829
It pulls Q1's gate down. Q1 is triggered by an MCU's output that goes through a diode before reaching the transistor's gate, therefore the gate is left floating when the 3.3V goes down to zero. Now, I know that transistors are current-driven devices, so in theory, that pull-down is not needed (yes, I understand, the 2n3904 is not a mosfet) ... but I'm willing to listen to your advice ... would it be safe to remove R4?
Well, when you provided information about diode, I can say that resistor R4 is necessary.
 
Top