Despite all this, I've never been able to damage an AVR. Either I am very careful in my old age, or the stock AVRs are a bit more durable than this article would lead you to believe. I'm sure I've shorted a pin to ground while set to high, for example, because it's a one-byte programming error to do so.
Agreed. I've done all kinds of accidental abuse to AVRs, shorting outputs while testing, powering an entire circuit through the USART pins, switching the PDI connector on an XMEGA (3.3V) with a +5V USB connector, that sort of thing. They seem to be quite resilient.
A classmate of mine apparently had a 5V AVR powered by +12V for quite some time in one of his projects when the voltage regulator silently failed. Apparently it operated for several days like this.
My favorite discussion about the resilience of the AVR comes from 26C3 "Advanced Microcontroller Programming", available here on youtube:
http://www.youtube.com/watch?feature=player_detailpage&v...
"You can zap 15kV spikes into the clock inputs and it will continue to run..."
I've had similar experiences with AVRs, they are quite robust and will handle shorts, reversed polarities and the like rather well. They seem to be rather conservative on the datasheets probably as they are guaranteed over a much larger temperature range than most people use their chips at.
I have one extra ATMega168 and I will test some of these methods but I'm not sure if you can kill one of these chips just by doing some of these methods.
All I can say is that once, while programming one of these ATMegas, I accidentally swapped VDD and GND and left it there for 2/3 minutes. The chip got very hot and I burnt my finger but once I left the chip cool I was able to program it again and after 2 years it is still working.
And a crystal, header blocks, USB port, voltage regulator, power jack, and some other small components. Not to mention shipping cost, etching the PCBs, drilling the PCBs, the cost to buy the pick-and-place machine and reflow machine, QA, maintaining the website, ...
You can certainly have AVR applications that cost less than $20, but there is a fair amount of cost in producing a development board. (You say $30 but there are plenty of sub-$20 Arduino clones.)
> etching the PCBs, drilling the PCBs, the cost to buy the pick-and-place machine and reflow machine
Your correct on the cost of the headers/ports being much higher than most would think (certainly higher than the AVR).
However, the arduino products are not even close to being in the ball park of volume needed to purchase their own PCB manufacturing equipment, nor P&P, nor reflow, nor QA systems. Its all outsourced, probably through multiple layers (they list SparkFun as a manufacturer and I can almost guarantee they aren't doing any of the actual manufacturing either).
That would explain the cost (that is a really slow pick and place). For comparison I designed a board a few years ago that was a 6" by 8", 4 layer PCB, parts on both sides, 163 parts, several orders of magnitude more complex than an Arduino. For 1,000 unit runs the the per unit costs were $2.97 for the PCB and assembly with flying probe test was $3.51, including post processing for several parts that were not reflowable, done in Asia by a contract manufacturer.
Yes, Sparkfun's products are definitely overpriced. They sell a constant-current LED driver for $50 that has a ~$8 parts cost at single-unit quantities. Even when I hand-solder the circuit on to a $10 Dangerous Prototypes surface-mount prototyping board at my normal hourly rate, I still come out ahead.
I still contend that the Arduino is approximately decently priced when you consider that Arduinos are popular enough to not be put together by hand but niche enough to not be made by the millions at Foxconn.
That's actually the nice thing about it. After you've designed and debugged your project on the Arduino board, you can implement it with a $2.50 AVR (+ a few support items).
You can't do that with, for example, the Raspberry PI or the Netduino.
That makes sense, but what doesn't is incredible amount of projects and things (and not only DIY, I've seen some one of commercial designs done exactly in this way) that just embeds whole arduino board connected by bunch of random wires to something (preferably something composed of another relatively expensive breakout boards).
For one-off projects, the 25 extra bucks aren't really the killer. I don't see the problem with using an arduino in a commercial setting, so long as you're not mass-producing with said arduino.
I know this one isn't true, because I did this last night with no ill effect. I accidently connected a 9V power brick with the leads reversed. Nothing happened, the Arduino just doesn't turn on until you reverse the leads.
This article is literally ten instances of "How to destroy an IC: apply power where power does not belong, or apply too much power where less power belongs." with marketing piled on top of it. To be fair, if you did any of these things directly to the AVR powering a ruggeduino, the exact same thing would happen.
I'd not have been surprised to see "apply 120V AC to Vin/Vcc" on this list, simply for the common sense involved in such a statement.
The arduino might be a development board but the way i see it, the IO-pins does not have to be be a 1:1 mapping to the IC-pins. I want it to be a safe and reliable, general purpose IO-unit. For that, applying these fixes saves you from many accidental mis-connections.
I'd imagine it would just temporarily disable it, but disconnecting the extra draw would put things right again... I don't think undervoltage or undercurrent physically damages the AVR?
All drawing current does is cause components to heat up. Too much heat and the components start vaporizing, and then they don't work anymore because they no longer exist. (The effects may be more subtle than this, of course.)
So yes, it's definitely possible to damage a microcontroller in this way, but I'm not convinced it's as easy as the article suggests. (I'd try on an ATtiny right now and see, but my stash is at work.)
If, as a result of the voltage and current regultors in the AVR, the AVR only sources X amount of current, adding load past that point will not magically introduce more current (and thus, heat) into the equation, though... Assuming the maximum supported load is also the maximum physically available, the maximum heat generated should be tolerated OK.
One has to wonder, though, that if the AVR had its own current-limiting circuitry, why would the author of this article add his own?
Furthermore, reducing the power unilaterally may protect the chip from thermal overload, but it will also probably cause the chip to reset, causing undefined behavior in the circuit it's controlling.
So I'm really not completely sure what's going on.
As jrockway mentions, the ATMega does not have a power regulator. That would be inefficient as regulators work by dissipating excess energy as heat. So, even if the chip had onboard regulators to limit the combined current draw of the output ports to 200mA the chip would still be susceptible to overheating.
That said, I'd guess the weak link that puts the 200mA limit in place is not actually in the I/O circuitry but is how much current can safely be drawn by the I/O pins when the chip is otherwise fully utilized - peripherals and CPU both consuming max power.
Awesome article. Shows some common failure scenarios of a real product, explains exactly what will happen and proposes an easily understandable solution.
One of the best electronic lessons i've read for a long time. Finally makes you realize why most pcbs has all those weird components sitting around instead of just pushing the io-pins straight into the µC.
While the avr might be able to handle some of the failures in certain scenarios it's still good to know how to protect yourself in case you use another controller or if you really want to be on the safe side.