Simple NPN voltage translator question

Discussion in 'General Electronics Chat' started by CasualKilla, Jan 6, 2016.

  1. CasualKilla

    Thread Starter New Member

    Dec 12, 2015
    21
    0
    I am trying to make a 24V to 5V voltage translator for an arduino input. I found the following diagram online, but I have a few question about the resistor selection. So since I am using a 2N2222A NPN, I will use hfe,min=30 and Ic,max=800mA from the datasheet. This gives:

    Rb1 > 30*Rc1
    Rc1 + Rb2 < 30*Rc2
    Rc1 < 24 / 0.8
    Rc2 < 5 / 0.8

    I am just curious why the designer would have used smaller base resistors than collector resistors, seems strange to me. Also, how do we know that the Vce(on) of Q1 won't cause the Q2 to turn on (would not expect Q2 to saturate, but I feel like we can't guarantee it won't turn on a little?).

    24V to 5V translator.png

    Datasheet of 2n2222a : http://www.onsemi.com/pub_link/Collateral/2N2222A-D.PDF
     
  2. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,991
    3,737
    It is not clear why the base resistor from the 24v digital signal. That could be 100k but, without knowing the rest of the circuit on that side.

    The 1k resistor to the right NPN base can be smaller or even zero (bare wire) since the 10k it is connected to will limit any current to that transistor's base.
     
  3. CasualKilla

    Thread Starter New Member

    Dec 12, 2015
    21
    0
    That was my thoughts exactly, but I am still confused as to how we can garentee Vce(on) for Q1 will not switch on Q2. Perhaps this is the purpose of the 1k (Rb2)? You can just assume the LHS is an ideal 24V digital signal.

    Edit: Datasheets for 2n2222a says Vce(sat),max = 1V, so the 1k does limit the base current to 1mA max in the case where Q1 is on. Does this prevent Q2 from turning on?
     
  4. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,991
    3,737
    You said...

    "but I am still confused as to how we can garentee Vce(on) for Q1 will not switch on Q2. Perhaps this is the purpose of the 1k (Rb2)?"

    I am not sure what you mean by this...?
    Assuming 24v is digital (on or off), then the transistor it is connected to will be off or on, respectively (and 5V output will match the 24v input logic).
     
  5. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,991
    3,737
    By the way, level translation is best done with a mosfet than NPN bjt. Commonly 2n7000 or smd equivalent 2n7002.
     
  6. Jony130

    AAC Fanatic!

    Feb 17, 2009
    3,957
    1,097
    But for what Ic current ??
    In your circuit Ic1_max ≈ 24V/10kΩ ≈ 2.4mA so Vce(sat) will be lower than 0.1V. So Q2 for sure will be cut-off.
     
  7. CasualKilla

    Thread Starter New Member

    Dec 12, 2015
    21
    0
    What I mean is that when the first NPN is "ON", it still has a small amount of voltage across it (The saturation voltage). This voltage may be high enough to switch on Q2.

    I was working with the maximum possible Vce(sat) to be conservative. The on-semi datasheet only says the base-emitter cuttoff current is between 10n and 10u amps though. Datasheet does not show the Vbe threshold voltage. So I guess we can assume Vce(sat)@2.4mA << Vbe(threshold) ??
     
  8. CasualKilla

    Thread Starter New Member

    Dec 12, 2015
    21
    0
    I think I just realized the reason why XD. With mosfets you will know with certainty the Vds(on) << Vgs(threshold).
     
  9. Jony130

    AAC Fanatic!

    Feb 17, 2009
    3,957
    1,097
    Data sheet give us EmitterBase Cutoff Current ( base- emitter junction is reverse biased ) but this has nothing to do with base-emitter voltage and Vbe(threshold). In fact small-signal BJT will by but off if Vbe < 0.4V.
    And also to ensure saturation always try to choose the resistor in such way that Ic/Ib = 10.
     
  10. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    Not at low collector currents. You already have all the clues.

    When on, each transistor has a collector current of approx. 2.4 mA. Look at figure 3 on page 3 of your datasheet. For a collector current around 2-3 mA, saturation voltage of Q1 is below 0.1 V. Now look at figure 4. For the same collector current, the base-emitter voltage of Q2 is 0.6 V This is guaranteed turn-off for Q2.

    Increase Rb1 to 10 K.

    ak
     
  11. CasualKilla

    Thread Starter New Member

    Dec 12, 2015
    21
    0
    I normally use the minimum value of Hfe for any Ic on the datasheet. Question, what is a good rule for thumb for selected the Ic in a signal conversion circuit? If we go soley on Ic,max, we get a minimum resistance of 24V/0.8A = 30 Ohms. Why do people always seem to use 10k?
     
  12. Jony130

    AAC Fanatic!

    Feb 17, 2009
    3,957
    1,097
    10K is very common value because at 5V, it only draws 0.5mA. so we do not have to check the power dissipation in transistor and in resistor.
    For your example 24*0.8A =19.2W. So how big the resistor you have to use? Also all this power must come from power supply.
     
    GopherT likes this.
  13. CasualKilla

    Thread Starter New Member

    Dec 12, 2015
    21
    0
    I understand that using a larger resistor leads to less power usage, but then the question arises why not use 20k, 100k or even 1M? If 30 Ohms is the lower limit, what is the maximum, and is their an "ideal" value somewhere inbetween. I would assume that one of the factors would be the input resistance of the pin, but are their other considerations?
     
    Last edited: Jan 6, 2016
  14. Jony130

    AAC Fanatic!

    Feb 17, 2009
    3,957
    1,097
    Well, the signal frequency, parasitic load capacitance, load resistance, noise immunity e.t.c. But your application is not so demanding, so you can use wide range of a resistor values. I suspect up to 1MΩ or even larger (10MΩ). But going lower than 1kΩ is a unnecessary waste of energy.
     
    CasualKilla likes this.
  15. hp1729

    Well-Known Member

    Nov 23, 2015
    1,944
    219
    Vce (sat) changes with collector current. At that 2.5 mA it will be around 250 mV.
     
    CasualKilla likes this.
  16. CasualKilla

    Thread Starter New Member

    Dec 12, 2015
    21
    0
    Thank you for replying everyone, you have helped me understand this circuit much better!
     
Loading...