Offline
Newbie
Karma: 0
Posts: 38
|
 |
« on: October 13, 2012, 07:22:49 am » |
Hi,
Today a read that my arduino uno can fry by conecting a DC motor direcly into one of the i/o pins. Anyway my question is why can it fry my arduino?
This may look a ridiculous question but I hope you can answer to it.
thanks.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #1 on: October 13, 2012, 07:32:29 am » |
Becasue the DC motor will have a very low resistance, and the AVR will exceed its 40mA maximum rating trying to drive it.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 38
|
 |
« Reply #2 on: October 13, 2012, 07:37:17 am » |
Thanks for the reply and for moving my topic.
What is the AVR?
Sorry for being so anoying.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #3 on: October 13, 2012, 07:38:40 am » |
It's the microcontroller on your Arduino.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #4 on: October 13, 2012, 07:40:44 am » |
why can it fry my arduino? Low (dc) resistance isn't the issue: you can actually short your avr's pins without damaging them. Motors are inductors who will try the best to sustain its status quote. If the current going through it is cut off, it will create a significant voltage trying to sustain that current. That voltage is higher if the cut-off is quicker. So w hen your io pins turn off fast, that huge voltage is applied to the pin -> causing it to go to the avr heaven.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #5 on: October 13, 2012, 07:42:24 am » |
Low (dc) resistance isn't the issue: you can actually short your avr's pins without damaging them You've done this?
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 38
|
 |
« Reply #6 on: October 13, 2012, 07:45:43 am » |
Thanks for the reply's and the support.
you guy's answered my question very fast.
Thanks.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Faraday Member
Karma: 6
Posts: 2504
|
 |
« Reply #7 on: October 13, 2012, 08:20:50 am » |
Low (dc) resistance isn't the issue: you can actually short your avr's pins without damaging them. You've done this? I guess Atmel doesn't know what they're talking about when they give the current limits, both per-output and per-device, in the datasheet. The simple fact is, you kill the arduino (actually the ATmega) by trying to draw more current than the chip is designed to handle. -j
|
|
|
|
|
Logged
|
|
|
|
|
Waynesboro, Pa USA
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #8 on: October 13, 2012, 08:26:28 am » |
Low (dc) resistance isn't the issue: you can actually short your avr's pins without damaging them. You've done this? I guess Atmel doesn't know what they're talking about when they give the current limits, both per-output and per-device, in the datasheet. The simple fact is, you kill the arduino (actually the ATmega) by trying to draw more current than the chip is designed to handle. -j A short will either shut the regulator down for the DC input or open the PTC (fuse) for the USB. An overload could easily destroy the outputs. This is one of the reasons I cringe when I see people recommend that an LED being directly connected instead of through a resistor as an LED (or any other diode) is a short that just opens up below a certain voltage.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Faraday Member
Karma: 6
Posts: 2504
|
 |
« Reply #9 on: October 13, 2012, 08:38:58 am » |
A short will either shut the regulator down for the DC input or open the PTC (fuse) for the USB. Yes, but that happens well after you hit the per-pin limit of 20mA. It protects the regulator, or the device on the other end of the USB cable, but it won't do all that much to protect an overloaded output pin. -j
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Tesla Member
Karma: 89
Posts: 6406
-
|
 |
« Reply #10 on: October 13, 2012, 08:44:21 am » |
you can actually short your avr's pins without damaging them.
Yes, if you leave the Arduino powered off, or have the pin configured as an input or as an output set to the same level as the thing you 'shorted' it to. Otherwise, I can't imagine what gave you the idea this was true.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #11 on: October 13, 2012, 08:53:08 am » |
I can't imagine what gave you the idea this was true. To design a robust product?
|
|
|
|
|
Logged
|
|
|
|
|
Waynesboro, Pa USA
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #12 on: October 13, 2012, 12:17:06 pm » |
A short will either shut the regulator down for the DC input or open the PTC (fuse) for the USB. Yes, but that happens well after you hit the per-pin limit of 20mA. It protects the regulator, or the device on the other end of the USB cable, but it won't do all that much to protect an overloaded output pin. -j That's why I specifically said "short" and not overload as you would have to overload all of the pins at the same time. Still a bad idea to do. BTW, don't the UNO specs say 40 mA?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 15
Posts: 463
|
 |
« Reply #13 on: October 13, 2012, 01:41:18 pm » |
Low (dc) resistance isn't the issue: you can actually short your avr's pins without damaging them You've done this? FWIW... I've accidentally shorted outputs and even inserted the 328P backwards... never hurt the chip (yet). Of course, in reality the datasheet specs MUST be adhered to or else the chip WILL get ruined sooner or later.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Faraday Member
Karma: 6
Posts: 2504
|
 |
« Reply #14 on: October 13, 2012, 01:41:27 pm » |
BTW, don't the UNO specs say 40 mA? Yep, the ATmega datasheet says 40mA absolute max per I/O pin, 200mA max for the device. I mis-remembered when posting earlier. -j
|
|
|
|
|
Logged
|
|
|
|
|
|