2
\$\begingroup\$

I'm working on a device that used an Arduino Nano to operate multiple motors with a cumulative current draw of over 1A. Commands are sent from a computer via USB to operate the motors. The device is powered by an external 12V supply from a wall outlet, which the Arduino is meant to be powered through by the USB. Its 5V pin is not connected to the network.

I was doing some testing with a new on-off button setup and realized that when the 12V supply is absent but the Arduino is plugged into USB, the device actually draws a little over 4V through the Vin pin and into the 12V net. I don't believe the Nano has easily modified connections to change how power is distributed across its pins, and I know that powering it through the 5V pin directly will not only lead to the same problem, but also connect the USB supply straight to 5V net directly, rather than the 12V supply line that just connects to the regulators and Arduino's Vin.

I may just be making mountains out of mole hills, and I also know that with a more custom setup instead of a prefab Arduino this ceases to be an issue, but I am curious to hear how this would be tackled by others. My initial thought was just to power the Arduino through the USB and not have it connected to the 12V or 5V lines at all, with only its GPIO connected to the other aspects of the board.

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

Disconnect the Vin pin completely if you plan to always power the Arduino from USB.

Or add a diode from +12 V to Vin, if you want to be able to also power from 12 V.

\$\endgroup\$
5
  • 2
    \$\begingroup\$ I'm a little annoyed I didn't think of the diode thing. In any case, I wasn't originally planning to power it through the USB, but I need the connection to control the device via PC. Since the USB connection was mandatory, I had to consider the possibility of doing away with Vin \$\endgroup\$
    – E.HP.S
    Commented Sep 21, 2023 at 19:08
  • \$\begingroup\$ Any particular diode you recommend? I've got some SS34 Schottky diodes already (40V 3A), but I'd like a second opinion \$\endgroup\$
    – E.HP.S
    Commented Sep 27, 2023 at 14:55
  • 1
    \$\begingroup\$ As long as it can draw what the Arduino needs. Even if you load the pins to the maximum it's less than 200 mA though. It might even be good to use a diode with high forward voltage drop, so you don't have to drop that much in the linear regulator on Nano, but it's not a huge difference. \$\endgroup\$
    – Ralph
    Commented Sep 27, 2023 at 15:01
  • \$\begingroup\$ Actually, I just had a thought. If I was to use a diode to power it through the 5V pin, I'd be dealing with a voltage drop of about 0.7V. So, would it make more sense to use the 6V supply to power it through the 5V pin to account for that drop? I could pick a diode with a higher drop \$\endgroup\$
    – E.HP.S
    Commented Sep 27, 2023 at 15:42
  • \$\begingroup\$ Please consider marking this as the correct answer, if you think it is (checkmark next to answer voting buttons). If you are powering through 5 V (not Vin), then I'd recommend using a schottky diode and powering from 5 V, not 6 V. Arduino Nano uses the same trick with diode SS1P3L for choosing between regulator output and USB voltage (Both 5 V). Using 6 V and one or two diodes will also work in practice, but I don't like it as leakage currents cause voltages to rise when the load is low. Maybe a theoretical problem, but still. \$\endgroup\$
    – Ralph
    Commented Sep 27, 2023 at 17:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.