Problem with 7805 voltage regulator

Discussion in 'The Projects Forum' started by russpatterson, Apr 19, 2011.

  1. russpatterson

    Thread Starter Member

    Feb 1, 2010
    351
    16
    Hello,

    I'm having an issue with the power from a 7805 5V linear regulator. The issue is that the voltage varies when I switch off a high current, high side, MOSFET. It appears that this causes a voltage fluctuation on my 12V battery and this then upsets the 5V regulated supply for the logic side of my circuit an my PIC resets.

    I looked at the datasheet for the 7805 and they reccomend a 0.33uF filter cap on the input and a 0.1uF on the output. I have a 100uF and 10uF respectively (only because I found that on a micro tutorial years ago). So I guess my question may really be based on how these filter caps operate. Wouldn't a larger cap, like I have, simply store more power and respond just as quickly as a smaller cap? Suggestions on how to isolate the 5V side of my circuit?

    [​IMG]

    The top plot is Channel 2, the 5V "regulated" power, at 1V/division. You can see that it's dipping below 4V. As the current switched by the MOSFET increases this gets more dramatic until the PIC resets. The bottom plot is the MOSFET gate at 10V/division.

    The schematic for how the LM7805AC is connected is here:
    http://2.bp.blogspot.com/-fcShHZt2i...TRF5g/s1600/2-12-11+Solar+Board+Schematic.png

    The schematic for the MOSFET switching is here:
    http://2.bp.blogspot.com/-IfCgle3nE...0/HIGH_SIDE_PANEL_DRIVER+entire+schematic.png
     
  2. Jony130

    AAC Fanatic!

    Feb 17, 2009
    3,957
    1,097
    Maybe the input voltage of a LM7805 also dipping.
    Try use larger capacitors especially C2 in high side driver, and add decoupling capacitors (100nF).
     
  3. russpatterson

    Thread Starter Member

    Feb 1, 2010
    351
    16
    Thanks for the reply. C2 moves a lot of current and gets warm/hot to the touch. Where, exactly do you reccomend I add a decoupling cap?

    I looked at the battery voltage on the scope and there's a slight voltage change when the MOSFET conducts but I don't see it going below 10V, which the 7805 should be able to make 5V from but it doesn't seem to respond fast enough.
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You could also place a diode between the 7805 input caps and the battery so that the action of turning off the MOSFET won't be able to drain the 7805 input caps. Use a fast diode, like a 1N5819, UF400x or similar.
     
  5. tom66

    Senior Member

    May 9, 2009
    2,613
    214
    The cap should not be warm. Do you have it wired up correctly?
     
  6. Peytonator

    Active Member

    Jun 30, 2008
    105
    3
    If I am not mistaken, this is the reason why you see the volt drop:

    As the MOSFET turns on, it draws a current ΔI in Δt. Now because the leads of your power supply have a small amount of inductance, a voltage drop

    Δv = L Δi/Δt

    appears across them, subtracting from the supply voltage. This volt drop in your case is 1V, and appears due to the massive rate of change of current (di/dt) as the MOSFET turns on.

    At high switching frequencies, smoothing caps with small capacitance added in parallel nullify the total impedance of your leads (inductors), thus reducing this annoying volt drop.

    Calculating the size the bypass caps neccessary to correct this is pretty hectic and involves first finding L. I would suggest first using smaller caps around the 7805 (those suggested on the datasheet). Large caps have a large time constant and therefore respond SLOWER than small caps. The first problem is that your caps are too big.
     
  7. russpatterson

    Thread Starter Member

    Feb 1, 2010
    351
    16
    Thanks everyone for the help. I had a .22uF and a .1uF cap laying around, tried those. Not really much better. I tried a 80SQ45N diode, recovery time seems similar to the suggestion, http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=80SQ045NGOS-ND. I got a much more erractic and larger spike on the 5V power with that. Perhaps the 7805 is reacting to the change in current available and that causes it to freak out.

    By "smoothing caps with small capacitance added in parallel" do you mean filter caps, like between ground and power rails? Many in varying capacitance?

    I don't understand where you would use a decoupling cap in the circuit and how that would help. I that that was to preserve AC signal, which is what I want to eliminate.

    I'm thinking that I need to solve the voltage spike on the gate (can get 10V higher than source voltage) and that will help the issues with the rest of the circuit.
     
  8. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,287
    1,252
    You don't say what you are driving with the FET.
    The one thing I see is the 100 Ufd. cap (C1) is on the drain side of the FET. My bet is it belongs on the source side. Where it is now would cause a very high current on turn on.
     
  9. russpatterson

    Thread Starter Member

    Feb 1, 2010
    351
    16
    That's a good point. The intended load is charging a lead acid 12V battery, with a solar panel. However to get some current to test with I've been hooking a 500gph pump to the battery. So I have been ignoring that basically I have a large inductive load since the battery is already at the 12.4V target voltage.

    I need to build that constant current load circuit that was being discussed earlier this week.

    I changed to a MOSFET with a higher RdsOn but lower gate charge. I also added a 100uF filter cap on the MOSFET source as well as the drain. It cleaned things up, and my PIC no longer resets but I see a voltage spike on the 5V rail up to 9V. That doesn't sound good for the PIC even though it seems to be handling it ok now.
    [​IMG]
    [​IMG]
     
  10. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    Maybe I misread something, but the small caps (0.33µF) are as necessary as the large ones, maybe more so. Capacitors have frequency responces, and small caps have much higher frequency responses than electrolytics. I didn't read where you added any small capacitors, I generally use 0.1µF because I have a huge stock of them.
     
  11. Peytonator

    Active Member

    Jun 30, 2008
    105
    3
    Yes. Ideally you should have, as you said, a series of them in decreasing capacitance values.

    Perhaps try adding a few smaller ones .. like a couple of nF.
     
  12. russpatterson

    Thread Starter Member

    Feb 1, 2010
    351
    16
    I added .22uF and a .1uF cap that I had laying around. I'll need to order a .33uF. I will try the string of descending caps. The addition of those caps did not make a significant difference.

    I will also try hooking up some big sand resistors for the load instead of the pump.

    I tend to think that the sudden change in current is causing a voltage drop as per the equation someone posted above. That sudden change is causing the 7805 to fluctuate. I wasn't aware of that electrical property (change in current causing voltage drop). Any suggestions on where I can read about that?

    I am trying to limit current for a 3 stage lead acid battery charger. Do I need to add an inductor/diode and make a proper buck circuit or can I just limit it with a FET like I'm doing now?
     
  13. Peytonator

    Active Member

    Jun 30, 2008
    105
    3
Loading...