Pages: 1 [2]   Go Down
Author Topic: 100 milliamp coil current...transistor or MOSFET?  (Read 1525 times)
0 Members and 1 Guest are viewing this topic.
Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 603
Posts: 33408
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Why dose every one think that a Atmega 328p can source and sink 40 mA the datasheet said that's not going to happen the chips VCC and Gnd pins can only source and sink 200 mA now there 23 I/O on that chip do the math 23 times 40
You are miss reading things. This is a limit you should not exceed, it is not a limit that can not be exceeded. It is perfectly possible to exceed these limits only you should not if you want to avoid damage to the chip.
Logged

Offline Offline
Full Member
***
Karma: 3
Posts: 244
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mike you missed this part
Quote
This is the Absolute Maximum on a pin that's doesn't mean all 23 can be at that level and is a bad idea to get to thinking you can
Quote
DC Current per I/O Pin ............................................... 40.0 mA
Read the fourth and fifth word there you didn't read my whole post.

I didn't miss read anything  I know for a fact what these chips can do and can't but you here all the time That this chip can sink 40 mA a pin that's a PIN not a port of PINS

So I was letting OP know that he needs to watch that.
« Last Edit: December 20, 2012, 11:32:10 pm by be80be » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 603
Posts: 33408
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes sorry.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
the datasheet said that's not going to happen the chips VCC and Gnd pins can only source and sink 200 mA now there 23 I/O on that chip do the math 23 times 40

You probably want to read the datasheet very careful one more time I am reasonably confident that the datasheet did not say what you think it says don't trust my words you can re-read the datasheet to be sure
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26523
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Let's get all the datasheet facts out:

Absolute Maximum Ratings*
DC Current per I/O Pin ................................................ 40.0mA
DC Current VCC and GND Pins................................. 200.0mA
('328P has two Vcc and two Gnd Pins)

*NOTICE: 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.

Common DC characteristics TA = -40C to 85C, VCC = 1.8V to 5.5V (unless otherwise noted)
VOL  Output Low Voltage(4)  IOL = 20 mA, VCC = 5V: 0.9V
VOH Output High Voltage(3) IOH = -20 mA, VCC = 5V: 4.2V

Notes:
1. “Max” means the highest value where the pin is guaranteed to be read as low
2. “Min.” means the lowest value where the pin is guaranteed to be read as high
3. Although each I/O port can source more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state
conditions (non-transient), the following must be observed:
ATmega48A/PA/88A/PA/168A/PA/328/P:
1] The sum of all IOH, for ports C0 - C5, D0- D4, ADC7, RESET should not exceed 150mA.
2] The sum of all IOH, for ports B0 - B5, D5 - D7, ADC6, XTAL1, XTAL2 should not exceed 150mA.
If IIOH exceeds the test condition, VOH may exceed the related specification.
Pins are not guaranteed to source current greater than the listed test condition.
4. Although each I/O port can sink more than the test conditions (20 mA at VCC = 5V, 10 mA at VCC = 3V) under steady state
conditions (non-transient), the following must be observed:
ATmega48A/PA/88A/PA/168A/PA/328/P:
1] The sum of all IOL, for ports C0 - C5, ADC7, ADC6 should not exceed 100 mA.
2] The sum of all IOL, for ports B0 - B5, D5 - D7, XTAL1, XTAL2 should not exceed 100 mA.
3] The sum of all IOL, for ports D0 - D4, RESET should not exceed 100 mA.
If IOL exceeds the test condition, VOL may exceed the related specification.
Pins are not guaranteed to sink current greater than the listed test condition.

So: 40mA may be achieved, and output voltage is likely to rise when sinking and to drop when sourcing if more then 20mA is being used.
Clearly, up to 300mA may controlled by the '328 IO pins if the current is spread around.
« Last Edit: December 21, 2012, 09:39:18 am by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Clearly, up to 300mA may controlled by the '328 IO pins if the current is spread around.

Quote
Absolute Maximum Ratings*
DC Current per I/O Pin ................................................ 40.0mA
DC Current VCC and GND Pins................................. 200.0mA
('328P has two Vcc and two Gnd Pins)

I guess you are assuming that 200ma limit is doubled because of two sets of Vcc and ground pins?
That is not my take, my take is that 200ma total is a absolute max package rating. But I guess there is room for misinterpretation on either of our parts.

Lefty
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26523
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The notes clearly describe 300mA of current among the IO pins, so yes I'd say each of the Vcc pins can handle 200mA for 400mA total consumption.

There is nothing that describes an absolute max package rating.
The 32 pin packages have a 3rd set of VCC/GND pins even.

If you look at the '2560 datasheet, the Absolute Max is shown the same way:

DC Current VCC and GND Pins................................ 200.0 mA

yet the notes describe even more current, 800mA, so clearly the Per Pin current is being described in support of the 5 pairs of Vcc/Gnd pins. Current Per Package would be dependent on Operating Temperature, clock frequency being used, both of which have an impact on internal temperature, along with IO current being controlled.

Notes:
1. "Max" means the highest value where the pin is guaranteed to be read as low.
2. "Min" means the lowest value where the pin is guaranteed to be read as high.
3. Although each I/O port can sink more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state
conditions (non-transient), the following must be observed:

ATmega640/1280/2560:
1.)The sum of all IOL, for ports J0-J7, A0-A7, G2 should not exceed 200 mA.
2.)The sum of all IOL, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200 mA.
3.)The sum of all IOL, for ports G3-G4, B0-B7, H0-B7 should not exceed 200 mA.
4.)The sum of all IOL, for ports E0-E7, G5 should not exceed 100 mA.
5.)The sum of all IOL, for ports F0-F7, K0-K7 should not exceed 100 mA.
If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater
than the listed test condition.
4. Although each I/O port can source more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady
state conditions (non-transient), the following must be observed:

ATmega640/1280/2560:
1)The sum of all IOH, for ports J0-J7, G2, A0-A7 should not exceed 200 mA.
2)The sum of all IOH, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200 mA.
3)The sum of all IOH, for ports G3-G4, B0-B7, H0-H7 should not exceed 200 mA.
4)The sum of all IOH, for ports E0-E7, G5 should not exceed 100 mA.
5)The sum of all IOH, for ports F0-F7, K0-K7 should not exceed 100 mA.
If IOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current
greater than the listed test condition.
5. Values with “PRR1 – Power Reduction Register 1” enabled (0xFF).
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
yet the notes describe even more current, 800mA, so clearly the Per Pin current is being described in support of the 5 pairs of Vcc/Gnd pins. Current Per Package would be dependent on Operating Temperature, clock frequency being used, both of which have an impact on internal temperature, along with IO current being controlled.

Well we can clearly agree to disagree technically on that view. I see each of those port max current ratings as specific to just that port and that one cannot assume you can just add up all the individual port max ratings to enjoy a total 800ma package current consumption at one time. I still think the overall 200ma limit is the total chip absolute maximum current limit rating.

Lefty
 
Logged

Worst state in America
Offline Offline
God Member
*****
Karma: 32
Posts: 792
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Disagree about not having a gate resistor.
MOSFETs can have fairly significant input capacitance.
When arduino pin changes state, the capacitance looks like a dead short.
The resistance limits the arduino current until the cap changes state.
5V/35mA = 143 ohm, so 150 ohm resistor would be good choice to use.

I agree that a MOSFET has a "lot" of effective capacitance at the gate due to the Miller effect, but even with a large power MOSFET the effective capacitance is only on the order of a few hundred picofarads.

The mosfets in the output drivers of the Mega cannot handle more than "X" milliamperes of sink or source current CONTINUOUSLY or else they will overheat. However, a momentary current spike (charging or discharging the MOSFET gate) is so short that absolutely no damage will result. The Rds of the internal mosfets limit the short circuit current (which for a brief moment is what a capacitor is) as well.

It's like an LED. The continuous forward current of an ordinary LED cannot be more than 20 or 30 milliamps or else it gets hot. But you can send millisecond PULSES of one to several AMPERES of current into an LED and it works just fine - because there is no time for the die to overheat.

That's how "flashlamps" in cell phones work. They send a high current pulse through a UV+Phosphor (white) LED... a current that would fry the LED in 1/2 a second - is just fine when it only lasts a millisecond.
Logged

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Pages: 1 [2]   Go Up
Jump to: