Convert 5V Square Wave to 24V at 1MHz with 2N2222

  • Thread starter likephysics
  • Start date
In summary: I tried a simulation on this.With the following:Emitter resistor ..(unbypassed).....50 ohmsCollector resistor .......500 ohmsBase resistor (from 24 V supply to base) 220 KInput 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
  • #1
likephysics
636
2
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.
 
Engineering news on Phys.org
  • #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.
 
  • #3
likephysics said:
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...
 
  • #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.
 
  • #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...
 
  • #6
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...
 
  • #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?
 
  • #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.
 
  • #9
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.
 
  • #10
vk6kro said:
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?
 

Attachments

  • Draft2.pdf
    8.6 KB · Views: 400
  • #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.
@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.
 

Attachments

  • BJT slow.pdf
    6.2 KB · Views: 341
Last edited:
  • #12
Studiot said:
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?
Are you talking about the load capacitance?
 
  • #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.
 
  • #14
yungman said:
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.

At 1MHz, I don't think it's adviceable to use solderless breadboard.
I am doing this for a colleague. Interesting, but not enough time to do a PC board.
 
  • #15
likephysics said:
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?
 
  • #16
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:
220px-Schottky-Transistor-ersatz.svg.png
 
  • #17
vk6kro said:
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
 
  • #18
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.
 
  • #19
vk6kro said:
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.

Ok. great. But why does this ckt work so much better than the simple CE switch.
 
  • #20
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.
 
  • #21
How do you determine Ic without simulating.
I tried assuming Vbe=0.8, then using Ic = Is exp (Vbe/Vt)
Is is not in the datasheet. From the web, i got 14fA
with 14fA, Ic = 330mA (huge!)
With this Ic, Vc will be 165v. Impossible.
How do you determine Ic max.
Would have been simple if emitter was grounded. Icmax would be (Vcc-Vce(sat))/Rc
What is the max voltage across Re.
 
  • #22
If you assume 500 ohms as the collector resistor, (which you did) this determines the rest of the circuit.

I allocated 50 ohms as an emitter resistor (to get a gain of 10) and then the transistor had to be another 500 ohms at no signal.
This is because the transistor and the collector resistor need to share the voltage equally because the output signal can then swing equally in either direction.

So, that meant there was 500Ω / 1050Ω *24 V or 11.42 volts across the collector resistor.

So, the current in the collector resistor is 11.42 volts / 500 ohms or 22.84 mA.

Note that this amplifier is quite linear and you could amplify a sinewave with it, provided you adjust the base resistor to set the collector voltage to (24 V - 11.42 V) or 13 volts approximately
 
  • #23
vk6kro said:
If you assume 500 ohms as the collector resistor, (which you did) this determines the rest of the circuit.

I allocated 50 ohms as an emitter resistor (to get a gain of 10) and then the transistor had to be another 500 ohms at no signal.
This is because the transistor and the collector resistor need to share the voltage equally because the output signal can then swing equally in either direction.

Why did you assume the transistor has to be at another 500 ohm. The design should guarantee the output can swing equally in both directions, correct?
 
  • #24
likephysics said:
Why did you assume the transistor has to be at another 500 ohm. The design should guarantee the output can swing equally in both directions, correct?

Yes, that is right. The transistor can go between being fully off to fully on, so it must start with half the available voltage across it.

This is the normal design process for common emitter amplifiers. In this case a volt or so is not available due to the emitter resistor, but that happens if the emitter resistor is bypassed as well.
 

1. How can I convert a 5V square wave to 24V at 1MHz using a 2N2222 transistor?

To convert a 5V square wave to 24V at 1MHz, you can use a 2N2222 transistor in a common emitter configuration. This means that the input signal will be applied to the base of the transistor, while the output will be taken from the collector. By properly biasing the transistor and choosing appropriate resistor values, you can achieve the desired voltage amplification.

2. What is the purpose of using a 2N2222 transistor in this circuit?

The 2N2222 transistor is used as a voltage amplifier in this circuit. It allows for the input 5V square wave to be amplified to a higher voltage of 24V at a frequency of 1MHz. This is useful for applications that require a higher voltage signal, such as in power supply circuits or signal processing.

3. What are the key factors to consider when designing a circuit to convert 5V square wave to 24V at 1MHz with a 2N2222 transistor?

Some key factors to consider when designing this circuit include choosing the appropriate resistor values to bias the transistor, selecting a suitable power supply for the circuit, and ensuring proper heat dissipation for the transistor. It is also important to consider the frequency and amplitude of the input signal and the desired output signal quality.

4. Are there any limitations to using a 2N2222 transistor for this conversion?

While the 2N2222 transistor is a commonly used and versatile transistor, it does have some limitations. It has a maximum voltage rating of 40V and a maximum frequency rating of 300MHz. Therefore, it may not be suitable for applications that require higher voltages or frequencies.

5. Can this circuit be modified to convert a different input signal to 24V at 1MHz?

Yes, this circuit can be modified to convert a different input signal to 24V at 1MHz. The key is to ensure that the biasing and resistor values are chosen appropriately for the new input signal. It may also require selecting a different transistor with suitable specifications for the new signal. It is important to carefully calculate and test the circuit to ensure proper functionality.

Similar threads

  • Electrical Engineering
Replies
9
Views
19K
Replies
2
Views
5K
Replies
16
Views
10K
  • Electrical Engineering
Replies
4
Views
2K
  • Electrical Engineering
Replies
13
Views
6K
Replies
5
Views
12K
  • Electrical Engineering
Replies
14
Views
15K
  • Electrical Engineering
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
25
Views
8K
  • Electrical Engineering
Replies
4
Views
7K
Back
Top