0
\$\begingroup\$

Most examples and tutorials have you power small components by connecting them to the 5v pin on the Arduino. As part of my learning process, I've messed up an arduino or two by not considering the amount of power a component would draw or by expecting that it would be drawing less power than it actually did.

Is it - in general - a good idea to be on the safe side and virtually never power any components from the 5v pin, instead using a separate 5v power supply (or at least, a separate line to the same power supply that is powering the arduino)? It seems to me that this way, you'd at least never ruin the arduino itself should you make a mistake, just the power supply (if it's not up to the task), although it might be overcomplicating things.

What are people's best practices in this regard?

\$\endgroup\$

3 Answers 3

1
\$\begingroup\$

For one specific use case, the answer is clearly yes. Be very careful using the 5V pin if you power the Arduino from the USB port. The internal regulator is bypassed via a diode which results in weird voltages appearing at the 5V pin. You will get some unspecified drop across the diode, especially if you're using a Chinese knock off as is common. I measured only 4.72V at the 5V pin whilst the USB voltage was 5.11V. This can confound the unwary and cause unreliable operation of strict 5V kit.

It get's worse. When the ADC is used in the normal mode, as in just reading it, you'll get errors. The ADC references itself to Vcc which in this USB case might be 4.7V, not 5V. All your analogue readings will be higher than you expect. You will have to mitigate by using either the internal 1.1V reference (if appropriate) or your own external reference.

So in summary, best practice would be independent external power if there is any remote possibility of USB operation. This doesn't mean a wall adaptor, but a power source external to the Arduino PCB itself.

\$\endgroup\$
0
\$\begingroup\$

The best design practice is to know your devices. Understand the circuits on the Arduino and learn what they are capable of. Then fully understand the requirements of the components and circuits that you intend to interface with the Arduino. This all includes a rigorous reading of the component data sheets.

There are likely to be plenty of applications where you can connect directly to the +5V pin of the Arduino. Likewise there are going to be circuits where the connection to separate power supply will be required. There are no real hard and fast design quidelines here that can dictate the way to do it.

Use common sense and knowledge to make the right design decisions. Seat of the pants trial and error is not "engineering".

\$\endgroup\$
1
  • \$\begingroup\$ Obviously, this is true, but people make mistakes. My question wasn't "Should I just power everything directly rather than look up the specifications for my components" but "Is this a good practice to safeguard against potential mistakes"? \$\endgroup\$
    – Bas
    Commented Nov 28, 2016 at 9:04
0
\$\begingroup\$

You need to know your component's power/current draw and the power supply power. Usually it will be fine for low current device. For example, it will be fine to directly power few led directly using arduino 5v with resistor.

Usually we power arduino with adaptor 9-12v DC, ~0.5-1A. Thus, it might not be a good idea to directly power a device that will draw large current such as motor or fan to arduino 5v out from the voltage regulator. Some large current draw spike might cause a sudden drop in your voltage also which will impact the microconroller behaviour.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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