Power Distribution for Arduino Mega


I use Arduino Mega board to drive sensors and record the data on an SD shield, and also connected an OLED display. However, after wiring everything, the sensor readings are abnormal or nonexistent, and the OLED display is not functioning.
Could this be due to insufficient voltage?
I use USB port from a laptop for power.
I would like to ask how to properly allocate power or what power supply method to use?
Thanks.

You don't allocate power as such, you just connect the parts to the required power supply. You check the current draw from your power supply with a current meter, or measure the voltage out of the supply and see ii it drops under load.

Given this is a pure hardware question the code is irrelevant. What we need is a schematic and not a photograph at this stage.

1 Like

In electronics it is not like a budget where you allow a given amount for a task. Each device takes what it needs/wants, it is up to you the designer to determine how much power these devices will require and to supply it. If they do not get enough they will fail sometimes spectacularly. You can control when each devices is on or off and in what mode to help control your power allocation. A Power Supply the Arduino is NOT! You do not have much power available on the 5V and 3V3 pins. The power source voltage if using Vin has a big effect.

And not in an intuitive way, for beginners. Most will think "Ahh, 9V wasn't enough on Vin, so I'll give it 12V", not realizing that by doing so, they're increasing the power dissipated in the regulator, and effectively reducing the ability of the regulator to do it's job. The voltage supplied to Vin should be as low as reasonably possible, but at or above 7V. That provides headroom(for, for example, increased voltage drop in power supply wiring as current consumption increases), while maximizing the output current the regulator can provide for external circuitry.
Barring sufficient knowledge to properly analyze the circuit's power requirements, a beginner is well advised to simply provide an external 5VDC supply for everything beyond the Arduino and a few LEDs. That way, the beginner can avoid struggling with intermittent and capricious problems that are beyond his ability to resolve at the same time as he is learning the rudimentary basics of software, and hardware interfacing.

That's a longwinded way of saying 'Don't use the Arduino to power other stuff'.

1 Like

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