# Back to transistors!

Discussion in 'The Projects Forum' started by rougie, Mar 10, 2013.

1. ### rougie Thread Starter AAC Fanatic!

Dec 11, 2006
410
2
Hello,

6 months ago I applied myself to learn a little about transistors. I took a lot of notes and you guys were great help. Still far from being an expert though!

Now, 6 months later, I require the use of a transistor to convert a CPLD 3.3/0VDC signal to 4.0/0 VDC signal as follows:

Square wave signal coming out from CPLD: 3.3-0VDC

connvert to:

Square wave signal of: 4.0-0VDC

Therefore, I decided to use a 2n2222 transistor. After testing and calculating with simple formulas I came out with the following circuit in the attachment.

The way I did this was I set the requirements as:
- Let IR1 be 1ma
- Let VR1 be 1V
- Let VR2 be 4V
- Let Beta be 100 (Even though we know beta can vary)
- Let Vbe be 0.7V
- Let IR3 be 30 times the Ic/Beta current (Sorry 10 times didn't quite cut it)

R1 = 1V/1ma = 1K
R2 = 4V/1ma = 4K

IR3 = (Ic/Beta)30 = (1ma/100)30 = 300ua
R3 = (3.3-0.7)/300ua = 8.6K = didn't have !!! used a 7.1K

The components values I used in my attachment given by the above calculations works very fine.

-Questions:
1) My question is, did I use the correct circuit configuration to do this or is there a better way?

2) As you may have noticed my circuit is also an invertor. Is there a way to make my circuit (Just using one transistor) do the the same voltage conversion without the inversion?

3) I am getting 0.13VDC when the base is 3.3V. Shouldn't I get a better groung like somewhere around... 0.04VDC???

Thanks all feedback appreciated!
r

• ###### 3_to_4.jpg
File size:
139.3 KB
Views:
38
Last edited: Mar 10, 2013
2. ### Brownout Well-Known Member

Jan 10, 2012
2,373
1,003
10 times didn't cut what? What does that mean? You're constrined by the specs of the device, and have to work with them. You can't just ignore them when you want.

R2 has no purpose. It should be removed.

R1 should drop most of the 4V when the transistor is turned on. If you want 1K, then IC needs to be 4V/1K = 4mA.

Assuming IC=4mA, then IB = 4mA/10 = 400uA.

R3 = 2.7V/400uA = 6K or whichever value is close.

You're on the right track. Eliminate R2 and use correct values.

There's not a better way. Use 2 stages of inversion to get the signal polarity correct.

You need to drive the transistor into saturation. You must use IB=IC/10. Also, you need a 10k or so resistor from base to ground to make sure the transistor turns completely off when the input is low. This may make it necessary to recalculate R3.

Also, the calculations I've shown are for illustrative purposes. Using them just barely gets you where you want. To get good signals, use IC = 1.5X to 2X the minimum shown in the equations.

3. ### rougie Thread Starter AAC Fanatic!

Dec 11, 2006
410
2
Hi brownout,

okay, I will try it tommorow !

I will get back and let you know how it worked out!

r

4. ### Brownout Well-Known Member

Jan 10, 2012
2,373
1,003
I didn't notice you have 5v connected, and so now i see the reason for R2. I guess it's OK to leave it in. You might consider replacing it with a 3.9V zener.

5. ### rougie Thread Starter AAC Fanatic!

Dec 11, 2006
410
2
I never really create my own circuits using transistors since I up to now pretty much used other circuit configurations that I saw in articles or books or on the forums. So yes, this is why I added in R2! I thought of using R1 and R2 as a voltage divider while the transistor is in cut-off mode. And using that voltage divider point for ground when the transistor is in saturation mode.

So now that we both know exactly what I am trying to do.

Question:

-You said:

"R1 should drop most of the 4V when the transistor is turned on. If you want 1K, then IC needs to be 4V/1K = 4mA."

I guess you meant:

"R1 should drop most of the 1V when the transistor is turned off. If you want 1ma, then R1 needs to be 1V/1ma = 1K" !!!

right??
r

6. ### Brownout Well-Known Member

Jan 10, 2012
2,373
1,003
R1 needs to drop 1V when the transistor is turned off, and 5V when it's turned on. So, you need to design for IC>5mA during transistor turn on, if you want RC=1k.