Re: PMOS in parallel with NMOS



On May 8, 2:20 pm, Tomás Ó hÉilidhe <t...@xxxxxxxxxxx> wrote:
On May 8, 6:57 pm, rickman <gnu...@xxxxxxxxx> wrote:

On May 8, 12:58 pm, Tomás Ó hÉilidhe <t...@xxxxxxxxxxx> wrote:

On May 8, 4:20 am, rickman <gnu...@xxxxxxxxx> wrote:

Before I bother to address the design issues you present, I want you
to go back and reread the last couple of messages you posted and tell
me exactly what circuit you have described. I only see described a
pair of transistors with their B-E junctions connected directly to the
power supply. I have no idea if you are talking about an emitter
follower configuration or a common emitter configuration.

Take a PNP bi-polar transistor.
Connect 0 volts directly to the base.
Connect 5 volts directly to the emitter.
Connect the anode of the LED to the collector, and the cathode of the
LED to ground.

What power supply are you using?

The 0 volts on the base is provided by a microcontroller pin.
The 5 volts on the emitter is a direct connection to Vcc (which
happens to come from an LM7805 voltage regulator. The voltage
regulator is powered by a 9 volt square battery).

Ok, so you are *NOT* putting 0 volts on the base. You are pulling the
base low with an MCU pin. This is totally different. The MCU is
using a MOSFET to pull the base low and the MOSFET has limited drive
capability. The B-E junction is very voltage limited. So you have
maybe 0.8 volts across the B-E junction and 4.1 volts across the I/O
pin with a relatively high current through it. This means it is
dissipating a *lot* of power relative to what it is designed for.
Does the MCU maker give a max current rating on the I/O pin? I am
sure it is much lower than the current through your B-E junction and
the I/O pin. Whether multiplexing will proportionally increase the
max current rating on the MCU pin is doubtful. If you try to get the
maker to tell you it is ok, you will find they won't do it. There are
too many things that can go wrong. Since you don't even have an idea
of what the current is, there is no way to say it is ok.


When you turn this circuit on, how
long does it operate before the smoke comes out?

Nothing "bad" happens. Also, the green LED's don't glow yellow.

At this point, I am not as worried about the LEDs as I am the MCU.
However, the same thing that is happening at the I/O pin is happening
with your transistor. It is potentially dissipating more power than
it is designed for. Unless you know the current, you don't know the
power in it. Also, the current will vary greatly as the power supply
voltage changes and the parts change with process, and let's not
forget temperature. Those are the big three variables in
semiconductor design, voltage, temperature and process. Your design
needs to accommodate all of them separately and together.


Do you actually have
5 volts on the emitter?

Yes, the emitter goes straight to the 5 volts coming out of the
LM7805.

What is the voltage on the base and
collector?

The base is getting 0 V from a microcontroller pin.
The collector goes to the anode of an LED, and the cathode of this LED
goes straight to ground.

You didn't measure the voltage on the base, because I *KNOW* it is not
0 volts if the emitter is 5 volts. I asked for these voltages in
order to know more about the circuit and to show you how badly you are
treating the parts.


There is something wrong with this. Either the circuit is
not what you expect, or your supply can't drive more than a few mA and
the voltage is very low.

I know, it's a bit funky, I realise. If I use a power supply of better
quality then I've to turn down the pulse width of the LED's to stop
the board from dying. I realise this is dodgy, which is why I'm
currently going over the design.

I am pretty sure that even a 9 volt battery can blow out a transistor
or LED. The problem I am having is that you don't seem to understand
that you are operating all of the parts outside of their spec so that
you don't know the current and voltages on the parts. So you don't
have *any* idea of how far you are outside the specs. You have to
measure something. You can't just assume all the parts are working
the same as normal.


Even then, the voltage across the B-E has to
be equal to the sum of the voltage across the E-C added to the voltage
across the LED. The LED will not turn on without at least 1.5 volts
or so. The B-E will not support more than about 0.9 volts without
burning up. So which is it, the transistor going up in smoke or the
LED not lighting?

The B-E voltage *should* normally be about 700 mV. Since I have 5 V
applied across it though, there must be 4.3 V dropped *somewhere*.
Maybe it's dropped in the internal resistance of the microcontroller
pin, maybe it's dropped inside the transistor some how. I don't know.
I'll be going over it.

Yes, this is what I wanted you to think about. Now make some
measurements and *find out* where the 4.3 volts is being dropped.
This is the sort of learning that will stick with you forever.


If the circuit does not burn and the LED lights, then explain to me
what is wrong with what I have said above.

I can only conclude that there's non-negligible voltages being dropped
internally in the components. (Yes, I realise this is a bad thing).

Yup, you are starting to catch on. You still need to tell me *where*
the excess voltage is being dropped.


In your description above, where is the narrow pulse width??? As
others have told you, if you read the data *** for the LED they tell
you that there is a maximum current regardless of the duty cycle.
That is because at sufficiently high currents damage is done to the
LED. It may not be apparent for awhile, but it is cumulative. If you
don't believe this, then why does the data *** give you a max
current spec?

I've only ever heard things like "maximum current rating of 25 mA".
I've never seen any mention of "max max maxium" for use in display
multiplexing. Before I order more LED's I'll go over the data***.

A lot of diodes are rated for pulsed operation. They even publish
curves showing how the max power (or current) varies with the duty
cycle. The instantaneous power is the same as the steady state rating
at wide pulse widths and rises with lower duty cycles. Obviously it
can't rise forever until it becomes an impulse with infinite current
and zero width. Instead it levels off at some point that depends on
the internal construction of the diode. Dig around for diodes that
aren't LEDs and find one with this curve.


