Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Implementing a small lm7805 board on PIC development board

Status
Not open for further replies.

eagle1109

Full Member level 6
Joined
Nov 20, 2014
Messages
390
Helped
4
Reputation
10
Reaction score
7
Trophy points
1,298
Location
Saudi Arabia
Activity points
5,911
Hello,

I have a barebone PIC16F877A development board in our college laboratory, which were missing power 100nF ceramic caps + the main 10uF power cap.

Now still one problem which is to provide a constant 5V input because the power supply is a lab bench power supplies, and students may by mistake crank the power a bit which of course would fry the PIC chip or the PICkit 3 which is a bigger problem than the PIC chip because we don't have many left in the warehouse.

This is a picture with the board and putting aside the lm7805 and the required caps.



lm7805.jpg



My question now is: are these 2 caps enough for the lm7805 ? or I have to add other stuff ?
 

They should be enough but making the capacitor at the input side of the LM7805 a parallel connection of 100nF (104) and 10uF would be better, especially if the power cables from the PSU are long.

Note that it will no longer work from a 5V supply because you need some extra 'overhead' to allow the LM7805 to work. You will need at least 7V and preferably 8V at it's input to get a stable 5V out.

Your other alternative would be to wire a 1W or more rated 5.6V Zener diode across the supply and add a fuse in series with the power cable. The fuse will blow before the voltage is high enough to kill the PIC.

Brian.
 
Recommended bypassing from datasheet -

1618698515204.png


Dropout V is >= 2.5V of headroom is needed. Typical graph looks like -

1618698711405.png


Low dropout equivalents (bypassing is different, in datasheet) -

LM2937 from National will give 500ma at 5V.
The LM2940-50IKCSE3 from Ti will give 1A at 5V (pinout compatible)


Regards, Dana.
 
What are the most common capacitor values to buy for a warehouse ?
I think basically 100nF is one of the most common ones I found until now.
 

when i need a capacitor, i generally buy more than i need for that project
and put the rest into "general stock"
this works well for the inexpensive caps

other than that, i collected a few "standard" values to start with
mostly X7R ceramics, 25V or 50V
1uF, 0.1uF, 0.22uF ...
capacitances because ???
voltages because i'm generally working at 24V or less
 
They should be enough but making the capacitor at the input side of the LM7805 a parallel connection of 100nF (104) and 10uF would be better, especially if the power cables from the PSU are long.
So you mean I should put 2 caps at the input of the LM7805 ? 1 ceramic 100nF cap and 1 electrolytic 10uF ?

Then what to put at the output ?

Note that it will no longer work from a 5V supply because you need some extra 'overhead' to allow the LM7805 to work. You will need at least 7V and preferably 8V at it's input to get a stable 5V out.

Yes I know the LM7805 need a higher input voltage than the output value. Yeah that should be ok with the variable bench PSU.

Your other alternative would be to wire a 1W or more rated 5.6V Zener diode across the supply and add a fuse in series with the power cable. The fuse will blow before the voltage is high enough to kill the PIC.

OK, here's a quick draft of the power circuit of the dev board of 3 options:

First: this is the basic situation, just a reverse protection diode and one power capacitor.

basic.png


Second: with LM7805 solution.

lm7805.png


Third: 5.6V Zener diode solution.

zener.png

--- Updated ---

when i need a capacitor, i generally buy more than i need for that project
and put the rest into "general stock"
this works well for the inexpensive caps

other than that, i collected a few "standard" values to start with
mostly X7R ceramics, 25V or 50V
1uF, 0.1uF, 0.22uF ...
capacitances because ???
voltages because i'm generally working at 24V or less

OK, but in similar applications of embedded boards, what are usual values used and based on what ?

for example;

1. why I choose 100nf caps instead on like 10pf to be near the microcontroller ?
2. caps at power input, how many to put and which values and why ?
3. other applications; like, input push buttons, or reset pin button ? if I want to put caps there for of course more stability, but the same question, which values and why ?
 

In all three schematics the 1N4148 is far too small, use a diode rated at least 1A.

In the middle schematic, the capacitors should be at the input of the regulator (after the diode). They are there to ensure there is a low impedance at the regulator input pin. Internally it has a reference generator and an error amplifier that take their supply from the input pin so it is important it is noise free and as stable as possible. In fact without the capacitors the regulator may actually oscillate!

In the third schematic, the idea is that if fed correctly with 5V the Zener diode doesn't conduct but if the voltage increases above about 5.6V it starts to sink current and blows a fuse at the input pin. The fuse is sacrificed to protect the board. The Zener should be directly across the supply with no series resistor so it can sink as much current as possible. As a bonus, a Zener diode conducts at ~0.6V in the forward direction so you can also omit the series diode, if the supply is connected backwards it will also blow the fuse. The Zener is not for regulation, it is there solely as a protection device so you must add a fuse (~500mA) in line with the supply.

The idea behind using two capacitors in parallel is to present lower impedance across a wider range of frequencies. Electrolytic capacitors tend to be less efficient as the frequency increases and ceramic capacitors are good at high frequency but expensive and big if a large value is needed. By using both you get the benefit of both a large value and good HF decoupling. 100nF is a good general purpose value, a good compromise between size, cost and value.

Brian.
 
20210422_141643.jpg


I've found different diodes and zener diodes.

For zener diodes I found couple types 4133 5.1V and 4128 3.3V.


OK, I think it should be this one:

zener2.png
 

The Zener voltage should be slightly higher than the supply voltage, in you schematic the fuse will blow immediately. The diode needs to handle enough current that the fuse will blow quickly. 500mA is a suitable fuse size but to work, the diode has to carry the 500mA with 5.1V across it so it will dissipate (5.1 * 0.5) = 2.6W, the ones shown are probably 0.5W rated or less. I would use a 5W rated one if possible.

The property of a Zener diode is that in the 'normal' conduction direction (anode more positive than the cathode) it behaves like a normal silicon diode, in reverse direction, it does not conduct at all until the Zener voltage is reached. At that voltage, it starts to conduct and it attempts to hold the voltage constant regardless of the current it has to pass. Of course there is a limit to how much current they can handle, hence suggesting a 5W device on your board.

To protect 5V circuits, you could use a 5.1V diode is you take into consideration the manufacturers tolerance, it could be a little below 5.1V or a little above it, and the tolerance of the voltage source at your input. I think 5.1V is probably not giving enough safety margin and you might find the diode is borderline on conducting in normal operation. If you use a 5.6V device, it will allow the supply to reach approximately 5.6V (again allowing for tolerances) before it conducts and blows the fuse, most 5V devices, including the PIC will withstand that voltage without damage.

Brian.
 
Yes, the PIC can handle up to 6V, even the PICkit3.

OK, let's start with the first problem is that I don't have 5W zener diode in the warehouse, but there's a lot of lm7805 and the required caps.

I guess I have to go the lm7805 route, 5W zener diode won't be impossible, I just have to order it.

For the lm7805, I have to design a small board to mount the lm7805 with the 100nF cap, as there already an electrolytic cap on the input side. And I hope I don't have to use a board and mount it by soldering the parts directly.

I thought of this circuit, what you think ? also do you recommend a capacitor at the output of the lm7805 ?

lm7805_ckt.png
 

Yes, that should work.
The should already be supply decoupling capacitors at each IC that are effectively in parallel with the output side of the LM7805 but manufacturers advise that you wire one as close to the LM7805 GND and OUT pins as possible so it would be wise to add an extra 100nF as near to it as you can manage.

Incidentally, there are better regulators than the LM7805 if you can source them. Look for 'LDO' (Low Drop Out) devices, they don't need quite as much extra voltage at their input pin to give 5V out.

Brian.
 
Hi,

I did a small piece of prototyping board the LM7805 and two 100nF caps on the input and output.

Soldered it on one of the boards and it worked, I just have to raise the voltage to 7V or more and get a regulated steady 5V which is nice and I'm really happy with this result.

This is my first board:

20210426_111059.jpg


One issue here is that it's movable but I didn't put gun glue; forgot for this one today.



Second try with another board, that had wiring issues that really consume my time fixing them; it ended up de-soldering the components and throwing the board.
11.jpg


I drilled a hole here to mount the 3 sides of the LM7805 small board; the drill bit broke and I scratched the board but thought I may put some gun glue and mount the board to remove any contact with ground because the board is grounded on empty areas.

20210428_134111.jpg


it worked, but it wasn't stable, when I remove the new board, the power of the board connects/disconnects ! I tried to fix it, it took time and I decided to just desolder the components and trash the board.

20210428_145238.jpg


20210428_152058.jpg



Another issue which is my mistake is that I purchased a bad quality wires for power that wears out really quickly, several uses of the board and the wires go off.

21.jpg


I have to strip and tin the wires again and put them in the power terminal.

22.jpg



It's 22AWG, the color of the wires is silver, it's called tinned copper, I don't know what that means exactly but I know now it's a bad quality.

This is the link I purchased:

2pin Red Black cable, Tinned copper 22AWG, PVC insulated wire, Electronic cable, LED cable


And I purchased this one this week:

2Pin Red Black Cable 20/19/18/16/14 AWG Oxygen-free Copper Electric Wire Flexible Power Cord for Speaker,Audio,Led Lights
 

All looks good but be careful not to overheat the regulator by either feeding it too much voltage or drawing too much current from your board. It will dissipate (voltage drop * current) in Watts and without a heat sink the temperature will rise around 50C per Watt. The voltage drop is how much is between the input and output pin of the LM7805 so its (input voltage - 5) and the current is in Amps.

The important thing with the connecting wire is it should be multi-strand. The AWG number only defines the cross section of the copper but not how many strands are used to achieve that cross section. Single strand copper is prone to hardening as it flexes and will eventually snap, multi-strand still hardens but being made of many finer wires it is more flexible and if a strand breaks in a bundle, its neighbors bridge the gap.

Tinned copper is just copper that has a tin (solder) coating. Copper is prone to oxidizing, even inside a PVC coating and it is difficult to solder to without using corrosive flux. By coating it with tin which is less chemically reactive, the copper is protected and solder will bond to it easily.

Brian.
 
All looks good but be careful not to overheat the regulator by either feeding it too much voltage or drawing too much current from your board. It will dissipate (voltage drop * current) in Watts and without a heat sink the temperature will rise around 50C per Watt. The voltage drop is how much is between the input and output pin of the LM7805 so its (input voltage - 5) and the current is in Amps.
Normally, trainees should put around 7-8 volts, and even if anything go wrong; like, a short or overvoltage, and these situations are less likely to happen, then the LM7805 would burn.

If I used everything in the board, it shouldn't draw more than 600-800mA. But haven't test board full load.

The important thing with the connecting wire is it should be multi-strand. The AWG number only defines the cross section of the copper but not how many strands are used to achieve that cross section. Single strand copper is prone to hardening as it flexes and will eventually snap, multi-strand still hardens but being made of many finer wires it is more flexible and if a strand breaks in a bundle, its neighbors bridge the gap.
Tinned copper is just copper that has a tin (solder) coating. Copper is prone to oxidizing, even inside a PVC coating and it is difficult to solder to without using corrosive flux. By coating it with tin which is less chemically reactive, the copper is protected and solder will bond to it easily.

Brian.

Yes, all the wires I use are multi-strand.

20210429_141401.jpg


But this is the usual problem, I have to strip it again, tin it and put it back.

20210429_145311.jpg


My solution to this problem is to glue everything. Here I put a yellow glue, which is a strong version of the famous UHU.

20210429_164614.jpg


Gluing everything for more piece of mind, also those banana connectors get wear out most often like the terminal screw and I thought of filling them with the yellow glue and that should really minimize the wearing problems a lot.

20210429_164122.jpg




This terminal screw pin was loosen a bit, which was connecting/disconnecting the power, figured it out later; I think that because of when screwing wires in terminal, with tightening the screws, it wore out of the soldered pin.

20210429_145705.jpg



This is how I soldered the LM7805 with couple 100nF caps.

20210429_154455.jpg



Soldering wires and put some gun glue for protection.

20210429_160111.jpg


Put it in place with more gun glue.

20210429_161011.jpg



Thanks a lot for support, this really should improve the board practical usability and minimize wearing problems.
 

Attachments

  • 20210429_164122.jpg
    20210429_164122.jpg
    252.4 KB · Views: 141

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top