# 1MHz with 2N2222

by likephysics
Tags: 1mhz
 P: 591 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.
 P: 3,796 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.
Mentor
P: 37,622
 Quote by likephysics 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.
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...

P: 3,796

## 1MHz with 2N2222

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.
 P: 161 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...
 Mentor P: 37,622 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...
 P: 5,462 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?
 P: 3,796 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.
 Sci Advisor P: 3,956 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.
P: 591
 Quote by vk6kro 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.
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
 Draft2.pdf (8.6 KB, 8 views)
P: 591
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.
@mdjensen22
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
 BJT slow.pdf (6.2 KB, 7 views)
P: 591
 Quote by Studiot 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?
I don't need that much current at all.
How do you calculate the recovery time constant?
 P: 3,796 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.
P: 591
 Quote by yungman 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.
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.
P: 3,796
 Quote by likephysics 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.
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:

http://www.ti.com/lit/ds/slus171c/slus171c.pdf

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?
 Sci Advisor P: 3,956 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:
P: 591
 Quote by vk6kro 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.
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
 Sci Advisor P: 3,956 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.

 Related Discussions Electrical Engineering 10