I've noticed that some designs omit the base resistor when interfacing the AtMega (e.g. AtMega328-P, 5V, 16 Mhz) to a Darligton pair of transistors. The combined voltage drop (Vbe) across the pair of transistors would typically be 1.4V, but is this sufficient to limit current to less than the 40mA as dictated by the Atmel datasheet?
In a word no.
The technique of not using a base resistor when driving darlingtons is fine on TTL devices but the Arduino has a high current output capacity so you will always need a base resistor.
Thnaks - no potential for reduced compoent count then.
Actually one of the sources for my "wondering" is from your (may I say "otherwise"?) excellent motor tutorial.
Also note here that the base resistor can be omitted, this is because the voltage on the base of T1 when this arrangement is on is about 1.4v, which s high enough not to mess up the Arduino output.
woops :-[
Yes you are right I wrote that and I shouldn't. The problem was that the original text was written for the Acorn series of computers with a user port. For these this is true, I hadn't spotted that this wasn't true for the Arduino. So I am off to change it now, thaks.
Looking at n-channel logic level MOSFET designs. My understanding is that the gate of these transistors is the equivalent of a capacitor (e.g. "infinite" DC resistance). Obviously then adding a series resistor would alter its AC characteristics, but may this be needed also for current limitation (charge/discharge), or would that qualify as "over-engineered"?
but may this be needed also for current limitation (charge/discharge), or would that qualify as "over-engineered"?
No not over engineered but it is a second order consideration.
Remember that it is only a charged capacitor that has an infinitely high resistance a discharged capacitor looks like a short circuit and has an infinitely low resistance. This is important when considering rapidly switching high gate capacitance FETs but probably not for the average Arduino use. Although there are some who would disagree, wouldn't you Rugged Circuits?
Thanks for sharing from your knowledge and experience!
... a discharged capacitor looks like a short circuit and has an infinitely low resistance
Yes, and I trust then also the reverse is true, a charged capacitor will act as an "infinite" current source. So I take it then that gate current limiting is more than an optional precaution also for MOSFET's.
Related to my first post, I also studied this design from Sparkfun for a 4x7-segment serial LCD. They use an AtMega-168 to drive the segments. A link to the schematic is here:
and the 4x7 display datasheet is here:
7 datalines are used to directly power the segments and another 4 to sink the common cathode for each digit. The absence of current limiting resistors from the schematic is evident - the only resistor in the circuit is a pullup for the MCU reset line.
The AtMega firmware they use (source is available from the SparkFun web) uses a dudy-cycle with an added all-power off stage configurable from 0-255 microseconds.
LED's seem to be high-current tolerant as long as they're switched with a reasonable duty cycle so I assume they're ok.
I have a problem understanding however how the AtMega can survive this without current limiting resistors as it has to both sink and source current through all the individual segments. The sink pins will have to cope with 7 segments (worst case) combined (however switched 1 in 5 cycles) and the source pins may remain on for 4 of 5 cycles if all digits are used. The question again then was whether the 2V forward voltage drop across the LED segments is in itself sufficient to protect the AtMega?
Please note that I have no issues with SparkFun whatsover (I don't own any of these displays, nor am I in the business of offering a competing product), but I designed my own driver recently (using a Pro Mini, a transistor for each of the common cathodes and a current limiting resistor for every segment line) and would much have preferred the SparkFun design if it was/is viable. So the question then - is it viable?
I trust then also the reverse is true, a charged capacitor will act as an "infinite" current source.
Only if you connect it to a short circuit. The problem here is that current is measured in terms of charge flow per unit time. With a FET we are only talking about a gate capacitance of a few pF and that does not equate to a very big current flow and is certainly not sustained.
As to the circuit of the 7 segment displays you showed I certainly wouldn't use it. I think it is an example of sloppy design. What they are relying on is that the LEDs can take the surge current, which they probably will, and that the Arduino will limit the current due to its output impedance. Well it will, but not to a safe level. The problem is that it does not immediately show up in the Arduino burning out but then ratings just above the absolute levels seldom do, as the manufacturers have to have some margin. Also the absolute levels are referenced to the extremes of temperature so in a way they are relying on the fact that it is not being run so hot. They are also in the business of selling chips so promoting designs where they ware out quicker is good business, not that I am saying that this is a policy they have.
I suppose its a bit like smoking yes it will probably take 10 years off your life but you don't know until the end.
Absolute ratings are there for a reason, on all data sheets it will say something like:-
Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.
The things that kill a chip from over current are:-
- Heating through the resistance of the junctions in the bonding wires.
- Excessive currents can deplete the semiconductors of it's charge carriers.
The problem is that this in not well understood by the amateur who tends to think in black and white, go, no go, terms, and not in terms of safety and reliability. It's like asking how much radiation can I take with out any effects, the answer is of course non, there is no safe dose for radiation. However, there is also no way you can live on this planet without getting some radioactive exposure.
Same with current draw, the safest is to draw no current but then you wouldn't have a working device. So the best compromise is to stay about 20% below the absolute maximum not push things up to the max and beyond.
Thanks again for sharing!
For a while I thought I was much too cautious (and perhaps to some extent I am) or had overlooked some inherent current limiting aspect of the Arduiono I/O pins, but I trust it comes down to finding the right balance as with most aspects of life.
As for "cowboys" (no offense, I have family and friends in Texas), I trust we find them in all engineering disciplines and certainly we do in software engineering where I have my professional background for many years. Then again we also have the perfectionists who always runs late, add to the cost and tends to be ignorant about market needs.
As for now I'm catching up on electronics (I have the theoretical background, but lack the experience) and in doing so I much appreciate your feedback.
Stressing Electronics is not much different than Stressing Humans.
It may take a long time for the effects of stress to show... but there is pretty much a guarantee that a stressed part/human does not live as long as something that has remained unstressed.
We live in a toss-away world where people are expected to keep some of their electronic gadgets no more than 1 year. Maybe that attitude is in the mind of some designers. (It Works... so it's done)