Arduino Mega has enough amperage?

Hi friends,

I have Arduino Mega 2560.
I wired lots of pins of tft screen, relays, sensors etc.
I am feeding tft and relays with external power source but i think there is still problem with the amperage because sensor values are not accurate.

Documentation says that "DC Current per I/O Pin: 40 mA" And it has 54 pins, so is it 54x40ma that Mega can supply?

I am using an extarnal adapter beside USB source but i am confused. How can i be sure about the capacity of Arduino?

You can read the data sheet.

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.

beingobserver:
Documentation says that "DC Current per I/O Pin: 40 mA"

Yes, but it has another sentence after that which says:

"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."

Whenever a datasheet says "Absolute Maximum Ratings" it doesn't mean "that's how much you can use", it means "this is where damage starts to happen". If you measure the voltage at 40mA you'll find it already dropped below well below 5V because of the strain (see "Pin output strength").

beingobserver:
And it has 54 pins, so is it 54x40ma that Mega can supply?

That's 2.1 amps - over 10 watts through the chip. Common sense should tell you that's going to melt the plastic (I've got soldering irons that are only 16W).

Bottom line: Arduino pins should not be regarded as power supplies.

That's 2.1 amps - over 10 watts through the chip.

Not quite true. It's the power dissipated IN the chip that heats it. That's current x voltage DROP in the chip which isn't 5 volts unless the outputs are short circuited in which case the current would be much higher of course until it burned up.

The problem is the current in each output passes through a very tiny portion of the chip and the temperature rise at that tiny spot can be very high.

beingobserver:
Documentation says that "DC Current per I/O Pin: 40 mA" And it has 54 pins, so is it 54x40ma that Mega can supply?

As RoyK pointed out, there are limits for groups of pins. If you want to "power" virtually anything you should be using the pin to switch a transistor or MOSFET.

Even powering something modest, there is usually an initial inrush of current when you turn it on (eg. a MOSFET) so a current limiting resistor is often required.

I wired lots of pins of tft screen, relays, sensors etc.
I am feeding tft and relays with external power source but i think there is still problem with the amperage because sensor values are not accurate.

Perhaps show your circuit/schematic? Possibly you simply have a programming error. Try measuring the voltage supplied to the sensor and see if it is what you expect.

Yes each pin 40mA but that includes the power pins so you can not power stuff on the other pins without it passing through the power pins.

What is the power pin? You are not suggesting that the total power to the chip can not exceed 40mA are you. Maybe I misunderstand that.

Grumpy_Mike:
Yes each pin 40mA but that includes the power pins so you can not power stuff on the other pins without it passing through the power pins.

(shamelessly stolen quote) "In the quiet words of the Virgin Mary, come again?"
I don't understand how Atmel could be saying 200mA for the Vcc and Gnd pins, yet you could be saying 40mA. Do you know something that Atmel doesn't?

pg347 AtMega 2560 datasheet pdf
31. Eletrical Characteristics

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

The power pin is limited to 200mA for both plus and ground. So you can't exceed 200mA sourcing and another 200mA sinking.

Ok, got it.

Thank you for all your answers. This subject is beyond my poor knowledge and i need to re-read so many times to understand :slight_smile:

And i will try to draw my project on fritzing.

And i will try to draw my project on fritzing

Arrrrgggggg please for god sake no.
Fritizing is just a total waste of time, it produces rubbish that is impossible to read.
Just use a pencil and paper and photograph It.

Ok. This is easier for me too :slight_smile:

"DC Current VCC and GND Pins................................. 200.0mA"
That us PER PIN - so the Mega can handle 800mA, Not 200mA total. I have documented this with an e-mail from Atmel, previously posted.
Still need to observe the current per port limitations.

Grumpy_Mike:
Just use a pencil and paper and photograph It.

Or this:

http://www.expresspcb.com/expresspcbhtm/Free_schematic_software.htm

Hi again friends, i don't think its a schematic but its all i can do for now :slight_smile:

Problem: I think there is a power management problem with my circuit.

I think that because sensor values are not accurate.

And I don't know if external Mega adapter can support the parts. There is Vin pin which i don't know how to use it.

Parts:

  • Mega 2560
  • 5 sensors (With Sensor Circuits) And there will be additional sensors also.
  • Relay Board (5v 8 Channel)
  • 4 x Motors (6v Pump motors - Not connected yet)
  • TFT Screen (320 x 240)

Question: How can i solve this power management issue in a proper way.

Thank you.

Pumps: http://www.ebay.com/itm/6V-DC-DIY-Dosing-pump-Peristaltic-dosing-Head-For-Aquarium-Lab-Analytical-water-/261276354497?

Problem: I think there is a power management problem with my circuit.
I think that because sensor values are not accurate.

Why would the power have anything to do with the sensors accuracy?

According to that diagram (which is way too big to see by the way) there is no power going to the sensors.
However if you mean that the sensors take 20mA then that is the same as an LED and should be no problem.
As a test, remove the relays and the display and see if you still have your problem.
It would help if you said what these sensors are and what the sensor circuit is. Better still provide a link to them.

Why have a separate power supply for the water temperature sensor and why is the ground from that supply not common with the other grounds?

First off, resize your attachments. 3900 pixels is so wide its difficult to review, even on a 21" monitor.
About 1000 x whatever is a good width.
Same with pictures, crop them & resize to a viewable width.

I see grounds connected, that's good.
How are the sensors powered? I don't see them getting power, is that important?

Incidentally what makes you thing that a peristaltic pump only takes 30mA?

@Grumpy_Mike I added the pump link above. When i removed everything except one sensor, there is not any problem with the sensor values. So i thought that there may be a power problem :slight_smile:

@CrossRoads Resized the file. And fixed the drawing that shows feeding the sensor.

Sensors are ph, ec, do and orp. I know their consumption from their datasheets.

I connected an external Power supply for temp sensor because i saw them when i connect it arduino onboard led dimmed, and i thought its the guilty one :smiley: