I am new to the world of Arduino and need a little bit of help. I have an Arduino Uno and I am trying to supply 5V to an actuator using the digital pins. It is my understanding that the board I have is capable of doing that. But I can't seem to get 5V from my digital pins.
I would really prefer to not have to use the 5V power pin because I need to supply multiple sources with 5V in an alternating pattern, which I know I can do with the digital pins.
Could I use the analog pins to help with this? Could I supply more power using a battery? Etc.
Thank you in advance.
2 Answers 2
The digital pins of the Arduino are rated to reliably deliver up to 20 mA. Their absolute maximum rating is 40 mA. Anything above that risks destroying the microcontroller.
If your device is supposed to pull from 0.24 to 0.38 A, that is too much for your Arduino pins. With such a high current, you are seeing a significant voltage drop caused by the internal resistance of the output transistors. Or it could be that you already fried those transistors.
The most common solution is to use the digital output to turn on a MOSFET that supplies separate power to a high-current device that needs more current than the 20 mA that an ATmega328 microcontroller can safely supply.
The MOSFET is chosen based on the desired current and with the need for a logic-level input.
A typical circuit:
schematic
simulate this circuit – Schematic created using CircuitLab
D1 is needed for an inductive load like a motor. It protects other components.
You might get away without using the resistors (connecting D1 directly to the MOSFET's gate) but the 10 K "pull-down" resistor R1 ensures that the load is off when the Arduino is powering up. Resistor R2 is probably mainly useful for noisy or high-frequency applications..
-
1Why an IRF530 instead of an IRL530? Per Figures 1 of vishay.com/docs/91299/sihl530.pdf and vishay.com/docs/91019/irf530.pdf the IRL530 is more fully on at V_GS=5V and would do 10x the amps of the IRF530.Dave X– Dave X2021年12月15日 19:54:11 +00:00Commented Dec 15, 2021 at 19:54
-
3@DaveX: No reason other than that's what the diagram editor came up with and I forgot to remove :-)RedGrittyBrick– RedGrittyBrick2021年12月15日 22:49:49 +00:00Commented Dec 15, 2021 at 22:49
I can't seem to get 5V
... what does that mean? ... are you unsure if you get 5 V?