Output Voltage From I/O Pins?

Hello, I am doing a project that involves a water pump. i can power from arduino 5v port but not my I/O Pins even when having a solid on

What are the specs of the I/O pins voltage?

Thank you for reading
Have a good day

//code from tinkercad
//
long readUltrasonicDistance(int triggerPin, int echoPin)
{
  pinMode(triggerPin, OUTPUT);  // Clear the trigger
  digitalWrite(triggerPin, LOW);
  delayMicroseconds(2);
  // Sets the trigger pin to HIGH state for 10 microseconds
  digitalWrite(triggerPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(triggerPin, LOW);
  pinMode(echoPin, INPUT);
  // Reads the echo pin, and returns the sound wave travel time in microseconds
  return pulseIn(echoPin, HIGH);
}

void setup()
{
  pinMode(12, OUTPUT);
  Serial.begin(9600);
}

void loop()
{
  if (0.01723 * readUltrasonicDistance(10, 11) <= 5) {
    digitalWrite(12, HIGH);
  } else {
    digitalWrite(12, LOW);
  }
  Serial.println(0.01723 * readUltrasonicDistance(10, 11));
  delay(10); // Delay a little bit to improve simulation performance
}

The problem is current, not voltage. I/O pins can only manage a maximum of 40mA and you should keep under that if you want your Arduino to have a long life.

No, don't do that. The tine conducting string on the board might fuse.

Your arduino is a microcontroller. It provides logic not power. If you wish to power something do so using a power supply, depending on your requirements you may already have one for your phone etc. The small voltages and current provided by the arduino can be used to switch the power supply using transistors or mosfets etc.

If you try to get too much current the voltage doesn't "hold" up. The Arduino will overheat and it MIGHT die.

The relationship between voltage, current, and resistance is defined by Ohm's Law. Resistance is "the resistance to current flow". Usually we don't know the resistance of a water pump but given the current rating we could calculate it from Ohm's Law. (The resistance and current will vary depending on the physical load on the motor.)

...If you plug too many high-power things into a power outlet in your house, you'll get excess current and blow a circuit breaker and then the voltage goes to zero until you reset the breaker.

How much current or wattage does the pump require?
Post a link to the pump or it's brand name and exact part number.

The pins can provide an absolute maximum of 0.2 Watts of power (5V, 40mA). Best limited to 0.1W (20mA). If you need to drive anything that is not 5V or is more than 2mA you need driver hardware like a transistor, MOSFET, H-Bridge...

Electrical Characteristics/specifications of an IO Pin pf ATmega328P Microcontroller.
electricalCharIO

The meaning of VOH = 4.2V.
When HIGH is asserted on a pin and the load draws 20 mA current, it is guaranteed that the pin will hold minimum 4.2V under the condition that the Vcc supply for the MCU is 5V and the chip's internal temperature does not exceed 850C.

Hello JCA34F
Thanks for replying
Here is the link:

Thank you

Thank You GolamMostafa

You Just Saved Me A Lot Of Time

Have A Good Night

1 Like

Hello, I need a water pump for my project.
I dont know which one is good
Please Let me know.

Thank You and Have A Good Night

How much water do you want to pump (gallons or liters per minute), and how high (meters)?

That is not going to happen, you can't drive ordinary motors from an I/O pin.

You would need a large contactor for this pump.

image

2 Likes

Doesn't Mater

Oh, but it really does.
There are millions of pumps to choose from.

What are you trying to do?

Find A pump That I/O Pins Can Power properly.

Got it, you're either trolling or keeping your million-dollar idea super-secret.

You've been told that there are no pumps that can be run directly from a pin output. If you don't want to specify a set of requirements, then this thread is a complete waste of time.

???? what are you saying I mean 10$ Dolor pump

No such pump exists