Convert 12V to 5V by using 7805 or using Resistor?

Hi Guys,

This is my first time to use 7805 to convert 12V to 5V. I have a few questions hope you guys can enlighten me. :slight_smile:

Attached is my 12V to 5V diagram.

My question is:

  1. Do I need really need to add a diode 1N4007 between 12V and 7805?

  2. Is it correct to use 470uf + 0.1uf (input) and 0.1uf + 220uf (output)? (Got this values from youtube)

  3. Can I connect the 5V output to Nano's VIN?

  4. Understand that the 7805 got heating issue, is there anyway to reduce the heat? As i will be seal up the circuit by using epoxy resin. I read some articles, they advised that can add a resistor between 12V and 7805 to reduce the voltage a bit??? so it can reduce the heat?

Really appreciate it if you guys can answer my questions! thank you!

  1. You need that diode for 3 reasons.
  • Protect your circuit.
  • Drops about 1v, so it helps your lm7805 to dissipate less heat
  • You put a 470uf capacitor and no resistor. You need the diode or this cap will be useless as a filter.
    In short. Use it.
  1. The capacitors will work ok (if you use the diode), although 470uf and 220uf is a lot, you never know how much the energy source will oscilate. A tip, it all depends on how you will use the controller and the practice will diverge from the theory, so you will have to experiment.

  2. Sorry, no idea on this one. Never powered an arduino like this, but probably it's easy to find tutorials on that.

  3. The heating will always be there. If you don´t want to use a small switch regulator (which works really great) you can add components to dissipate energy on other parts of the circuit(The diode for example is already dissipating part of it). This will work fine but you need to calculate how much current you'll need because if you use a resistor too high you won´t get enough current. If the resistor dissipates too much energy, the resistor will break. To proceeed with this you'll have to learn how to calculate these things.

Do you know how much current you´ll use from the 7805?

  1. Not really, as it is clean source (battery) and use linear regulator. If you would have switching regulator circuit, have to be used to protect the battery and the circuit.

  2. Generally yes, but in this case not needed on input side as the power source is a battery. If have switching regulator, capacitors are mandatory as there will be always unwanted ripple. Capacitors will smooth eventually voltage ripple on input and output. Value for larger capacitor is arbitrary and depend on output current and the voltage ripple. Smaller one is always welcome.

  3. Vin pin require 7-12V, as Arduino Nano have his own voltage regulator to 5V (LM2940). If you want to power it by your regulator, connect output pin of 7805 (5V) to 5V pin on Nano.

  4. The 7805 need between 2 to 2.5V to work properly up to 1A constant current, thus ideal input voltage is around 7.5V. Power to dissipate you can calculate as: P= (Vin - 7V) * Iout. For instance: (12V-7V)*1A=5W which is serious dissipation and require cooler and ventilator. To reduce 12V to around 7.5V, you may use switching step down regulator with additional smoothing capacitors and as a second step use linear. to get clean output.
    Or use just switching regulator to 5V, 1A rated, properly isolated and smoothed.
    Or, with 7805, each 4007 diode require 0.7V, then 6 in series will drop the voltage of around 4.2V. However that is not quite good solution.

It is not good idea to seal all in epoxy if dissipation is high - it is a thermal trap.

noob314:

  1. Not really, as it is clean source (battery).

If the battery is powering only his circuit, then you really don't need the first diode and capacitors that high. But you may be using the battery for other things at the same time and the output can oscilate.

noob314:
For instance: (12V-7V)*1A=5W which is serious dissipation.

Well, if he´s using anything over 100ma, he should change to a switch regulator.

tadashimori:
If the battery is powering only his circuit, then you really don't need the first diode and capacitors that high. But you may be using the battery for other things at the same time and the output can oscilate.

That is exactly I have wrote.

@Diy_World

The 7805 is quite sensitive on voltage ripple. Input with small ripple may result the ripple on output. Small ripple at output can be expected even if clean input source is used (battery). That is the reason it is desirable on input side ("in any case"), however mandatory on output side of the 7805, especially if high current is drawn from the 5V target device.

Hi both! @tadashimori, @noob314,

Thanks for the reply! Learned a lot from you guys! :smiley:

So to solve the 7805 heating problem, the best solution is to replace the 7805 with the "Switching Voltage converter / Buck converter / DC DC Step Down Converter (Are they the same? :stuck_out_tongue: )".

Attached is the 12v to 5v diagram with Buck converter, Is it correct? Anything else that i need to add or remove?

tadashimori:
Do you know how much current you´ll use from the 7805?

hmm, I will use the 5V output to power the Nano + 1602 LCD + and a relay (maybe later will add a 5V relay??

Do you have the part number of this switch converter module?
Usually it has the needed capacitors and the diode, so you can remove them all. You gotta see the datasheet.

You may want to add a capacitor and resistor or diode to filter the power source IF ou think the source oscilates too much. As I don't know your application, I can't help on that.

Diy_World:
hmm, I will use the 5V output to power the Nano + 1602 LCD + and a relay (maybe later will add a 5V relay??

If you're using a relay then it's better to stick with the switch converter. Relays draws a considerable amount of current, the 7805 will heat a lot.
If it was only the nano + lcd, then even the 7805 without heat sink would be enough.
Honestly, if you plan to add things in the project, just use the switch converter. It's not expensive and you save time and space because it's less components to add to make it work properly.

If total draw for the project is less than 100mA, you may as well consider LM78L05 in TO-92 package.

It is tolerant up to 30V input, no requirement for cooling, it is much smaller and it is also fixed linear voltage regulator, just limited to 100mA (actually peak current is 140mA, as noted in datasheet).

Your circuit is good, your component choice is bad. Question 1, no unless you want reverse battery protection, see below for more. Question 2. They should work OK, but you may want to check the 0.1 uf to the regulator data sheet. Question 3. No, that requires at least 7 volts. You can use a negative regulator common to the +12 with the output feeding Vin, a five volt one will give you 12 - 5 or 7V for Vin. Question 4. Watts is Watts. It dissipates its voltage drop (12V - 5V) as heat. The 7805 is a poor choice for automotive applications for many reasons. Look at this web site: https://www.st.com/en/automotive-analog-and-power/linear-voltage-regulators.html St makes a large variety of automotive qualified regulators. Your circuit will work just fine with the L4905 regulator. You can string several 1N4002 (if you have 1N4007 use them) diodes in series to drop the input voltage and distribute the heat your bulk capacitor in the input makes it work nicely. Since you are putting it in resin, the part will be getting hotter. If you can use a thermally conductive insulating compound. Also I suggest adding a piece of metal on the tab as a heat sink as close to the outside as possible preferably in an area where there is potential air flow. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

As noob314 suggested, the current draw is the determining factor here.

In you 2nd drawing you added an LCD display which unless there is a back light takes almost no power.

the Nano takes about 20 ma (so I've read). If there is nothing else that consumes appreciable power then:

Battery = 16V (max if being charged by a car)
Current =20 ma = 0.02 amps
Vout = 5V

Power = E * I = (16-5) *0.020 = ~0.25 watts.

Even potted the 7805 (in the package you drew, i.e. TO-220) will dissipate the amount of power and likely a little more.

I personally would not go with the smaller package (TO-92) which will probably do the job but without as much safety margin.

If you plan on using more power you should try to estimate it and perhaps it will still work.

DC-DC converters:
They work fine however I believe they are not nearly as reliable as the simple 7805 for low currents. If you needed 1 amp out then the DC-DC is likely the best but at low current the single device is a better choice.

Remember after potting you can't fix a failed component.

John

Hi,

Your circuit basically looks fine, and the diode is a good safety protector. But just one modification suggested. The 7805 will work a lot happier (cooler and stable) when the input voltage is just a few volts higher than the output, say 8 volts. So you need to drop the battery voltage (let's call it 14 volts) to 8 volts. You don't need any switchmode jobbies, just a simple resistor. To calculate the resistor value, use Ohms Law. 14-8 = 6 volts (to be dropped), so divide 6 by the current draw (say 0.5 amp) = 12 Ohms. Power-wise, the resistor will need to be 6v X 0.5 Amps = 3 watts. The resistor will get warm, so place this outside the encapsulation, but well insulated electrically. It'll work fine.

This may be interesting to look and see what allegedly/presumed well designed and protected switching regulator actually can cause when turn device off. Not that radical in this case, but anyway it clearly shows uncontrolled energy discharge from switching regulator and clear voltage jump. In this video that is a bit expensive RECOM R-78B5.0-1.5 , which should be an ideal replacement of 7805 in single package.

C64 DC-DC Conversion Part 2: "The Fart of Doom" (from 11:00)

Diy_World:

  1. Do I need really need to add a diode 1N4007 between 12V and 7805?

No.

  1. Is it correct to use 470uf + 0.1uf (input) and 0.1uf + 220uf (output)? (Got this values from youtube)

You need capacitors, but your source is possibly the worst imaginable.
To know what capacitors (size matters, type may matter as well) you need, check the data sheet for your specific incarnation of the 7805.

  1. Can I connect the 5V output to Nano's VIN?

Regulated 5V goes to the 5V pin.

  1. Understand that the 7805 got heating issue, is there anyway to reduce the heat?

Use less current. You're dropping 7V there, so 100 mA is 700 mW of dissipation, that's barely OK without heat sink, and will cause it to overheat badly when potted.

A linear regulator is not appropriate for 12V to 5V conversion if you need any significant current. Use a buck converter instead. If you need super clean power (for HiFi or so) you'd use a buck converter to 6-7V followed by a good linear regulator (so not a dinosaur like the 7805). For digital circuits the noise on a buck converter's output is normally no problem.

To the diode question:
If the 5V circuit is the only thing powered from 12V source you probably do not need the diode. But why do you use 12V source and not 5V directly?

Common reason to use high voltage source and step down to logic voltage is another part of the circuit that needs the high voltage. Usually because it needs lot of power: motors, solenoids, LED lighting... When you turn on such heavy load the power source voltage may drop considerably for a short moment. In this case the diode greatly helps to prevent brown out of the 5V circuit.

I would as well like to clear something about power dissipation....

In case of 7805, voltage drop is fixed and it is 2V (according to datasheet). That is the voltage needed for 7805 circuit to work properly. And that voltage need to be excluded from power dissipation calculation, which should be:

Pd = (Vin - Vd - Vout) * Iout

It is quite supprising to me that I often see this instead: Pd = (Vin - Vout) * Iout, which isn't really correct and in case of 7805, that differs quite a bit when calculating dissipation with large current output, which can cause quite wrong cooling requirement and much larger cost production, as well as cost of the end product.

noob314:
If total draw for the project is less than 100mA, you may as well consider LM78L05 in TO-92 package.

It is tolerant up to 30V input, no requirement for cooling, it is much smaller and it is also fixed linear voltage regulator, just limited to 100mA (actually peak current is 140mA, as noted in datasheet).

The TO92 version of the 78L05 seems to be going end-of-life BTW. I bought a dozen when I noticed that, its a handy device for breadboarding, but note its limited power dissipation.

noob314:
And that voltage need to be excluded from power dissipation calculation, which should be:

Pd = (Vin - Vd - Vout) * Iout

This is simply not true which explains why everyone uses the other, correct, formula.

Instead of using a 7805 as a voltage converter, I'd try using a UBEC voltage converter. I think they are very efficient and can handle high input voltages and put out at 5v/3a. Small and inexpensive (~$2 up) on ebay.

Hello guys,

Thanks for the reply!!!

After watching this video on youtube, Buck converter vs. linear voltage regulator - practical comparison - YouTube,

I think I will use buck converter instead. As the 7805 temperature is toooooo high (100++ degree).

Either this:

or this:

Both are 12v > 5v 3A and adjustable.


Not sure if below are the correct, but please correct me if i am wrong :slight_smile:

Arduino: 20mA
1602 LCD with I2C: 0.2mA
12v Relay: 72mA (Datasheet is 0.36W)

How many current will draw from the followings?? i tried google but no luck :frowning:

2N2222A: ???
Flyback diode (1N4007): ????
10k ohm resistor from NANO pin: ???