Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

1MHz with 2N2222

  1. Feb 7, 2012 #1
    I need to convert 5V square wave to 24V at 1MHz.
    I tried using common emitter ckt with 2N2222 on the breadboard , the max I could go was about 100KHz. Rb is 1K. Rc is 500Ω
    Playing with the collector resistor improved the speed a little.

    Where can I find the math for a design like this?
    Also, why does the speed depend on collector current.
  2. jcsd
  3. Feb 7, 2012 #2
    You need to post the whole circuit and take a picture of the breadboard. Your breadboard might add parasitic that cause the problem.

    What emitter current are you running? Are you grounding the emitter? If you are grounding the emitter, you gain is quite high. If you say running at 1mA, the emitter resistance is only 25ohm and you have gain of 500 divided by 25 is 20. I f you run higher current than this, you might run into miller effect that limit the frequency if you have a 1K resistor in series with the base. Try eliminate the 1K resistor at the base and see.

    Beta of transistor ( Hfe) depend on current.
  4. Feb 7, 2012 #3


    User Avatar

    Staff: Mentor

    You need to use a cascode circuit to reduce the Miller capacitance effect on your bandwidth. Just do a little Google searching to learn about the cascode configuration and why it helps your bandwidth...
  5. Feb 7, 2012 #4
    I would like to see his layout and exact circuit first. There are higher frequency transistors that will work a lot better. But at 1MHz, layout and by pass cap comes into play. I want to know what breadboard he meant, if it is those solderless type, that is getting iffy for this frequency.
  6. Feb 7, 2012 #5
    To tack on to yungman's point, if I recall correctly, it was something like signals over 200KHz are a no-no for solderless breadboards due to parasitic capacitances. It's been a while though...
  7. Feb 7, 2012 #6


    User Avatar

    Staff: Mentor

    Certainly layout parasitics play a roll.

    As one additional comment on my suggestion above, you may need to look at push-pull cascode circuits to get good bandwidth for your 24V square wave...
  8. Feb 7, 2012 #7
    500Ω load switching 24 volts (at 1Mhz). That's nearly 50 milliamps.

    You can calculate the recovery time constant to discharge any capacitance charged up by this 'enormous' current. No wonder your transistor cuts out at 100khz.

    I doubt even a cascode will handle this.

    Do you really need this level of current?
  9. Feb 7, 2012 #8
    True, I missed the switching part. Open collector is never good for high frequency and the saturation recovery of BJT is over 1uS. MOSFET will do a lot better in this application.

    But if I were to do this, I'll start with push pull. Something like a MOS driver, but I don't think they do 24V. If he can live with 20V, it would be easier. Or maybe a high speed rail to rail opamp depend what kind of load it is driving.
  10. Feb 8, 2012 #9


    User Avatar
    Science Advisor

    I tried a simulation on this.

    With the following:
    Emitter resistor ..(unbypassed)..................50 ohms
    Collector resistor ...................................500 ohms
    Base resistor (from 24 V supply to base) 220 K
    Input via 10 uF capacitor.
    2N2222 transistor.

    I got a gain of 10 at 1 MHz and still a gain of 9 at 10 MHz. Output is about 22 volts p-p with 2.2 V p-p input.

    There is some voltage drop (about 1 volt) across the 50 ohm emitter resistor, so the supply voltage may have to be increased slightly to compensate for this. Collector current is about 21 mA.
    Input impedance about 2000 ohms.

    This is only a simulation, but I have found this type of amplifier with an unbypassed emitter resistor has a lot of advantages, including predictable gain and wide bandwidth.
  11. Feb 8, 2012 #10
    This ckt works quite well. I'm pretty sure this will work at least up to 500KHz on the breadboard. I get some dips in the waveform in the beginning and goes away after a while.

    I'm trying to get 0-20v at least. But it has to be close to ground (< 0.5v).
    Can I use a PNP to get 0-24v?

    Attached Files:

  12. Feb 8, 2012 #11
    The ckt is a trivial NPN switching ckt (attached).

    Breadboard does limit the frequency. But, I observed similar behavior in simulation and bread board. Waveform started to look slopy at 150KHz on breadboard, in sim same behavior at 300KHz.
    Sometime ago, I was able to get 4MHz on breadboard. I think 200KHz is far too low. You can sqeeze more if you careful with bypass caps.

    Attached Files:

    Last edited: Feb 8, 2012
  13. Feb 8, 2012 #12
    I don't need that much current at all.
    How do you calculate the recovery time constant?
    Are you talking about the load capacitance?
  14. Feb 8, 2012 #13
    Are you driving the transistor to get close to 0V and to 24V? Whenever you drive a BJT to saturation, it will take over 1uS just to get out of it. That's the reason they use schottky diode to get faster recovery. If you are driving the transistor in switching mode where the transistor goes into saturation, you better off using a logic level enhancement mode N-channel MOSFET. MOSFET don't have saturation recovery problem like BJT.

    At 1MHz, I don't think it's adviceable to use solderless breadboard.
  15. Feb 8, 2012 #14
    I did use a schottky diode in simulation. Wasn't able to observe much difference. I probably didn't pay attention to the diode I picked.
    I ordered some high speed opamps yesterday.
    No enhancement Mosfets in the lab though. NTD4815N looks like a good choice.

    I am doing this for a colleague. Interesting, but not enough time to do a PC board.
  16. Feb 8, 2012 #15
    High speed opamp will work, make sure get rail to rail. The NTD4815N is too high power, it has too much input capacitance and you are going to have problem driving it.

    I am more looking at this kind of driver for you. Here is one that I looked through very quickly:


    Do some more search, put in "MOSFET drivers", you'll find some that take TTL input and output 0 to 24 or something close. Why monkey around if you can find one that do the job?
  17. Feb 8, 2012 #16


    User Avatar
    Science Advisor

    This ckt works quite well. I'm pretty sure this will work at least up to 500KHz on the breadboard. I get some dips in the waveform in the beginning and goes away after a while.

    I'm trying to get 0-20v at least. But it has to be close to ground (< 0.5v).
    Can I use a PNP to get 0-24v?

    Yes, good idea.
    PNP should work OK. Just pick one with a high voltage rating so you can give it a high voltage supply. Possibly 35 volts would be enough.

    To avoid storage time effects, you can use a Baker clamp or the Schottky version:
  18. Feb 9, 2012 #17
    Woohoo! This ckt works like a charm.
    Tried it on the breadboard. Works quite well up to 3MHz.

    But why does it work.
    It's just base bias and emitter resistor.
    The emitter resistor increases input impedance.
    For the ckt, with Rc=500, Re=50, Rb=220k, Vcc=24v
    Voltage at collector is 2.5
    So Ic = (Vcc-2.5)/Rc = 43mA
    Vbe = 0.83v
    Ib = (Vcc-Vbe-Vre)/220K = 95uA
    β = 450???

    How did you get Ic=21mA
  19. Feb 9, 2012 #18


    User Avatar
    Science Advisor

    The collector voltage is about 13 volts and it swings equally in both directions, up and down.

    So, 24 - 13 = 11 volts
    Current in the 500 ohm resistor is 11 / 500 or 22 mA.

    On peaks, it draws twice that and when the input is low, the collector current is small.

    If you measured it with a 1:1 square wave, it would measure about 22 mA.
  20. Feb 9, 2012 #19
    Ok. great. But why does this ckt work so much better than the simple CE switch.
  21. Feb 9, 2012 #20


    User Avatar
    Science Advisor

    That unbypassed emitter resistor is innocent looking, but it has a huge effect.

    It produces negative feedback which reduces the gain of the amplifier but makes it predictable and almost independent of the transistor's current gain.
    So, the gain of this circuit is fairly close to 500 divided by 50, or 10.

    Because of this reduction in gain, the Miller effect is reduced. This is the effective capacitance seen at the input and it is proportional to gain. Miller effect even affects the high frequency performance of audio amplifiers and is deadly at 1 MHz.

    Also, the input impedance is increased, which means that a smaller coupling capacitor can be used and a greater proportion of the drive voltage is used in the transistor.
    (Incidentally, if you are only using this at 1 MHz, the input capacitor can be reduced to as low as 100 pF, but 0.1 uF would be OK).

    Also, the input of a common emitter amplifier is very non-linear, being the impedance of a forward biased diode. With this circuit, the input impedance is largely resistive and much more linear.

    Drive voltages of 2 or 3 volts are possible, too, while voltages of only a few mV are possible with a common emitter amplifier without causing distortion.

    The disadvantage is that the gain is lower than it could be with a common emitter amplifier. However transistors are cheap and amplifiers like this one can be constructed easily and cascaded for more gain.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook