Arduino Mega 3.3V and 5V Pins

Hello everyone! I would like to ask if is it okay if I connect 30 modules{and sensors) on a single 5v pin? if not, what is the limit of every voltage pins? also can you give me suggestion on how to deal with this situation.. by thway im using an arduino mega 2560 r3

You mean a (digital?) output pin?

Look in the chip datasheet for confirmation, but it's around 20mA, IIRC.

We don't really know what the situation is - more details, please!

In general, the output pins are not designed to drive significant loads at all.
If you need more than a few mA, then you need to add some sort of power switch for that ...

1 Like

@awneil im planning on controlling a sim900 GSM module, 4x4 keypad membrane, dht22, 4 mq-6 air quality sensor, 4 pir sensors, 2 flame sensor, 4 reed swtiches,, ds1302 rtc module, 4channel relay, microsd module and a 20x4 lcd screen

this modules will be powered by the arduino mega except for the sim900 gsm module and the lights that are attached to the relay.

i am referring to the dedicated 5v, 3.3v and GND pins not the ananlogand digital pins

An Arduino is not intended to be a power supply - especially for things like a GSM radio.

You should power these separately.

2 Likes

@awneil

this modules will be powered by the arduino mega except for the sim900 gsm module and the lights that are attached to the relay.

also if i power up the 20x4 lcd on a separate power it does not function properly.

Follow the rules of circuit design.

You have to determine the current draw of each of the modules and sensors, and use an appropriate voltage power supply capable of easily handling more than the total current draw.

There are strict (published) limits on the current draw from the Arduino 5V and 3.3V outputs, and in some cases, a couple of LEDs can be too much. It is safest to use an external power supply. Be sure to connect all the grounds.

1 Like

Rule #1 A Power Supply the Arduino is NOT!
Rule #2 Do NOT Connect anything Inductive to an Arduino!

My recommendation is to use an external power supply for all of the hardware items. Switches are not a problem. The LCD, DS1302 and dht22 should be OK on the Arduino. All other modules will have a power pin probably +5, these go to the external power supply. ALL Grounds get connected together including the external power supply(s). Hopefully this gets you started. Post a simple schematic showing how you plan on connecting everything together. This will save you purchasing many additional modules because they were connected wrong.

2 Likes

And that connection should be a single "star" point - not a "daisy chain".

Recent thread on this:

1 Like

Like this:

Like this:

The problem with the "daisy chain" being that:

  • Wire 1 carries all the currents from all the loads: I1 + I2 + I3 + I4
    This causes voltage drops in the wire, which will be "seen" by all the loads.
    This is a particular problem when you have loads which draw large peaks of current - such as radio rtansceiver (eg, GSM device).

  • Similarly, Wire 2 carries all the currents from loads 2-4: I2 + I3 + I4

  • etc, etc...

(I thought I'd posted this in that linked thread, but I can't find it now)

2 Likes

@awneil hi! is this an example single star point?

Yes and No. The breadboard is providing a constant ground point, so yes. Daisy chain loops the ground from one device to the next. A break or open wire in the daisy chain can cause all kinds of weird problems.

That said, most industrial control panels daisy chain grounds between relays.

Your house is a mixture of both. The circuit has a common ground, star connection at the breaker panel. For each circuit, daisy chain among the outlets or lights on that circuit, usually an entire room.

Daisy chains are functional, but you must remember to trouble shoot using the ground at the power supply, not at the device.

1 Like

@bacht2c so do you think it wil be alright to use this kind of wiring to my system or is it better to use a separate power supply on my sensors and modules for input voltage and connect their grounds on the arduino mega?

@bigz
You could connect the DHT22, the DS1202 and the keypad to the 2560 and everything else on a separate power supply.
OR
Everything on a separate power supply.

FYI: One of the MQ-6 sensors alone would overload the 2560 5V output.

@jim-p Thank you for your input!.

So i'll Power these sensors via external Power supply:
3pcs Reed Switch
2pcs PIR Sensors
1pc Water Level Sensor
1pc Fire Sensor
2pcs MQ-6 Air Quality Sensors
1pc SW420 Vibration Sensor
NodeMCU v3 [via USB power]
SIM900 Module [via 12v 2A power brick]

the ground pins of this sensor and/or modules must be connected to the 2560 right? @jim-p except for the NodeMCU and the SIM900 Module

while these remaining modules/ sensors are powered by Arduino Mega 2560 R3:
20x4 I2C Lcd Screen
MicroSD Module
4x4 Keypad Membrane
4 Channel Low Trigger Relay
DHT22 Temperature and Humidity Sensor
DS1302 RTC Module

Any device that connecs to a 2560 digital GPIO, SPI, I2C or analog pin must also have its ground connected to the 2560 ground (GND).

I don't know which relay board you are using but almost all need a seperate supply for the relay coils, so I would NOT connect it to the 2560.
Does the MicroSD module use 3.3V?

@jim-p the MicroSD module can be powered by either 3.3v or 5v

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.