0
\$\begingroup\$

Before i start i would just like to say that i am an absolute beginner at this, and this question might be a little silly.

I'm trying to make a shield that'll go on top of an arduino uno. The shield has an L298N IC that will drive 2 12VDC motor. I'm using a LiPo 3S Battery to power the shield. The shield uses an LM7805. The output of the LM7805 will power the Arduino Uno R3 through the 5V pin, an L298N's IC through the VSS pin, and a couple of line sensors.

Is it okay for me to power the arduino uno through the 5v pin, even if its connected to other components? I've heard that powering through the 5v pin is dangerous.

Here is an image of my schematic. The Schematic

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Be aware electronics.stackexchange.com/questions/108686/… \$\endgroup\$
    – Andy aka
    Feb 12, 2020 at 17:04
  • \$\begingroup\$ Using a linear regulator like a 7805 is a huge waste of energy in a battery operated device. You need to look at using an appropriate switching regulator so you have some part of a chance of achieving 90% or greater conversion efficiency instead of burning up lots of your battery capacity in a 7805. \$\endgroup\$ Feb 12, 2020 at 17:04
  • \$\begingroup\$ @MichaelKaras How much current does an Arduino (itself, no addons) typically draw? \$\endgroup\$
    – user253751
    Feb 12, 2020 at 17:13
  • \$\begingroup\$ @user253751 - I have no idea. If I wanted to know I would probably measure it while it was operating in some desired scenario. \$\endgroup\$ Feb 12, 2020 at 17:20
  • \$\begingroup\$ I ask that because it's way less than whatever motors this Myadra22 is using and the extra power wasted probably doesn't really matter. \$\endgroup\$
    – user253751
    Feb 12, 2020 at 17:22

1 Answer 1

1
\$\begingroup\$

Is it okay for me to power the arduino uno through the 5v pin, even if its connected to other components? I've heard that powering through the 5v pin is dangerous.

Powering through the 5V pin is 'dangerous' only because it relies on the external power supply having the correct voltage. An LM7805 is quite safe provided it is used correctly. Before connecting the Uno you should measure the output to make sure it is actually 5 V.

The main things to watch out for with the LM7805 are that the input filter capacitor is large enough (to avoid oscillation), the minimum input voltage is sufficient (>7V), and current draw and power dissipation are not excessive. Although it can put out a bit over 1 A peak the power loss will heat it up. If it gets too hot then it will shut down until it cools down. When powered by a 3S Lipo the input voltage could be as high as 12.6 V, so at 1A the power dissipation could be up to 12.6 V - 5 V * 1 A = 7.6 W. It would need a large heatsink to avoid overheating. However in your circuit the current draw should be less than 100 mA.

The Uno itself draws about 45 mA, and the L298 Logic supply draws 36 mA maximum, so provided the Uno isn't powering anything else the LM7805 only has to supply ~80 mA. Maximum power dissipation would be ~7.6 * 0.08 = ~0.6 W. Thermal resistance from junction to air (no heatsink) of the TO220 package is 65 °C/W, so the junction temperature would rise by about 0.6 * 65 = 39 °C. The shutdown temperature is 125 °C so it should be fine at normal room temperature.

If the motors draw high current then the battery voltage could be noisy, and might even dip below 7 V when they start up. To help isolate this noise from the regulator you could add a diode (eg. 1N4001) in series with the input, and use a large input filter capacitor (eg. 100 uF). The capacitor will provide current to the regulator during short battery voltage dips, preventing the output voltage from dropping low enough to reset or 'glitch' the Arduino. The diode also prevents damaging the LM7805 and Arduino if the battery is connected with reverse polarity. The Uno's internal regulator circuit uses this technique.

\$\endgroup\$
4
  • \$\begingroup\$ Thank you very much for your answer. In the schematic, I already have a 0.33uF ceramic capacitor connected to the input of LM7805 and ground. Should i just change it to 100uF or add one? \$\endgroup\$
    – Myadra22
    Feb 12, 2020 at 18:28
  • \$\begingroup\$ 0.33uF is the bare minimum. Change it to a 100uF and add a rectifier diode before it. Keep the 0.33uF if the 100uF cannot be placed close to the 7805. BTW there is an error in your schematic. C3 should go from VCC to ground, not be in series with the L298 VS pin. \$\endgroup\$ Feb 12, 2020 at 18:39
  • \$\begingroup\$ Abbot So what im getting is that i should wire it like so, VCC -> Anode of Diode -> Cathode of Diode -> Input of regulator, And then paralel a capacitor to ground like in the schematic. Also thank you very much for pointing the mistake i made, i didn’t even notice that! \$\endgroup\$
    – Myadra22
    Feb 12, 2020 at 19:36
  • \$\begingroup\$ " i should wire it like so, VCC -> Anode of Diode -> Cathode of Diode -> Input of regulator, And then paralel a capacitor to ground" - yes \$\endgroup\$ Feb 13, 2020 at 0:53

Your Answer

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

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