Author Topic: IC, transistors, and 74hc4050 questions  (Read 5100 times)

0 Members and 1 Guest are viewing this topic.

Offline SzewczykmTopic starter

  • Regular Contributor
  • *
  • Posts: 55
IC, transistors, and 74hc4050 questions
« on: November 01, 2012, 02:47:34 am »

Hello all, I asked the following question to Dave and Chris and they directed me here, so. Just cut and pasted.  Tanks in advance for any help!

Can you guys answer one basic question for me?  Or point me to a resource that might answer this.  On my board I was using 2n2222's as switches.  The base leg is being controlled by output from 5v coming from a direct connection from a 74hc4050.  I was driving 20ma LEDs with this just fine, but higher loads (200-300ma) would cause the voltage to drop.

I read that this exact thing can happen if you don't have a resistor on the base.  I read about how to calculate the correct resistor value and I was able to fix the problem two ways.

The first was to add a 330ohm resistor in series between the 4050 and the 2n2222.  I sort of understand this, but here is where the Swiss cheese comes in.  Resistors limit current.  Why wouldn't a straight open trace have the correct amount of current to saturate the transistor under a heavier load?  Isn't an open wire close to 0 ohms and so amperage would be really high?  Why doesn't this work in the hfe equation?

I'm guessing that its because there's something about the resistor actually drawing current vs a strait connection, but I can't really reconcile this in my head.  Why is resisting current going through the base/emitter required to bring the transistor to saturation under a heavier load? 

The other solution was to use a MOSFET instead.  It seems to work if without a pull down resistor.  Is that because the 4050 sources and sinks current?  Am I asking for trouble if I don't have a pull down if the controlling signal is coming from an IC or is that ok to do?

Also, I'm using the 4050 because its taking a 5v ugly square wave and making it a nice 5v constant.  I started using it for this because I needed a 4049 to invert logic and found that it inverted the logic and cleaned up the signal.  So I used the 4050 to clean up the signal upstream for the rest of the circuit.  Is this what buffers are used for? 

I read about the Schmitt trigger and that the 4050 had some Schmitt trigger characteristics.  Am I using this correctly?  It works great, but I don't know if I'm using the best tool for the job here.

Thanks for any help, even if it's pointing me to the correct forum to ask the questions.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2861
  • Country: au
Re: IC, transistors, and 74hc4050 questions
« Reply #1 on: November 01, 2012, 03:18:00 am »
You would normally use a resistor in series with the base of the transistor.

Perhaps a diagram of what you've wired up would help.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: IC, transistors, and 74hc4050 questions
« Reply #2 on: November 01, 2012, 03:18:39 am »
The current into the base is pretty much unlimited without a resistor. Remember that the hFE equation does not work backwards. That is, maximum collector current is roughly IbhFE, but the base current is not limited by the collector current. It is limited only by the output capability of the 74hc4050 (I'm not sure if they're short circuit-tolerant; I doubt it) and the I/V curve of the transistor's base-emitter junction. I'm not entirely sure why the circuit works in one case but not another, but it may have something to do with the high load bringing the transistor closer to an overload, since you're already running a near short-circuit through the base. It can't be happy with that.

You are correct that the MOSFET works without a pulldown because the 4050 both sinks and sources. If it did not, the gate capacitance of the FET would keep it switched on for a fairly long time, and it very well could switch on received interference. The pulldown discharges the gate when the signal is switched off.

Yes, this is one of the uses of a digital buffer. The 74HC4050 does not seem to have Schmitt trigger inputs, but even a plain buffer will help.

