Author Topic: PICKit 3 not debugging with voltage regulator  (Read 4228 times)

0 Members and 1 Guest are viewing this topic.

Offline pelle.jansenTopic starter

  • Contributor
  • Posts: 24
  • Country: nl
    • Check out my Youtube channel!
PICKit 3 not debugging with voltage regulator
« on: February 25, 2012, 05:49:09 pm »
Hi guys and girls,
I have stumbled on something interesting: When I am supplying a PIC16F877A microcontroller with a 9V battery though an LM7805 voltage regulator the debugging feature of the PICKit 3 either takes extremely long (>2 minutes) to start or doesn't start at all. Then when I switch to power from the PICkit3, Debugging works fine again. I am using decoupling on the power of the PIC. Any idea why? The PIC runs its program just fine but doesn't debug properly.

Thanks
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: PICKit 3 not debugging with voltage regulator
« Reply #1 on: February 26, 2012, 07:46:43 pm »
What capacitors are you using before and after the LM7805?

How much current are you drawing? Are you sure the 9V battery can supply sufficient current to power the PICKit 3?

Have you measured the output voltage?

The LM7805 is a bad choice for a circuit running from a 9V battery because the drop-out voltage is between 1.5V and 2V so the output voltage will drop below 5V and regulation will be lost when the battery voltage falls below 7V. For optimum battery life the circuit should be designed to work down to 6V so a low drop-out regulator is a better solution.
 

Offline pelle.jansenTopic starter

  • Contributor
  • Posts: 24
  • Country: nl
    • Check out my Youtube channel!
Re: PICKit 3 not debugging with voltage regulator
« Reply #2 on: February 26, 2012, 09:09:57 pm »
What capacitors are you using before and after the LM7805?

How much current are you drawing? Are you sure the 9V battery can supply sufficient current to power the PICKit 3?

Have you measured the output voltage?

The LM7805 is a bad choice for a circuit running from a 9V battery because the drop-out voltage is between 1.5V and 2V so the output voltage will drop below 5V and regulation will be lost when the battery voltage falls below 7V. For optimum battery life the circuit should be designed to work down to 6V so a low drop-out regulator is a better solution.

I am only drawing a few mA and the 9V battery is under load 9.2V so that shouldn't be a problem. The output voltage almost perfect 5V. My oscilloscope died so no idea about ripple. Not sure which capacitors as I do not have them with me right now. But i do know that the input is a small electrolytic and the output is a ceramic and a large electrolytic. Not sure if that is right but never had any problems before now.

I know it is a bad idea but I only use it for if I am away from my bench PSU. The circuits I supply with the 9V battery and regulator are only temporal so I don't care if I don't use the entire battery.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: PICKit 3 not debugging with voltage regulator
« Reply #3 on: February 26, 2012, 09:17:57 pm »
The problem may be that you're not drawing enough current.  The 78xx regulators require a minimum current.  You might stick a dummy load (1K resistor or less) on the output parallel to the MCU and see if it works then.
 

Offline pelle.jansenTopic starter

  • Contributor
  • Posts: 24
  • Country: nl
    • Check out my Youtube channel!
Re: PICKit 3 not debugging with voltage regulator
« Reply #4 on: February 27, 2012, 02:18:36 pm »
Q
The problem may be that you're not drawing enough current.  The 78xx regulators require a minimum current.  You might stick a dummy load (1K resistor or less) on the output parallel to the MCU and see if it works then.
I tried a large LED with resistor (around 10mA) but same problem. What capacitor values do you recommend for use with the LM7805 and a PIC microcontroller? Every site i find give different values and I have no idea what range will work.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: PICKit 3 not debugging with voltage regulator
« Reply #5 on: February 27, 2012, 03:02:46 pm »
Q
The problem may be that you're not drawing enough current.  The 78xx regulators require a minimum current.  You might stick a dummy load (1K resistor or less) on the output parallel to the MCU and see if it works then.
I tried a large LED with resistor (around 10mA) but same problem. What capacitor values do you recommend for use with the LM7805 and a PIC microcontroller? Every site i find give different values and I have no idea what range will work.

Honestly, when bread boarding with LM78xx regulators, I've always just thrown a couple of electrolytic caps of about 10uF on the input and output and never had any problems.  One of the circuits on one of my bread boards now has an LM7805 and has 100uF caps on the input and output. (Those must have been what was handy at the time.)

The datasheets usually specify fairly small caps.  One I just looked at (Fairchild's) specified a 0.33uF for the input and a 0.1uF for the output.  So if you think that's the issue then it's always best to go with the manufacturer's recommendations.
 

Offline wkb

  • Frequent Contributor
  • **
  • Posts: 910
  • Country: nl
Re: PICKit 3 not debugging with voltage regulator
« Reply #6 on: February 27, 2012, 03:34:32 pm »
Q
The problem may be that you're not drawing enough current.  The 78xx regulators require a minimum current.  You might stick a dummy load (1K resistor or less) on the output parallel to the MCU and see if it works then.
I tried a large LED with resistor (around 10mA) but same problem. What capacitor values do you recommend for use with the LM7805 and a PIC microcontroller? Every site i find give different values and I have no idea what range will work.

Honestly, when bread boarding with LM78xx regulators, I've always just thrown a couple of electrolytic caps of about 10uF on the input and output and never had any problems.  One of the circuits on one of my bread boards now has an LM7805 and has 100uF caps on the input and output. (Those must have been what was handy at the time.)

The datasheets usually specify fairly small caps.  One I just looked at (Fairchild's) specified a 0.33uF for the input and a 0.1uF for the output.  So if you think that's the issue then it's always best to go with the manufacturer's recommendations.

The 100nF ones are to prevent oscillation, the 10 of 22 uF (or somesuch) to improve regulation.

Hope I remember this correctly.  Anyway, same experience here: just throw it together and it works with an LM78xx
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf