Making prototype PSU for Microcontroller board[SOLVED]

Thread Starter

Pushkar1

Joined Apr 5, 2021
205
Main purpose of this thread to improve my skills to get real experience with electronics components. I'm just practicing

I need advice from experts I'm making power supply circuit that should take 12V AC/DC and gives output 5V, 2A current for PIC Microcontroller board.

Here I've few components I took out from old equipment's to my circuits
1626084546618.png

I've drawn connection block diagram to show my understanding. Please suggest me some good advice
1626085049237.png
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
205
hi P1,
Why have you chosen 12Vdc as a power source.?
E
@ericgibbs

There are various SMPS available in the market. eg 24V, 12V, 5V.DC I want to make universal power supply that should take input between 12V- 5V DC. If I make a 12V supply, I can also take 5 volts with same circuit.

So I think this is good idea I can take input from 12 volt adapter also I can take input from 5 volt adapter also. I can take input from 9V DC battery.

And there is a another reason, 12 volts will be required to operate the relay and the motor
 
Last edited:

Papabravo

Joined Feb 24, 2006
16,772
You show in your block diagram a 7805 linear voltage regulator. Are you aware that when your 5V load starts to draw current that the regulator will be a major heat generator?
It works like this:
  1. If you want to provide +5V @ 50 mA to a load, the regulator will dissipate (12V-5V)*50mA = 350 mW. That seems manageable.
  2. If you want to provide +5V @ 500 mA to a load, the regulator will dissipate (12V-5V)*500mA = 3.5W. Now you begin to have a problem depending on the package you have selected for the regulator and how much of a heatsink you have.
  3. You can see that if you want to provide +5V @ 1 Amp, the regulator will have to dissipate 7 Watts. Without a heatsink a TO-220 package has a thermal resistance of 70 °C/watt. so 7 Watts times 70 °C/watt = 490 °C rise in temperature which is more than hot enough to melt solder and will probably let ALL of the magic smoke out.
It might be OK for a first project, but the shortcomings will become manifest as your projects grow in size and complexity.
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
205
You show in your block diagram a 7805 linear voltage regulator. Are you aware that when your 5V load starts to draw current that the regulator will be a major heat generator?
ow in size and complexity.
Good point @Papabravo I had forgotten about the heatsink. I've heatsink available. I will use it in my project.
 

Irving

Joined Jan 30, 2016
2,056
Actually the TS originally said 5v 2A. That's not possible with a linear 7805 which is limited to 1A.

At 500mA, 12v DC input and no heatsink, based on the data in the TI LM7805 datasheet, you'll be running at a junction temperature of 114degC (125degC max), and a case temperature of 108degC. This isn't safe on several levels.

Additionally, to dissipate 7W (for 1A) in a 7805 you need a heatsink that's better than 9K/W thermal resistance. Further, 12v AC will give closer to 15-16v at the input of the 7805, requiring it to dissipate closer to 11W, needing a <5K/W heatsink. With those heatsink values the TO220 tab temperature will be around 100degC. Ideally you need a much better heatsink, around 2K/W or less, bringing the tab temperature down to around 55degC. A 2K/W heatsink isn't a little push on type, its a substantial finned block around about 80 - 100mm square with 20 - 30mm fins.

7805 isn't the best tool for this job.
 

Papabravo

Joined Feb 24, 2006
16,772
Yes, it is far from the best solution if pushed to and beyond it's limits. However, as a first project, used within known limits it just might be an OK thing to do.
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
205
Actually the TS originally said 5v 2A. That's not possible with a linear 7805 which is limited to 1A.
@Irving Thanks I do not want to buy new components, I want to work with all that I have available. I will keep these things in mind when I make the layout for the PCB. But for now I'm just trying to practice on zero PCB boards

If the output is 5v 1A then I think there might not be a problem.

Hence the output of the power supply has been modified keeping the situation in mind.

Output should be 5v 1A
 
Last edited:

Thread Starter

Pushkar1

Joined Apr 5, 2021
205
Are the ratings of other components correct as per the new specification 5v 1A? I would like to talk a bit on the power circuit if it is correct.

I have two connectors and two switches. I want to use both connectors I think it would be good option and i want to use one switch. which switch should i use?
 

Irving

Joined Jan 30, 2016
2,056
Neither of those switches are ideal for 1A DC, but if that's all you have then use the toggle switch.

If you have more than 1 7805 you can always have 2 outputs from 1 input...

Your 4007 diodes are only 1A max rated so you are pushing your luck. Realistically you should keep to 500mA. What's the typical ambient temperature where you are?
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
205
If you have more than 1 7805 you can always have 2 outputs from 1 input...
@Irving I don't understand what do you mean. i have two 7805 But only one 7805 is needed in my circuit. I don't see any reason why I would need two 7805's
Your 4007 diodes are only 1A max rated so you are pushing your luck. Realistically you should keep to 500mA. What's the typical ambient temperature where you are?
I think we can set the current limits by resistors it will not allow more than 500mA. probably have to use potentiometer.

typically range from–2 °C to 40 °C, but can reach 47 °C (117 °F) in summer and −4 °C in winter.
 

Irving

Joined Jan 30, 2016
2,056
@Irving I don't understand what do you mean. i have two 7805 But only one 7805 is needed in my circuit. I don't see any reason why I would need two 7805's
If you really needed 1A, you could split across two devices and only output 500mA from each.

I think we can set the current limits by resistors it will not allow more than 500mA. probably have to use potentiometer.
In this circuit there is no option to set a current limit. You cannot control the current delivered with resistors alone, you need other active elements. The 7805 should protect itself from overheating by shutting down if it gets too hot, but I've known them to fail and let 12v+ through onto the 5v output...

typically range from–2 °C to 40 °C, but can reach 47 °C (117 °F) in summer and −4 °C in winter.
So probably need to factor in 40 °C rather than 25 or 30 °C into heat-sink calculations.
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
205
If you really needed 1A, you could split across two devices and only output 500mA from each.
@Irving sorry for asking too much question

I need some clarification. Could there be a problem with power supply capable of more current than needed

For example, the microcontroller needs 20-40mA , but if supply is rated with 1A current so what could be the problem?

I don't think there could be a problem. Microcontroller will only draw as much current as it actually needs. What's the problem?

In this circuit there is no option to set a current limit.
This thought just came to my mind after reading your post. I think it's good idea to use a power supply which has a variable current limit so we can set it to not supply more than limit.

Can potentiometer be used to limit the current?
 

Irving

Joined Jan 30, 2016
2,056
I don't think there could be a problem. Microcontroller will only draw as much current as it actually needs. What's the problem?
Exactly so, only what is needed will be drawn. There is no problem if its within the capabilities of the supply.

I think it's good idea to use a power supply which has a variable current limit so we can set it to not supply more than limit.

Can potentiometer be used to limit the current?
The 7805 has an internal limiter to protect itself but you have no control over it.

You cannot limit current dynamically with just passive components. Its not like limiting current for an LED where you have a fixed voltage drop and a fixed current and therefore can calculate a fixed resistor. The microcontroller's current draw is variable and dynamic and is due to switching transients as gates turn on and off. Although the average might be 20 - 40mA, individual transients can be several 10s, even 100s, of mA.
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
205
Exactly so, only what is needed will be drawn. There is no problem if its within the capabilities of the supply.
So you are agree if supply gives output 5v 1A. It will not harm to microcontroller.

Do you have any other suggestion for diagram that's shown in post #1.
 

Irving

Joined Jan 30, 2016
2,056
So you are agree if supply gives output 5v 1A. It will not harm to microcontroller.
No it won't harm it, just be careful not to try and draw too much current from it as your 7805 might overheat and shutdown.

Do you have any other suggestion for diagram that's shown in post #1.
Learn to use a proper circuit drawing & PCB layout tool, I recommend KiCAD (its free).

1626115957397.png

Editted to fix upside-down LED!
 
Last edited:

Thread Starter

Pushkar1

Joined Apr 5, 2021
205
No it won't harm it, just be careful not to try and draw too much current from it as your 7805 might overheat and shutdown.
@Irving
can i try to connect the components on the board as you shown in your circuit diagram? Is it safe?
I will connect heatsink as you advised
 

bertus

Joined Apr 5, 2008
21,524
Hello,

Only the led is the wrong way around.
Also the resistor for the led needs to be calculated.
It is a demonstration of the kicad program.

Bertus
 
Top