It seems quite conceivable to me that I'm experiencing the same thing
with the transistor, i.e. I'm putting a massive current thru it but
it's OK because the pulse width and duty cycle are low enough that it
won't get damaged.

Yes, if you keep them low enough. But if you connect the base and
emitter of a bipolar transistor across a 5 volt supply it will burn
up, period, full stop.

Well firstly there's no such thing as a perfect power supply for two
reasons:
1) You never have just a voltage. It's always "a voltage behind a
resistance". Many times, the internal resistance is negligible, but
other times you'll find that a 5 volt supply is only giving you 4 V
because there's a voltage being dropped inside the power supply.
2) You're assuming that the voltage supply is linear in terms of
resistance versus current. That is, if you halve the resistance across
it, the current flow should double. Irrespective of the internal
resistance of the supply, there's other things that make resistance
versus current flow non-linear. (Admittedly, I don't know of any of
these things, but I'm pretty sure an LM7805 wll start acting weird if
you try to draw higher and higher currents from it).

Anyway, the point I'm making is: Just because you put 5 V across B-E,
that doesn't mean that the whole 5 V is going across the B-E junction.
You could have some volts dropping in the supply, or even in the metal
legs of the transistor.

Ok, give this a try. Connect your B-E junction across a current
limited supply and tell me how much current flows at 1 volt output.
You won't be able to because the junction won't support 1 volt at any
reasonable current. The supply will become "non-ideal" before that
point. My point is that the transistor will be very non-ideal before
your LM7805 does.


Anyway, I know the design isn't great, but it definitely does work. I
can show you my design schematic in Protel which clearly shows 5 volts
being put directly across B-E.

No, you have already said that the MCU is driving the base. You are
not putting 5 volts across the B-E junction. Got that?


I can assure you that pulling too much current from an I/O pin on an
MCU is a bad thing. You think that by trying it with one part on one
day that you have proven something. Yes, you proved that one part
will suffer your abuse for one day. But again, you are creating
cumulative damage to the I/O pin and the chip is likely to fail
prematurely. Even if only one in a hundred chips won't take your
abuse, that is a *huge* failure rate for semiconductor devices.

Again I'll have to look into this also. First an foremost though, I
want to play around with using one pin to both clock and reset my
counter :-D

Sure, this can work, sort of, because the current can be kept well
within ratings of the I/O pin. But the problem you will have (even if
you don't see it on the test bench) is that the slowly rising and
falling edge of the reset signal can be seen as a set of pulses,
potentially some with *very* narrow width. Narrow pulses on the reset
pin can disrupt the device. You *will* find a minimum pulse width on
the reset in the data ***. If you violate this spec, you can
introduce errors due to metastability. If you don't know what
metastability is, you need to take an afternoon and read up on it.
There are any number of sources on the Internet and you should read
*many* sources because I have never seen any that give you the full
picture.


However, if you
think the output capacitance of the MCU pin is limited the current to
the transistor, whew! you have a lot to learn.

I'm sure I could find a sufficiently low pulse width and duty cycle
that would make ths happen. Whether this pulse width and duty cycle is
within the MCU's capability, I don't know.

Make what happen?

(Make the output capacitance of the MCU pin limit the current, as
mentioned in the quote within a quote above). Of course, realise that
it would take a ridiculously short pulse width for the output
capacitance of the MCU pin to be non-negligible.

How does a capacitance limit the current? A capacitance *supplies*
current and limits (or slows actually) voltage changes. Inductance
slows current changes and the inductance of your I/O pins won't have
an effect on anything wider than 10's of ns (actually it is closer to
1's of ns). We are talking about the LED and transistor having
problems well above that time frame.


BTW, what is the speed
of your multiplexing? Is it above 100 MHz?

There's 16 columns. Each column stays lit for 220 microseconds. The
shifting time is neglibile compared to the 220 microseconds, so it
takes about 3.5 milliseconds to perform one full flash. That gives a
frequency of about 284 Hz.

In the old days they used test equipment that would drive pulses into
the traces on a board regardless of whether a driver was already
driving the trace. One of the vendors showed us a video of a bond
wire glowing red from the excess current something like 100 times a
second. The resulting mechanical stress weakened the bond wire and
the parts would fail in the field.

Does this sound at all familiar? High current, low duty cycle, latent
defects. Are you beginning to see the picture?

I do see the picture. If an LED can take a constant current of 25 mA
though, I still think it should be able to take a bit more current if
it's being multiplexed. How much more though, I don't know.

Yes, the LED *will* take more current when multiplexed. Most are even
rated for multiplexing (possibly not with Nx current) and your 16:1
ratio may not be outside the spec. But you don't know the current in
your circuit and you don't know the voltages either. So how can you
tell if the LED and transistor are being operated within the
multiplexed spec?

If you really want to tell if something works by testing, you need to
use very high margins. If the part fails with current 10x the rating,
I would not multiplex it at all. Find the multiplexed current where
it does fail (Nx current, 1/N duty cycle, between 1 and 10 kHz rate).
I would then be confident using it at a pulsed current 1/10th of this
level, maybe even 1/5th. But I would not use it at half the failure
level and I would not use a pulse width more than 1 mS. This is all
in lieu of actually finding a proper spec for the parts.

Rick
.