Go Down

### Topic: Extract 25mA Constaltly from I/O Pin? (Read 398 times)previous topic - next topic

#### cabecinhas

##### Sep 21, 2017, 12:41 am
Have anyone extracted 25mA constantlly from a atmega328p-pu I/O pin?

The datasheet say 40mA is the maximim.

Is 25mA safe for output ?

Any help will be appreciated.

#### Zapro

#1
##### Sep 21, 2017, 01:34 am
First off, please explain why you need to 'extract' 25 mA from this port pin.
What is the purpose?

// Per.

#### avr_fred

#2
##### Sep 21, 2017, 01:44 amLast Edit: Sep 21, 2017, 01:45 am by avr_fred
You must have skipped over the part where the datasheet clearly says the recommended maximum is 20ma. 40ma is the ABSOLUTE MAXIMUM. Above 40ma is GUARANTEED to damage the device. Read the datasheet slowly and carefully. A few footnotes you missed:

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:
3.1. The sum of all IOH, for ports C0 - C5, D0- D4, ADC7, RESET should not exceed 100mA.
3.2. The sum of all IOH, for ports B0 - B5, D5 - D7, ADC6, XTAL1, XTAL2 should not exceed 100ma.
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 (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed:
4.1. The sum of all IOL, for ports C0 - C5, ADC7, ADC6 should not exceed 100mA.
4.2. The sum of all IOL, for ports B0 - B5, D5 - D7, XTAL1, XTAL2 should not exceed 100mA.
4.3. The sum of all IOL, for ports D0 - D4, RESET should not exceed 100mA.

#### cabecinhas

#3
##### Sep 22, 2017, 08:16 pm
First off, please explain why you need to 'extract' 25 mA from this port pin.
What is the purpose?

// Per.
Hi!  Because I hava a GPS receiver (chipset MTK3339 ) that consumes about 25 at startup and 20mA during track, acording do its datasheet.

My project is very small and there is no empty space where to put a transistor and base resistor for swtching. Thats why i thought about it.

#### cabecinhas

#4
##### Sep 22, 2017, 08:19 pm
You must have skipped over the part where the datasheet clearly says the recommended maximum is 20ma. 40ma is the ABSOLUTE MAXIMUM. Above 40ma is GUARANTEED to damage the device. Read the datasheet slowly and carefully. A few footnotes you missed:

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:
3.1. The sum of all IOH, for ports C0 - C5, D0- D4, ADC7, RESET should not exceed 100mA.
3.2. The sum of all IOH, for ports B0 - B5, D5 - D7, ADC6, XTAL1, XTAL2 should not exceed 100ma.
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 (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed:
4.1. The sum of all IOL, for ports C0 - C5, ADC7, ADC6 should not exceed 100mA.
4.2. The sum of all IOL, for ports B0 - B5, D5 - D7, XTAL1, XTAL2 should not exceed 100mA.
4.3. The sum of all IOL, for ports D0 - D4, RESET should not exceed 100mA.

Actually, you are right its 10mA @3v.. My current draw would be about 25mA at startup and 20mA during tracking of MTK3339  chipset GPS.

Can I use 2 output pins to double the current, assuming its 3v and 20mA or power consumption  ?

#### DrAzzy

#5
##### Sep 22, 2017, 08:43 pm
Just use a small mosfet to switch the GPS. You wouldn't put a 40 ohm resistor in series with your power supply if you weren't switching it on and off, so why would you doing that now? (On state resistance of a pin is ~40ohm)
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

#### cabecinhas

#6
##### Sep 22, 2017, 08:55 pm
Just use a small mosfet to switch the GPS. You wouldn't put a 40 ohm resistor in series with your power supply if you weren't switching it on and off, so why would you doing that now? (On state resistance of a pin is ~40ohm)
The resistor was to use in base of transistor..

ok anyway! I will to use the mosfet. Tks a lot

#### jremington

#7
##### Sep 23, 2017, 12:36 amLast Edit: Sep 23, 2017, 12:37 am by jremington
It is safe to draw 25 mA from the port pin, especially if it is only on startup. No need for any extra circuitry.

Go Up