Arduino Mega 2560 5v Pins

Hello, I hope I have put this in the write topic, if not, can you please help me do so. Do the output pins on an Arduino Mega 2560 (eg. pins 1,2,3,4,5,6,7,8,9,10,11,12,13,...) have an output of 5v? Thank you in advance.

Only if they are configured for output, a logical '1' is written to them (typically with digitalWrite() ), and an appropriate load is connected (not too much current).

Pin 1 on the Mega is dedicated to serial comms, so isn't a good choice for an output.

You didn't say why you need to know...

Hi, Thank you for your reply @anon57585045. I need to know, because I was wanting to control a mini 5v humidifier, I wanted the arduino mega to switch on and off the humidifier depending on the humidity. The humidifier uses 2amps, if you would like the link to the humidifier, here it is: https://www.amazon.co.uk/Portable-Conditioner-Personal-Evaporative-Humidifier/dp/B08XMV34JZ/ref=sr_1_6?dchild=1&keywords=air+water+humidifier+230v&qid=1629277143&sr=8-6. Thank you.

You can't run a mini humidifier directly from an output pin. You need some kind of controller or power amplifier. It could be a module or a custom circuit.

@aarg Can I run it from the 5v and GND pins?

No, since a 5 volt pin on the Mega can only give you a max of 50ma (40 times less that what you need). You can get a really or something and have the humidifier be powered by a different power source. The Megan’s output of 5V can trigger the relay or controller board to power up the device.
In short, it is possible but only with a circuit and a different power source for the device. You can not directly connect the device to the 5V and GND since the Mega can not give that much current

No, if you want to power something that needs 2 Amps at 5V you need to use a seperate power supply.

This is why you need to explain your application when you ask such a question. As it was asked, the question would simply be "yes". Then you would go build your project, it would fail, and you would be left wondering why. Or believe that you were misled...

Would I be able to use this: https://www.ebay.co.uk/itm/363538230034 or this: https://www.amazon.co.uk/RUNCCI-YUN-Submersible-Brushless-Flexible-Garde(Vertical)(black)/dp/B08BZBN29C/ref=sr_1_5?crid=1159LIH0CDLBZ&dchild=1&keywords=5v+water+pump+arduino&qid=1631693529&sprefix=5v+water+pump+%2Caps%2C371&sr=8-5 and run it off pin 10? Thanks again.

Maximum output per I/O pin is 20mA. Pin 10 is a normal I/O pin. The pump needs 1A or 1000mA. What do you think?

Steve

You do need to understand what I/O pins on the Arduino are. They are basically logic values corresponding to 5 V for a "HIGH" and 0 V for a "LOW". They are primarily intended to control logic circuits. They actually do have the ability to provide about 20 mA comfortably, sufficient to light a common LED with a current limiting resistor.

If you want to control something else that requires any significant current, such as your motor, then you need a switching circuit and nowadays, a MOSFET is the most appropriate sort of component. These are readily available in modules to interface to an Arduino output pin.

Much the same applies to the "5V" pin on the Arduino. It is there to provide a 5 V reference for sensors and control circuits. It is not a "power supply" of any sort.

You should not be using "Vin" or the "barrel jack" of a UNO or Mega 2560 to power the Arduino in a "real world" system; you can power it by 5 V to the USB connector or (preferably) the "5V" pin and of course, ground. You must just be careful to disconnect the "5V" pin from your 5 V power supply whenever you plug the UNO or Mega 2560 into the USB port of a PC.

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