PMOS in parallel with NMOS

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.

Now obviously, in everyday life, you put a resistor going into the base, and also a resistor in series with the LED. Why? To stop:

1) Damage to the transistor from having too much base current 2) Damage to the LED from having too much current thru it

Regarding the LED, well a friend of mine has told me of experiments where people flashed a normal LED with as much as an entire ampere, and it worked fine because the duty cycle and the pulse width were sufficiently low that the LED didn't get damaged. This is quite easy to see if you take a green diode; if there's too much current, it will glow yellow. On my own board, my green LED's stay green.

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.

Another thing I'll look into is the current limit on the microcontroller pins -- specifically, what happens if you try to draw too much current. Maybe the microcontroller will die, or maybe I'll just get an output voltage less than 5 volts. Who knows? I'll look into it.

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.

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.

Noted, that answers my question above ^

None specifically on embedded systems, just more generic elecronics.

I'll look into it, thanks.

Each LED gets flashed as follows: Pulse width =3D 200 microseconds Duty Cycle =3D 1/16

The board works perfectly when set like this.

However, if I increase the pulse width to 300 microseconds, the board dies. Perhaps it's the microcontroller that's being killed, perhaps it's the shift register that's being killed. Maybe even the transistors, I don't know.

Thinking about it logically, what exactly changes when I increase the pulse width? Well, current flows for a longer amount of time. The significance of this? Well, current flow produces heat, so maybe too much heat is building up for the duty cycle to compensate for. I don't know, I'll look into it.

Reply to
Tomás Ó hÉilidhe
Loading thread data ...

I think it *does* cut it if it works properly for a long enough amount of time. If a car cuts out once every 4.6 years, then I think that's good enough.

Reply to
Tomás Ó hÉilidhe

Please advise where I'm screwing up Ohm's law.

(I'm not being sarcastic, I'd actually like to know).

Reply to
Tomás Ó hÉilidhe

This is a duty cycle of the clock going into my shift register, NOT of the display.

Each individual LED has a duty cycle of 1/16, with a pulse width of

200 microseconds.

I want to get it to perform as though it has a continuous 25 mA thru it. To achieve this: Pulse width =3D 200 microseconds Duty cycle =3D 1/16 Pulse Current =3D About 400 mA

I'm not finished it yet.

I finished my original project board and it works perfectly. Now I'm going over it, making the design better, going into more depth of detail about the currents, duty cycles, etc..

Reply to
Tomás Ó hÉilidhe

Yup. Now the coil fails, and you replace it with a new one, which still meets all specifications. The overall failure rate falls to once every 4.6 hours. I am glad you are satisfied.

--
 [mail]: Chuck F (cbfalconer at maineline dot net) 
 [page]: 
            Try the download section.


** Posted from http://www.teranews.com **
Reply to
CBFalconer

