5
\$\begingroup\$

I am trying get a 5V to power up AVR microcontroller. The power will be supplied either from 5V USB power adapter or from motorbike battery (about 11-13.7V).

I have one piece of both 7805 and LM317 voltage regulators, but I don't have any AMS1117. I would like to know the advantages and disadvantages of using any of these parts.

\$\endgroup\$
4
  • \$\begingroup\$ Care to elaborate your question a little, please? ;-) \$\endgroup\$
    – user59864
    Commented Jan 26, 2016 at 8:33
  • 3
    \$\begingroup\$ Compare the datasheets. \$\endgroup\$ Commented Jan 26, 2016 at 8:42
  • 1
    \$\begingroup\$ Get a car usb adapter. Most 700mA - 1A ones are based on the MC34063A switching regulator, and are set to 5V. No fuse, no muss. \$\endgroup\$
    – Passerby
    Commented Jan 26, 2016 at 9:07
  • 2
    \$\begingroup\$ The LM317 is a bad beetle and is featured in www.badbeetles.com if you want 5V and wont use a buck converter then the 7805 is your friend . \$\endgroup\$
    – Autistic
    Commented Jan 26, 2016 at 9:46

2 Answers 2

4
\$\begingroup\$

They all work the same way. They limit the voltage to 5V and convert the rest to heat. While the LM317 can be adjusted to every voltage, the 7805 is fixed to 5V. If you need 5V then take the 7805 (less components needed).

Linear regulators (like the ones you suggested) are a poor choice if you want to be power efficient. In your case (11-13.7V) they will convert more than 50% of the energy to heat. Much more efficient are buck converters, but they are a little bit more complicated to handle, more expensive and produce more noise.

\$\endgroup\$
4
  • \$\begingroup\$ Buck convertors tend to have semi-significant current draw of their own; at very low power levels, decent linear regulators can be more efficient. That might be relevant for the OP, as he's talking about powering an MCU. \$\endgroup\$
    – marcelm
    Commented Oct 17, 2016 at 21:34
  • 1
    \$\begingroup\$ Don't forget a heatsink for the 7805! \$\endgroup\$ Commented Aug 20, 2019 at 4:22
  • \$\begingroup\$ what about noise of buck converter? I want to design a low noise power supply to amplify sine wave of 200mv from DDS function generator output to 5V to 15V, everyone saying linear power supply should be used because of low noise. \$\endgroup\$ Commented Sep 2, 2020 at 15:29
  • 3
    \$\begingroup\$ @NitinKumar: For low noise supply, often a combination of buck and linear are used. The buck converter brings the voltage to around 2V above the needed voltage and the LDO reduces the noise and limits the voltage to the exact value needed. \$\endgroup\$
    – Botnic
    Commented Mar 24, 2021 at 8:17
3
\$\begingroup\$

Usually I read a lot of discourage messages about LM7805 (or another linear converter), that it's inefficient, it wastes a lot of energy, it needs heatsink and so on. And the best choose always would be a buck converter.

But, if your circuit needs a small amount of current and the consumption is not a problem, then a linear converter (like LM7805) is a much better solution than a buck converter, because the linear converter in comparison to the buck converter is much easer to integrate in the circuit (all you need is the linear convertor and few capacitors).

Example from datasheet:

Fixed Output Regulator Circuit with LM78L05

For example, we need to convert 12V to 5V for our circuit that draws maximum 25 mA (small PCB with ATtiny85 on board + some additional logic components). I would choose LM78L05 (small package, provides max 100mA), but if you have enough space then LM7805 (TO-220) is even better.

Power dissipation = \$(V_{in} - V_{out}) \times I_{max} = (12V - 5V) * 0.025A = 0.175W\$

Junction-to-board thermal resistance (SOIC package) = 69.3 °C/W

The temperature = \$69.3 °C/W \times 0.175W + T_{amb} = 12.13°C + 30°C (ambient) = 42.1°C\$

Additionally, I would use a diode on input pin to drop 0.7-1V, which will reduce the power dissipation and the temperature on LM78L05, and ensure that the polarity is correct.

\$\endgroup\$
8
  • 2
    \$\begingroup\$ The diode won't reduce the overall power dissipation, but it will reduce the power dissipated in the regulator. It spreads it out a bit, which can be helpful. Also note that if you're talking about really low current levels, a 7805 of any variety isn't the best choice--Look into something with lower ground current like an NCP718. The 7805 has several mA of ground current (additional current required to bias the regulator); the NCP718 has only a few hundred μA. \$\endgroup\$
    – Hearth
    Commented Jul 12, 2022 at 13:40
  • \$\begingroup\$ @Hearth 78M05 in TO-252 or small SMT package is a good compromise. Up to 500mA current (more than you typically need for a linear regulator) and better performance* than the 78L05. Cheap and widely second sourced. * for example, PSRR of 78x/78Mx is 78-80dB, 78L is 51-62dB. \$\endgroup\$ Commented Jul 12, 2022 at 13:50
  • \$\begingroup\$ @SpehroPefhany According to the TI datasheet, though, the LM78M05 still has max 10 mA, typ 4 mA of ground current at 500 mA output, and still about 3 mA at 5 mA output; the NCP718 has typ 300 μA ground current at 300 mA output, and 50 μA at 10 mA output. If you're powering something that needs 25 mA, an additional 3 mA is significant--the lower ground current of the NCP718 would make it an easy choice here. PSRR of 60 dB is a bit worse than the 78Mx though, if that's your main concern. \$\endgroup\$
    – Hearth
    Commented Jul 12, 2022 at 13:58
  • 1
    \$\begingroup\$ There's many single package switch regulators that can be used as TO220 drop-in replacements for LM7805, fully compatible and just as easy to use. The only differences are that LM7805 is awfully inefficient and has a tendency to melt through the floor. So you just need to ask yourself: do I need my voltage regulator to consume needless current and melt through the floor? Then design accordingly. (There are other situations when you need to use linear regulators for EMC reasons but those weren't the arguments you were making here.) \$\endgroup\$
    – Lundin
    Commented Jul 12, 2022 at 14:32
  • 1
    \$\begingroup\$ Power dissipation is more like 217mW typically because you didn't include the Iq of typically ~3.5mA * 12V, but I agree that in this range of applications the 78x05 can be an ideal solution. +1. Probably why billions of them are still sold, 50 years after they were introduced. Like the LM358/LM324 and ULN2003A they are useful, rugged, widely available and cheap enough that they won't easily die. \$\endgroup\$ Commented Jul 12, 2022 at 18:09

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