EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: Lucky-Luka on February 02, 2021, 02:50:29 pm
-
Hi all
I have to power a PIC18F (5V) from 12V power supply.
Do you think it's ok the attached circuit?
Is a fuse needed? If needed, which type of fuse should I use and in which position of the circuit ?
Thanks
-
Just use an ordinary diode. A MOSFET won't gain you anything because the LM7805 just burns the excess off as heat and you've already got 4V of headroom, as it is. A diode would also mean the LM7805 runs a little cooler. In fact, I'd go for the LM78L05, because you probably don't need the 1A the LM7805 can supply and the lower current limit of the LM78L05 would better protect your circuit,
-
If you need a bit more current. there's also the LM78M05 500mA regulator, though note that at 5V drop, its going to be dissipation limited if you don't heatsink it. Also if you are using a simple series diode at the input, and nothing after it can rapidly pull the regulator input to ground, you *DON'T* need an anti-parallel diode across the regulator unless you intend to back-feed it from a different power source, and if you are doing that it can be a lot smaller as it only has to occasionally withstand the surge to charge the 100uF input capacitor.
-
The circuit is right. Though I agree with @Zero999 an ordinary diode would serve the purpose, just select the diode with reverse bias voltage higher than 12V.
But mear in mind that 7805 is a linear regulator and have high heat dissipation thus lower efficiency. You must explore the option of DC-DC converters
Check this module out.
LM2596 DC-DC converter
-
It not worth the bother to use a switching regulator if you don't need energy efficiency, and no heatsinking is required. i.e. When the linear regulator's max dissipation will be significantly under 1W in a 'shirtsleeve' environment.
Cheap 'LM2596' modules are usually fake - if your application can withstand the excessive 52KHz ripple on the resulting 5V rail, and the risk of the chip shorting input to output if you overload it, (and its not going to be good for as much as 1/3 of its fake 3A rating, so I wouldn't push it past 500mA for longer than a few seconds), then fine, go for it. Otherwise buy the genuine LM2596 (or competing chip with full data and decent design guide), from a major 1st world distributor, and design your own with a good quality inductor with a saturation current higher than the switcher's peak current limit, good quality low ESR 105 deg C capacitors, and a beefy enough catch diode to handle full output current without cooking itself.
-
The circuit is right. Though I agree with @Zero999 an ordinary diode would serve the purpose, just select the diode with reverse bias voltage higher than 12V.
The PMOS is there to offer reverse polarity protection. Using a PMOS would virtually eliminate the 0.6V diode drop across it when the polarity is correct.
-
If you need a bit more current. there's also the LM78M05 500mA regulator, though note that at 5V drop, its going to be dissipation limited if you don't heatsink it.
Is it the same using the original 7805?
Also if you are using a simple series diode at the input, and nothing after it can rapidly pull the regulator input to ground
Why? And what should I do to avoid this problem?
you *DON'T* need an anti-parallel diode across the regulator unless you intend to back-feed it from a different power source, and if you are doing that it can be a lot smaller as it only has to occasionally withstand the surge to charge the 100uF input capacitor.
What does "back-feed it from a different power source" mean?
btw I have read that it's a good idea to use it to avoid damaging the 7805 and I've chosen a schottky diode because it's faster than a normal diode like 1n4001.
-
The LM78M05 is just like a 7805 but with half the current limit.
If you allow the voltage across the regulator (from in to out) to reverse by more than one diode drop, some types of regulator can be damaged. This can happen if other loads on the unregulated supply at the input pull that down to ground faster than the reservoir caps on the output discharge. It can also happen if you sometimes feed the output from a different source, e.g USB Vbus.
-
The circuit is right. Though I agree with @Zero999 an ordinary diode would serve the purpose, just select the diode with reverse bias voltage higher than 12V.
The PMOS is there to offer reverse polarity protection. Using a PMOS would virtually eliminate the 0.6V diode drop across it when the polarity is correct.
That's true, but the LM7805 will work down to 8V, so there's no point in using a MOSFET to get a very low voltage drop. A diode will do the job and is much simpler.
If you need a bit more current. there's also the LM78M05 500mA regulator, though note that at 5V drop, its going to be dissipation limited if you don't heatsink it.
Is it the same using the original 7805?
It's similar, but with a lower output current rating. There are several variants of the LM7805 with similar part numbers, each with different current ratings.
| Part Number | Maximum Current |
| LM78L05 | 100mA |
| LM78M05 | 500mA |
| LM7805 | 1A |
| L7805 | 1.5A |
| L78S05 | 2A |
The LM7805 is fine, even though it's rated to 1A and you only want to draw 10mA, but its current limit is still around a couple of Amps, which won't provide so much protection, if something goes wrong in your circuit. In such an application it's better to use the LM78L05, which will limit the current to a couple of hundred mA, if there's a fault in your circuit.
Also if you are using a simple series diode at the input, and nothing after it can rapidly pull the regulator input to ground
Why? And what should I do to avoid this problem?
I'm not sure what he meant. Presumably it would be better to the decoupling capacitor, after the diode would be better, than before it, since it would stop whatever is connected to the input from discharging it.
-
I think just using the lm78l05 with its 100ma current limit is probably better than using a fuse(less parts). Also the more voltage the first diode drops means less thermal stress in the regulator, keep that in mind when choosing your 1st diode. 100uf input capacitors might be overkill, I think you only need 100-330nf on input(it is a voltage regulator). 10uf on the output looks good.
-
Considering the attached MAX ratings maybe LM78M05 is better?
-
You've already gotten some decent advice, but here's my $.02.
You said fuse, ordinarily you wouldn't have a separate fuse for each small section of the circuit, it's just not necessary. Also not necessary are the reverse-current bypass diode over the regulator, the 100nF input coupling capacitor and the MOSFET--just use a plain 1N4004 or the like. As mentioned, the MOSFET has no advantage over the diode since you are dropping 7 volts anyway. A decoupling cap is only needed if the main capacitor is a long way from the regulator input. The bypass diode is not needed because even if you had a power source downstream, the 7805 won't be burned up just charging a 100uF capacitor. This setup is for when the potential for larger backfeeds may occur in systems with larger capacitors or sources that can sink current (like a battery) and your reverse-polarity protection eliminates this problem as well.
Now, if you want additional protection--say if the unit is being used with an external supply and in addition to reverse polarity you want to protect the supply and the MCU from overvoltage as well, you can use a small fuse ahead of the diode, a 15-volt zener across the input and a 5.6 or 6.2 volt zener across the outputs. This wil protect your unit from inadvertent overvoltage inputs and even protect the MCU from failure of the regulator. Just make sure the zeners are well above the usual operating voltages, so if the 12V input is automotive, for example, maybe 16.8 volts would be a better choice.
-
Considering the attached MAX ratings maybe LM78M05 is better?
Consider the thermal issues. I don't know what you think your actual maximum current might be, but lets say it is 300mA and you have an actual 12VDC regulated supply as an input. The regulator will have to dissipate (0.3 * (Vin - Vout - Vf)). Assuming the input is 12, the output 5 and the diode's Vf is 0.6V, you have 0.3 * 6.4 or 1.92 watts. A plain TO-220 LM7805 can handle that without a heatsink. A heatsink is a part too! I'm assuming you are making something one-off and that this is not a a production project.
-
The circuit is right. Though I agree with @Zero999 an ordinary diode would serve the purpose, just select the diode with reverse bias voltage higher than 12V.
The PMOS is there to offer reverse polarity protection. Using a PMOS would virtually eliminate the 0.6V diode drop across it when the polarity is correct.
That's true, but the LM7805 will work down to 8V, so there's no point in using a MOSFET to get a very low voltage drop. A diode will do the job and is much simpler.
and have a much higher chance of surviving, a mosfet gate directly exposed to the outside with no protection is asking for trouble
-
Consider the thermal issues. I don't know what you think your actual maximum current might be, but lets say it is 300mA and you have an actual 12VDC regulated supply as an input. The regulator will have to dissipate (0.3 * (Vin - Vout - Vf)). Assuming the input is 12, the output 5 and the diode's Vf is 0.6V, you have 0.3 * 6.4 or 1.92 watts. A plain TO-220 LM7805 can handle that without a heatsink. A heatsink is a part too! I'm assuming you are making something one-off and that this is not a a production project.
Is LM78M05 able to dissipate less heat than LM7805? I haven't found this info in the datasheet.
-
2W is marginal for TO220, you may get ~150°C inside while operating in room temperature air.
Look for thermal resistance specifications, junction-to-case and junction-to-ambient. These will tell you how much power each part can handle. Small difference in RthJC may exist between different parts in the same package, but at low power levels like here you will find that any regulator in TO220 performs pretty much the same as any other.
-
Is LM78M05 able to dissipate less heat than LM7805? I haven't found this info in the datasheet.
It depends on package used. If both are TO-220, then the numbers are comparable. Thermal resistance junction to ambient w/o heatsink (Rja) is around 65 °C/W.
If you take 78M05 in DPAK and 7805 in TO-220, then it depends on size of PCB footprint.
Thermal resistance of DPAK with smallest footprint is around 100 °C/W, with 25x25mm pad around 50-60 °C/W.
If you plan to dissipate around 2W as stated above, i would recommend you to use part in TO-220 case with small heatsink.
-
Consider the thermal issues. I don't know what you think your actual maximum current might be, but lets say it is 300mA and you have an actual 12VDC regulated supply as an input. The regulator will have to dissipate (0.3 * (Vin - Vout - Vf)). Assuming the input is 12, the output 5 and the diode's Vf is 0.6V, you have 0.3 * 6.4 or 1.92 watts. A plain TO-220 LM7805 can handle that without a heatsink. A heatsink is a part too! I'm assuming you are making something one-off and that this is not a a production project.
Is LM78M05 able to dissipate less heat than LM7805? I haven't found this info in the datasheet.
The maximum power dissipation depends on many factors: maximum allowable die/junction temperature, ambient temperature, package and heat sinking.
The thermal resitance between the die and the ambient, i.e. surroundings, govens how much the temperature of the die will increase, given a certain power dissipation. It's equal to the sum of the thermal resistance between the die, case, any thermal tab used and heatsink.
Example:
If the thermal resistance between the die and ambient is 25°C/W, the maximum operating temperature is 50°C and the maximum die temperature is 150°C/W. The maximum permissible temperature rise is 150 - 50 = 100°C/W, giving a maximum power dissipation of 100/25 = 4W.
Looking at the data sheets for the LM78M05 and LM7805, for the TO220 packages, the LM78M05 has a lower junction to case thermal resistance of 1.3°C/W vs 1.7°C/W of the LM7805, but a lower maximum junction temperature of 125°C, vs 150°C for the LM7805.
https://www.ti.com/lit/ds/symlink/lm340.pdf (https://www.ti.com/lit/ds/symlink/lm340.pdf)
https://www.ti.com/lit/ds/snvs090g/snvs090g.pdf (https://www.ti.com/lit/ds/snvs090g/snvs090g.pdf)
One thing I often do, when I only have the LM7805 available and I need it in a relatively low current application, is add a series resistor to limit the current. Suppose my circuit needs 100mA maximum, the minimum power supply voltage is 10V and the lowest voltage I want at the LM7805's input is 8V. That gives a maximum voltage drop accross the resistor of 10 - 8 = 2V, applying Ohm's law gives V/I = 2/0.1 = 20 Ohms. If the regulator's output is shorted, when the supply voltage is at its nominal 12V, the LM7805 will probably drop around 2V, giving 10V accross the resistor and a short circuit current of 500mA, rather than the 1.5A listed on the LM7805 data sheet. The resistor will need to be rated to dissipate 5W. There should be a fairly big decoupling capacitor, say 100µF, on the LM7805's input.
-
Looking at the data sheets for the LM78M05 and LM7805, for the TO220 packages, the LM78M05 has a lower junction to case thermal resistance of 1.3°C/W vs 1.7°C/W of the LM7805, but a lower maximum junction temperature of 125°C, vs 150°C for the LM7805.
https://www.ti.com/lit/ds/symlink/lm340.pdf (https://www.ti.com/lit/ds/symlink/lm340.pdf)
https://www.ti.com/lit/ds/snvs090g/snvs090g.pdf (https://www.ti.com/lit/ds/snvs090g/snvs090g.pdf)
TI thermal resistance numbers in datasheet are quite low. Rja =23.6 °C/W for TO-220 case is very, very optimistic. Who knows all the tricks they have used to achive this measurements....
ST Micro gives Rja = 50 °C/W for a comparable L7805, and god only knows what one will get with generic 7805 from shenzhen market. :)
https://www.st.com/resource/en/datasheet/l78.pdf (https://www.st.com/resource/en/datasheet/l78.pdf)
-
BTW, if it's a one-off and/or you don't mind spending a bit more, Micrel's (now Microchip) MIC29xxx series of LDOs have reverse supply protection up to 20V. You simply apply negative voltage to the input pin and nothing happens. The smallest part is 1.5A MIC29150-5.0.
edit
I'm not entirely sure what happens if negative voltage is applied while output capacitors are still charged, it could be that the 20V limit applies to input-output difference.
-
The Pfet works as you think but its wasted here. As you've got plenty of volts to spare, a simple diode is cheaper and more robust- put the fuse right at the input. It will probably run hotter than the fet but you've got to burn off (vin-Vout)*Iload in the circuit anyhow. With the fet version the regulator will just get that bit warmer instead!
I have used small pfets in battery powered units designed for use by idiots (medics).
-
The product will not be serial produced. It's for a dev board for a college course. Some will be produced if the prototype will be good enough.
It will be something like this:
https://www.rhydolabz.com/development-boards-development-boards-c-206_99/pic18f4580-can-development-board-rhydolabz-p-298.html (https://www.rhydolabz.com/development-boards-development-boards-c-206_99/pic18f4580-can-development-board-rhydolabz-p-298.html)
I've attached a new shematic. Better now? Right now I have 7805 at home, I will later think of other 78x05 solutions.
Will it work even using 9V power supply, right?
the power supply will be something like this:
https://www.amazon.com/LEDMO-Power-Supply-Transformers-Adapter/dp/B01461MOGQ/ref=sr_1_3?dchild=1&keywords=12v+power+supply&qid=1612361847&sr=8-3 (https://www.amazon.com/LEDMO-Power-Supply-Transformers-Adapter/dp/B01461MOGQ/ref=sr_1_3?dchild=1&keywords=12v+power+supply&qid=1612361847&sr=8-3)
or maybe:
https://www.amazon.com/outstanding-Battery-Holder-Storage-Switch/dp/B081395LK3/ref=sr_1_3?dchild=1&keywords=6+battery+holder&qid=1612361958&sr=8-3 (https://www.amazon.com/outstanding-Battery-Holder-Storage-Switch/dp/B081395LK3/ref=sr_1_3?dchild=1&keywords=6+battery+holder&qid=1612361958&sr=8-3)
or
https://www.amazon.com/LAMPVPATH-Pack-Battery-Holder-Switch/dp/B07T83B4SW/ref=sr_1_1_sspa?dchild=1&keywords=9v+battery+holder&qid=1612362003&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEzM1Q2WlI5SzBJSEdKJmVuY3J5cHRlZElkPUEwODQ1NTMyMUdDWFZFMFpQSzlLSyZlbmNyeXB0ZWRBZElkPUEwMzE3NjIxMUY4UlpKNkVVM0RPMSZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU= (https://www.amazon.com/LAMPVPATH-Pack-Battery-Holder-Switch/dp/B07T83B4SW/ref=sr_1_1_sspa?dchild=1&keywords=9v+battery+holder&qid=1612362003&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEzM1Q2WlI5SzBJSEdKJmVuY3J5cHRlZElkPUEwODQ1NTMyMUdDWFZFMFpQSzlLSyZlbmNyeXB0ZWRBZElkPUEwMzE3NjIxMUY4UlpKNkVVM0RPMSZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=)
-
Is LM78M05 able to dissipate less heat than LM7805? I haven't found this info in the datasheet.
[/quote]
It has a lower thermal throttling limit so in effect it does have a lower heat tolerance even thought they're in the same package. Still I think the lm78m05 is the best choice given the max current draw of the device of 350ma, in my thermal testing on a breadboard of a lm317@12v input-5v output 200ma was around the max current before it would thermal throttle. I'd guess in normal operation the device will draw well under 50ma so a heatsink wont be needed but it really depends how much current it actually draws in normal operation.
A resistor on input would work at limiting current but it could lose some flexibility on what supply voltage you use, I don't like the fuse idea because it would need to be replaced if it burned out from over current.
-
The product will not be serial produced. It's for a dev board for a college course. Some will be produced if the prototype will be good enough.
I've attached a new shematic. Better now? Right now I have 7805 at home, I will later think of other 78x05 solutions.
Will it work even using 9V power supply, right?
Yes, if you don't need the additional protections and embellishments that have been discussed, what you have is a perfectly solid setup. It should work down to 8 volts input or even a little lower if it is a battery. Many, many commercial products are out there with regulator circuits no more complicated than this. There's no current limiting, but if you have a 'real' LM7805, it will start to get hot over about 300mA with a 12V input and eventually will shut down.
-
It has a lower thermal throttling limit so in effect it does have a lower heat tolerance even thought they're in the same package. Still I think the lm78m05 is the best choice given the max current draw of the device of 350ma, in my thermal testing on a breadboard of a lm317@12v input-5v output 200ma was around the max current before it would thermal throttle. I'd guess in normal operation the device will draw well under 50ma so a heatsink wont be needed but it really depends how much current it actually draws in normal operation.
A resistor on input would work at limiting current but it could lose some flexibility on what supply voltage you use, I don't like the fuse idea because it would need to be replaced if it burned out from over current.
It's even to say that a fuse burnt isn't a common issue if things are done properly... so an alternative could be to use a polyfuse? the problem is it's not fast, right?
-
It's even to say that a fuse burnt isn't a common issue if things are done properly... so an alternative could be to use a polyfuse? the problem is it's not fast, right?
You would need to think about what scenarios you want to protect against before deciding on how to do it. The zeners-and-fuse approach I detailed above was a sort of belt-and-suspenders that I think would be robust enough for a situation where the power supply was being connected and setup repeatedly by different people and you wanted to protect at least your microcontroller against any misuse--up to and including accidentally using mains power as an input.
Fuses are disfavored in production use because in todays throw-away no-service world, dead is dead and salvaging or repairing the unit is a non-issue. Fuses are often only considered to prevent fires and the ensuing liability. In a lab or development environment, a simple fast-blow fuse will save the day as or more effectively than more elegant solutions. I would even solder the fuse in because taking the time to find your soldering tools and desolder the fuse will allow you to reflect on what went wrong!
-
It has a lower thermal throttling limit so in effect it does have a lower heat tolerance even thought they're in the same package. Still I think the lm78m05 is the best choice given the max current draw of the device of 350ma, in my thermal testing on a breadboard of a lm317@12v input-5v output 200ma was around the max current before it would thermal throttle. I'd guess in normal operation the device will draw well under 50ma so a heatsink wont be needed but it really depends how much current it actually draws in normal operation.
A resistor on input would work at limiting current but it could lose some flexibility on what supply voltage you use, I don't like the fuse idea because it would need to be replaced if it burned out from over current.
Most three terminal regulators are fairly rugged so a fuse might not do much to protect the regulator. However a fuse might protect something else so the need to implement such really depends upon your application. It is likely advisable to protect the power source, for example if the supply comes from a simple step down transformer a fuse might be advisable.
It's even to say that a fuse burnt isn't a common issue if things are done properly... so an alternative could be to use a polyfuse? the problem is it's not fast, right?
I'm not sure what the negativity with respect to fuses are. In normal operation they should not blow. When they do one should figure out why.
-
I'm not sure what the negativity with respect to fuses are. In normal operation they should not blow. When they do one should figure out why.
If they are not fast enough to open the circuit there should be damages to the other parts. At least that's what I thought. Am I wrong?
btw can anyone point out a thorough hole fuse that should be a good idea to put in this kind of circuit?
-
Could you not just use a bridge rectifier on the input of your circuit to sort out reverse polarity protection issue?
-
I'm not sure what the negativity with respect to fuses are. In normal operation they should not blow. When they do one should figure out why.
If they are not fast enough to open the circuit there should be damages to the other parts. At least that's what I thought. Am I wrong?
btw can anyone point out a thorough hole fuse that should be a good idea to put in this kind of circuit?
Yes, that's true, but the regulator's overcurrent protection should prevent that to some extent. The fuse is only there to prevent the battery catching fire, if there's a short circuit, i.e. the regualtor catastrophically fails.
Looking at the data sheets for the LM78M05 and LM7805, for the TO220 packages, the LM78M05 has a lower junction to case thermal resistance of 1.3°C/W vs 1.7°C/W of the LM7805, but a lower maximum junction temperature of 125°C, vs 150°C for the LM7805.
https://www.ti.com/lit/ds/symlink/lm340.pdf (https://www.ti.com/lit/ds/symlink/lm340.pdf)
https://www.ti.com/lit/ds/snvs090g/snvs090g.pdf (https://www.ti.com/lit/ds/snvs090g/snvs090g.pdf)
TI thermal resistance numbers in datasheet are quite low. Rja =23.6 °C/W for TO-220 case is very, very optimistic. Who knows all the tricks they have used to achive this measurements....
ST Micro gives Rja = 50 °C/W for a comparable L7805, and god only knows what one will get with generic 7805 from shenzhen market. :)
https://www.st.com/resource/en/datasheet/l78.pdf (https://www.st.com/resource/en/datasheet/l78.pdf)
I agree. Thanks for pointing that out. The thermal to ambient specificication on TO-220 transistors is often aounr 60°C/W.
The product will not be serial produced. It's for a dev board for a college course. Some will be produced if the prototype will be good enough.
It will be something like this:
https://www.rhydolabz.com/development-boards-development-boards-c-206_99/pic18f4580-can-development-board-rhydolabz-p-298.html (https://www.rhydolabz.com/development-boards-development-boards-c-206_99/pic18f4580-can-development-board-rhydolabz-p-298.html)
I've attached a new shematic. Better now? Right now I have 7805 at home, I will later think of other 78x05 solutions.
Will it work even using 9V power supply, right?
the power supply will be something like this:
https://www.amazon.com/LEDMO-Power-Supply-Transformers-Adapter/dp/B01461MOGQ/ref=sr_1_3?dchild=1&keywords=12v+power+supply&qid=1612361847&sr=8-3 (https://www.amazon.com/LEDMO-Power-Supply-Transformers-Adapter/dp/B01461MOGQ/ref=sr_1_3?dchild=1&keywords=12v+power+supply&qid=1612361847&sr=8-3)
or maybe:
https://www.amazon.com/outstanding-Battery-Holder-Storage-Switch/dp/B081395LK3/ref=sr_1_3?dchild=1&keywords=6+battery+holder&qid=1612361958&sr=8-3 (https://www.amazon.com/outstanding-Battery-Holder-Storage-Switch/dp/B081395LK3/ref=sr_1_3?dchild=1&keywords=6+battery+holder&qid=1612361958&sr=8-3)
or
https://www.amazon.com/LAMPVPATH-Pack-Battery-Holder-Switch/dp/B07T83B4SW/ref=sr_1_1_sspa?dchild=1&keywords=9v+battery+holder&qid=1612362003&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEzM1Q2WlI5SzBJSEdKJmVuY3J5cHRlZElkPUEwODQ1NTMyMUdDWFZFMFpQSzlLSyZlbmNyeXB0ZWRBZElkPUEwMzE3NjIxMUY4UlpKNkVVM0RPMSZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU= (https://www.amazon.com/LAMPVPATH-Pack-Battery-Holder-Switch/dp/B07T83B4SW/ref=sr_1_1_sspa?dchild=1&keywords=9v+battery+holder&qid=1612362003&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEzM1Q2WlI5SzBJSEdKJmVuY3J5cHRlZElkPUEwODQ1NTMyMUdDWFZFMFpQSzlLSyZlbmNyeXB0ZWRBZElkPUEwMzE3NjIxMUY4UlpKNkVVM0RPMSZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=)
The 12V power supply is fine, but if you're going for six AA cells, you might want to consider a low drop-out regulator and Schottky diode, or use eight AA cells. The LM7805 will stop regulating, when the voltage falls below 7V, plus 0.6V for the diode, giving a minimum voltage of 7.6/6 = 1.27V per cell, at which point alkaline cells still have a fair amount of energy left and it won't work very well with rechargable batteries, which are 1.2V. With a low drop-out regualtor and a Schottky diode, it will work down to 6V, giving a longer battery life and compatbility with rechargable batteries.
A common, cheap, Schottky diode is the 1N5820, will do. For the low drop-out regulator, the are plenty of options, but beware of fakes from the likes of ebay.
LD1117V50 (https://www.mouser.co.uk/datasheet/2/389/ld1117-1849389.pdf)
LM2940CT-5.0 (https://www.ti.com/lit/ds/symlink/lm2940c.pdf)
LF50AB (https://www.mouser.co.uk/datasheet/2/389/lfxx-1849555.pdf)
TLE 4274 V50 (https://www.mouser.co.uk/datasheet/2/196/Infineon-TLE4274-DS-v01_70-EN-1131140.pdf)
-
If they are not fast enough to open the circuit there should be damages to the other parts. At least that's what I thought. Am I wrong?
btw can anyone point out a thorough hole fuse that should be a good idea to put in this kind of circuit?
It depends on how the circuit is designed, but what I described above would protect at least the MCU (and likely everything) from almost any lab-accident misconnection. Lightning strikes might be pushing it. Fuses from reasonable manufacturers all have detailed specifications on fusing energy, time-to-blow at specific overloads, etc.
https://www.mouser.com/datasheet/2/240/Littelfuse_Fuse_370_Datasheet_pdf-357362.pdf (https://www.mouser.com/datasheet/2/240/Littelfuse_Fuse_370_Datasheet_pdf-357362.pdf)
The 12V power supply is fine, but if you're going for six AA cells, you might want to consider a low drop-out regulator and Schottky diode, or use eight AA cells. The LM7805 will stop regulating, when the voltage falls below 7V, plus 0.6V for the diode, giving a minimum voltage of 7.6/6 = 1.27V per cell, at which point alkaline cells still have a fair amount of energy left and it won't work very well with rechargeable batteries, which are 1.2V. With a low drop-out regulator and a Schottky diode, it will work down to 6V, giving a longer battery life and compatibility with rechargeable batteries.
I completely agree with using something like the LM2940 if he is using a battery pack, but it is worth pointing out that the behavior of an LM7805 as the input voltage drops isn't that it completely stops working, but rather it becomes less and less effective at filtering, which becomes less important with a battery since there's no input ripple. It also will have the effective output impedance go up, so load regulation goes away too. But the output voltage doesn't start dropping until quite a bit lower than 7 volts if the current is as low as this project is likely to be, less than 200mA. The exact performance will vary a bit from example to example and brand to brand.