Be aware that leds used like this can easily fail after a few weeks or months. Just because it works for hours or days does not mean it is safe. (It's not just theoretical, I have personally seen this).

--

John Devereux
Reply to
John Devereux

But what did you learn? I can assure you that if you try to implement a design like this in a job, your peers will not let you go to production with it. So you have learned that you can make something work on the bench. Now are you interested in learning how to make it work in a product?

Should I just stop bothering to try to talk sense to you?

Rick

Reply to
rickman

Of course I want to make it work in a product. I'm not throwing electrical theory out the window.

Here's an example of my thinking:

Let's say we have a resistor rated for 100 W (this is a worldwide rating, inclusive of the Sahara and the Antartic). The resistor value is 2 kilohms. This equates to a maximum current flow rating of 223 mA.

We know that a resistor is just a plain old lump of material. Excessive current destroys it merely because of the excessive heat that the current flow produces. It's that simple.

Let's say that we're using this resistor in a display multiplex design that has a short pulse width and a long duty cycle (by long duty cycle I mean that it's high for a very short time, then low for a very long time).

Would you not agree that it's possible to put more than 223 mA thru this resistor if you're using it like this?

Furthermore, do you not think that this is acceptable in a product? If you're all about sticking to theory, then we could always go into thermal theory and plot a graph of temperature versus time for the resistor (it should look like a stretched out sine wave that never goes above the maximum temperature).

Reply to
Tomás Ó hÉilidhe

What power supply are you using? When you turn this circuit on, how long does it operate before the smoke comes out? Do you actually have

5 volts on the emitter? What is the voltage on the base and collector? 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. 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?

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

In your description above, where is the narrow pulse width??? As others have told you, if you read the data sheet 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 sheet give you a max current spec?

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.

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.

Make what happen?

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?

Try reading some on failure modes of chips. Or just listen to the advice of your peers who sometimes know by experience what *not* to do.

For now.

This shows that you are on the hairy edge of immediate failure. What you are doing is like people who overclock PCs. The bump up the voltage as long as it still works. But now they are on the hairy edge and a small rise in temperature can make the CPU start failing and crashing. Meanwhile they have voided the guarantee on the PC and CPU because they are likely causing premature failure. Unless you keep your pulsed current within the spec for the LED, you are doing the same thing. Have you checked to see what the max pulsed current rating is for your LED compared to your max current. Oh, I forgot, you don't have a resistor in series with your LED, so you can't measure the current.

Or maybe you can compare your design to the specs in the data sheet. There is a reason that the manufacturer puts out these specs.

Reply to
rickman

The first time you put it into production for 4.6 years and find that a particular mask in Microchips (or any silicon source) production line cause a processor failure if it is operating out side of the published spec's.

The responders who are calling you on this have the scars of experience to know that what you are saying is a bad idea.

The simple things that you are proposing may work or not matter. It becomes a big deal when you start having statistically significant failures that you are responsible for.

Do some non trivial projects and then talk about experience.

w..

Reply to
Walter Banks

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).

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

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

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.

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.

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.

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

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 datasheet.

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.

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.

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

(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.

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.

Reply to
Tomás Ó hÉilidhe

No, it is not quite that simple. You can easily blow up a resistor with a pulse of current without overheating it as a whole.

Quite a lot more, but not as much as the 100W figure would suggest. The "pulse rating" of a resistor is not that which would give an average equal to its continuous power rating.

The problem is that there is local heating within the resistor that can destroy it, independently of the overall temperatre. And it is the same with a LED (although there are probably other mechanisms there too).

--

John Devereux
Reply to
John Devereux

Actually, I did burn out some microcontrollers this way. I was driving tri-color LEDs without resistors. Some uC lasted for days and some for weeks. But I never claim that it was a proper design, it was just for fun. Anyway, it's better for the OP to burn out some uC, they are pretty cheap anyway.

Reply to
linnix

And it is the same for the uC. But he doesn't care, he just need it to run for a few minutes for the professor to grade it. As long as the professor is as dumb as the student, it should be fine.

Reply to
linnix

Maybe it is, let's see

i = e / r e = i * r e = 223 mA * 2K e = 446volts

Is the voltage drop accross the resistor > 446Volts in normal use or in any of the failure modes?

If the voltage is > 446 then it is possible to exceed 223 mA.

w..

Reply to
Walter Banks

Indeed. Such as electromigration, which comes into play (over time) if the current density through on-chip conductors is too high. AFAIUI, electromigration (not melting) is usually the limiting factor on current density for on-chip conductors.

But all the complex work has already been done in determining the data sheet limits-- all the "designer" has to do is read and understand the datasheet and stay within the limits. OTOH, people who can't or won't do this are an endless source of revenue for consultants. Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

To be fair, you have to take into account all of the laws that apply to transient signals, in all circuit branches. In particular, the rise in V starts by charging the transistor capacitors.

i = C.dv/dt v = L.di/dt v = Ri

You have to solve for i and v as functions of time and see if the integral of dissipated power exceeds the rated limits. That is rather involved, you wouldn't be bothered with that for a normal project, but a student could explore it if he has time to spare.

Reply to
Lanarcam

Also that C and L are function of frequency.

i =3D C(f).dv/dt v =3D L(f).di/dt v =3D Ri

Reply to
linnix

You have quoted the rating.

"maximum current rating of 25 mA"

Design so the pin never tries to deliver more than 25mA.

Unless the specs say so the pin is not current limited.

A pin into the base of a PNP transistor without current limiting is probably not a good idea for long life or component heating.

Which transistor are you using?

w..

Reply to
Walter Banks

You need to look a lot more closely at how resistors are rated. There will be a maximum ambient temperature and derating above that. A '100W' resistor in an well insulated box in the Antarctic will eventually overheat and fail if it sees 100W.

If you really want to analyze transient thermal response you have to know a lot more about the resistor than otherwise- such as the time constants. A wirewound resistor will usually have the ability to handle huge brief transients, wheras a thin-film resistor tends to make a dandy fast-acting fuse. And well below the actual failure point there may well be mechanisms that cause unreliable operation over time, perhaps in the presence of high ambient temperature or humidity. Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.