Just to make sure you're connecting it right, see the attached diagram.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: IC, transistors, and 74hc4050 questions
« Reply #3 on: November 01, 2012, 03:22:41 am »
As an addendum to my circuit diagram, if your load is inductive (anything with a coil), such as a relay or a motor, add a diode antiparallel to it (running from the transistor's collector up to the power supply). When you shut it off, it will generate a high voltage spike, and the diode will short this to the power rail to prevent it from damaging the transistor.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline SzewczykmTopic starter

  • Regular Contributor
  • *
  • Posts: 55
Re: IC, transistors, and 74hc4050 questions
« Reply #4 on: November 01, 2012, 02:35:12 pm »
The load isn't inductive, but yes, I have seen that in many diagrams.

Is the Base/Emitter path considered a short?  Will I potentially damage the 4050 without a resistor in series between the 4050 and the transistor?

This leads me to another question about the Hfe calculation.  The datasheet for a 2n2222 shows Hfe of 40 with Vce=10v and Ic=500ma.  What if Vce is 12v or 20v?  Does Hfe drop further or is the datasheet (http://www.fairchildsemi.com/ds/PN/PN2222A.pdf) telling me that it bottoms out at 40?

I'll sketch up a diagram of the circuit.

Is there a rule of thumb with a pulldown on a mosfet?  IE, some distance between the 4050 (or some other like IC that sources and sinks) where you should have a pull down/up resistor on the gate?  Or is it just a good idea to *always* have a little 10k resistor or something there to make sure it's not floating?

Thanks!
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: IC, transistors, and 74hc4050 questions
« Reply #5 on: November 01, 2012, 03:04:45 pm »
The base-emitter path is not quite a short, but it's close enough to be bad to short out. A quick run through LTspice says 5V applied directly to the base of a 2N2222 gives about 400mA even with no collector current, and a power dissipation in the transistor of 2W. The Fairchild PN2222A datasheet specifies a maximum power of 0.625W. It does not give a maximum base current, but the NXP datasheet for the original metal can 2N2222 says 200mA. So not quite a short, but highly in excess of the absolute maxima. The NXP 74HC4050 datasheet specifies a maximum output current of ±25mA, so 400mA is hugely in excess of that as well.

The datasheet will also have plots showing how the values change with different conditions. The Fairchild PN2222A sheet says that with VCE = 12V, hFE becomes about 1.05 times the specified value, and with VCE = 20V, it becomes about 1.1 times the specified. It will also depend on collector current, of course. See the plots titled "Common Emitter Characteristics" on the last page, http://www.fairchildsemi.com/ds/PN/PN2222A.pdf.

The pulldown resistor on the MOSFET will determine how long it takes to shut off, if the gate is only driven high and just allowed to sink low by itself. This is very approximate, but it will take something on the order of RC seconds, where R is the pulldown resistance and C is the gate capacitance (check the datasheet). If you're not sure, feel free to include a pulldown as it will rarely interfere with proper functioning. If the gate is driven by a push-pull output (one that can sink and source), it should not need one. I wouldn't worry too much about the physical distance between them as long as it's always solidly connected.
« Last Edit: November 01, 2012, 03:34:05 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: IC, transistors, and 74hc4050 questions
« Reply #6 on: November 01, 2012, 03:08:39 pm »
Remember that when you are low-side switching a load, VCE should become very low when the load switches on. It will not be the full power supply voltage. If you're calculating hFE in these conditions, the hFE vs. IC graph will be much more useful than the hFE vs. VCE graph.

Of course, it is most useful to just find the minimum hFE according to the datasheet (first or second page), and assume the one you got is dismally worse. It doesn't matter if your base resistor is a bit too low.
« Last Edit: November 01, 2012, 03:52:01 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: IC, transistors, and 74hc4050 questions
« Reply #7 on: November 01, 2012, 03:42:26 pm »
If you're curious, here's a simulation of the switch-off of a 2N7002 (equiv. 2N7000) MOSFET with a 10K pulldown resistor. My RC estimate was sadly off by a factor of 10 - sorry about that. It is more complicated than that, as the MOSFET gate is hardly an ideal capacitor.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: IC, transistors, and 74hc4050 questions
« Reply #8 on: November 01, 2012, 03:47:47 pm »
And here is the same simulation with the pulldown resistor varied from 100 Ohm to 1Meg, because I'm bored.  ::)
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: IC, transistors, and 74hc4050 questions
« Reply #9 on: November 01, 2012, 04:06:02 pm »
I highly recommend you download and install LTspice. It's great for testing little things like this - you can do all the "very bad" stuff and probe around all you want without starting a fire! LTspice's 2N2222 wouldn't even mind if you stuck 111200 volts on its base! :) (It draws 10.9 kA at the base and dissipates 1.21 gigawatts) A nice, quick "magic smoke" test is to hold down 'alt' (this tells it to calculate power dissipation) and point at all your components, watching the status bar for unusually large numbers. Beats the hell out of really letting the smoke out.

Just remember that all of its components are ideal. Every 2N2222 is exactly the datasheet 'typical' part, with identical parameters and operating temperature. If you're testing a complicated circuit it can help immensely to change things up a bit (use two different kinds of transistor in what's supposed to be a 'matched' pair, vary the temperature - Dave did a video on that, change values, inject AC into your power supply, etc...). But it's great for quick "what if" tests.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8398
Re: IC, transistors, and 74hc4050 questions
« Reply #10 on: November 01, 2012, 04:16:34 pm »
Is the Base/Emitter path considered a short?
The simplest thing to remember is that it is a PN junction and behaves very much like a diode. There is a nearly constant voltage drop across it, meaning the IV curve is exponential.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf