Maker Pro
Maker Pro

PIC micro ringing power supply

I am playing with PIC microcontroller 16F628.

I am seeing high frequency ringing on my power supply with nothing else
hooked up, except the voltage regulator and the PIC. The noise goes
away when I pull the PIC so its not the power supply. (Lab supply -->
7805 regulator)

The waveform is:
around 15 mHz
15mV peak to peak

I have input capacitance on my regulator 100uF and output 4.7uF and a
bypass cap next to Vcc at the PIC of .1uF The circuit is wire wrapped,
and am taking everything back to a common ground pin. The waveform has
been observed on two different scopes. Also, I pulled out one of my
older projects, using a PIC16F628 and the waveform is visable on the
rails there too.

Any idea where this waveform is coming from and better yet how do I
flat line it? I realize 15mV is not that large but I am trying to
amplify a small DC voltage with an op-amp, and I also have a 12 bit ADC
that will use the positive side of this rail as voltage reference.

The waveform looks like a decaying Sine wave, amplitude large then
slowly decaying and then amplitude spikes large and then slowly decays
over and over at about 15mHz.

I may be picking nits, but would like to get rid of it, I guess I could
build another separate rail for my Vref and Op Amp but it seems
wasteful.
Thanks for any help
ED
 
M

mike

Jan 1, 1970
0
I am playing with PIC microcontroller 16F628.

I am seeing high frequency ringing on my power supply with nothing else
hooked up, except the voltage regulator and the PIC. The noise goes
away when I pull the PIC so its not the power supply. (Lab supply -->
7805 regulator)

The waveform is:
around 15 mHz
15mV peak to peak

I have input capacitance on my regulator 100uF and output 4.7uF and a
bypass cap next to Vcc at the PIC of .1uF The circuit is wire wrapped,
and am taking everything back to a common ground pin. The waveform has
been observed on two different scopes. Also, I pulled out one of my
older projects, using a PIC16F628 and the waveform is visable on the
rails there too.

Any idea where this waveform is coming from and better yet how do I
flat line it? I realize 15mV is not that large but I am trying to
amplify a small DC voltage with an op-amp, and I also have a 12 bit ADC
that will use the positive side of this rail as voltage reference.

The waveform looks like a decaying Sine wave, amplitude large then
slowly decaying and then amplitude spikes large and then slowly decays
over and over at about 15mHz.

I may be picking nits, but would like to get rid of it, I guess I could
build another separate rail for my Vref and Op Amp but it seems
wasteful.
Thanks for any help
ED

Are you sure it's not the power supply? Removing the transient load
will eliminate the transient load response of the power supply.

Are you sure it's not in your measurement technique?
If you expect to see substantially less than 15mV p-p on your power
supply, you'd better be using power and ground planes, lots of
decoupling, ferrite beads, etc...
And you'll need a dedicated socket for the probe. You can't just hook
a long ground lead up anywhere, poke the probe anywhere and expect to
make low level measurements.

Your processor may have a mode where it stops the internal clock during
the A/D measurement interval.
mike

--
Wanted, Serial cable for Dell Axim X5 PDA.
FS 512MB 45X SD Flash memory.
Return address is VALID but some sites block emails
with links. Delete this sig when replying.
FS 500MHz Tek DSOscilloscope TDS540 Make Offer
Bunch of stuff For Sale and Wanted at the link below.
MAKE THE OBVIOUS CHANGES TO THE LINK
ht<removethis>tp://www.geocities.com/SiliconValley/Monitor/4710/
 
R

Rich Grise

Jan 1, 1970
0
I am playing with PIC microcontroller 16F628.

I am seeing high frequency ringing on my power supply with nothing else
hooked up, except the voltage regulator and the PIC. The noise goes
away when I pull the PIC so its not the power supply. (Lab supply -->
7805 regulator)

The waveform is:
around 15 mHz
15mV peak to peak

I have input capacitance on my regulator 100uF and output 4.7uF and a
bypass cap next to Vcc at the PIC of .1uF The circuit is wire wrapped,
and am taking everything back to a common ground pin.

Move the .1 to as close to the regulator output as is physically possible,
and put the 4.7 on the board, and add at least one .1 uF for every chip,
preferable more sprinkled around the power/ground buses.

What's the clock freq. of the PIC?

Good Luck!
Rich
 
Thanks for the reply:
mike said:
Are you sure it's not the power supply? Removing the transient load
will eliminate the transient load response of the power supply.

This makes sense, I guess it could be the power supplies response to
the PIC
Are you sure it's not in your measurement technique?
If you expect to see substantially less than 15mV p-p on your power
supply, you'd better be using power and ground planes, lots of
decoupling, ferrite beads, etc...

I am grounding the scope at the circuit. I don't know much about how
to add more filter caps or beads. I've tried larger and smaller caps,
whatever is ringing, rings right through. The interesting thing is the
signal does not look like 15mV random noise, its very clearly a sine
type signal, repeating, and fast.
And you'll need a dedicated socket for the probe. You can't just hook
a long ground lead up anywhere, poke the probe anywhere and expect to
make low level measurements.

Care to elaborate on the dedicated socket?
Your processor may have a mode where it stops the internal clock during
the A/D measurement interval.

This is a good idea, I will check.

I thought possibly its just something common in high speed digital or
the PIC family. I am using an internal oscillator at 4mHz. Its a very
small and insignificant amount of voltage, but it is interesting and
puzzling to me. I just spent a week futzing about with an op amp
circuit with high gain, so I am particulary focused on the small right
now.

I know just enough to make me dangerous!

again thanks for the quick response,
ED
 
M

mike

Jan 1, 1970
0
Thanks for the reply:
mike wrote:




This makes sense, I guess it could be the power supplies response to
the PIC




I am grounding the scope at the circuit. I don't know much about how
to add more filter caps or beads. I've tried larger and smaller caps,
whatever is ringing, rings right through. The interesting thing is the
signal does not look like 15mV random noise, its very clearly a sine
type signal, repeating, and fast.

Where is the cap? If it's a cap with wires, how long are the wires from
the VCC to the Ground pin on the pic? That inductance resonates with the
capacitor. There's also significant resistance in the cap.
So, if you don't have ground and VCC planes on your circuit board and
surface mount caps with proper, low inductance, connection to the
planes, you'll never get rid of this low level ringing.
Care to elaborate on the dedicated socket?

There are probe sockets designed to mount on the board and accept your
probe tip. Put one RIGHT AT the cap.
Probe has the same problem as the cap did. Inductance seriously
degrades the measurement. Also picks up stray signals. Stick the probe
tip on ground near where your ground clip is hooked. I betcha you still
see most of the ringing. Move the probe a little bit and you'll see
more ringing.
I can connect the ground clip to the probe tip, waive it in the air and
see FM radio and TV stations ten miles away.
ACCURATE probing is extremely difficult.
This is a good idea, I will check.

I thought possibly its just something common in high speed digital or
the PIC family. I am using an internal oscillator at 4mHz. Its a very
small and insignificant amount of voltage, but it is interesting and
puzzling to me. I just spent a week futzing about with an op amp
circuit with high gain, so I am particulary focused on the small right
now.

Your op amp has a spec on power supply rejection. That's often a big
number. Bigger problem is the bias resistor that you hooked to the
noisy power supply. Filter that connection. Not much you can do about
the PIC 'cause it uses the same chip pin for both digital and analog
stuff. You often have to average many readings to get decent precision
with a PIC A/D.

mike

I know just enough to make me dangerous!

again thanks for the quick response,
ED



--
Wanted, Serial cable for Dell Axim X5 PDA.
FS 512MB 45X SD Flash memory.
Return address is VALID but some sites block emails
with links. Delete this sig when replying.
FS 500MHz Tek DSOscilloscope TDS540 Make Offer
Bunch of stuff For Sale and Wanted at the link below.
MAKE THE OBVIOUS CHANGES TO THE LINK
ht<removethis>tp://www.geocities.com/SiliconValley/Monitor/4710/
 
Rich said:
Move the .1 to as close to the regulator output as is physically possible,
and put the 4.7 on the board, and add at least one .1 uF for every chip,
preferable more sprinkled around the power/ground buses.

What's the clock freq. of the PIC?

I will try these changes later today, moving the 4.7uf out to the
middle of the board, and putting a .1uF right at the regulator, this
makes sense. Probably I will put a .1uF right at my ground pin and
power pin since this is wire wrap.

Begginning to realize I am just being to nit picky and that this is
something that I will just have to embrace and work around in other
ways.

Thanks for the suggestions!
ED
 
N

Noway2

Jan 1, 1970
0
With a wirewrap implementation you will probably not be able to get rid
of the ringing. For that matter, your circuit logic will be limited to
a fairly low speed (not clock speed) but signal rise / fall times due
to wiring inductance. As a result, depending on what devices you have
in your circuit, it may or may not work. Try to stay with slow logic
devices. As I understand it, Microchip PICs tend to be very easy to
work with in this regard, so you have a good chance. Instead of a
wirewrap, you may wish to consider a one or two sided PCB. There are
free tools available that will do the job.

If you do stay with wirewrap, keep the wiring as short and neat as
possible and place a good bypass capacitor as close to every power pin
as possible. Avoid using Aluminum Electrolytics, a better choice would
be ceramics.

Good Luck!
 
So, if you don't have ground and VCC planes on your circuit board and
surface mount caps with proper, low inductance, connection to the
planes, you'll never get rid of this low level ringing.

I can see a little more clearly now, thanks.
Stick the probe
tip on ground near where your ground clip is hooked. I betcha you still
see most of the ringing. Move the probe a little bit and you'll see
more ringing.

Oh Man! you are so right! Grounding on regulator ground, and then
looking just a few centimeters away at another ground pin, while I
don't see the same waveform its just as nasty. In fact probing to the
ground pin of the scope itself, if I hold my hand just right, I see a
very similar waveform to what I have in the circuit of almost the same
amplitude. I am beggining to see the light.
I can connect the ground clip to the probe tip, waive it in the air and
see FM radio and TV stations ten miles away.
ACCURATE probing is extremely difficult.

Understood, I believe you, thanks so much for your feedback,
I also read up a bit over in sci.electronics.design on bypass caps, so
understand now more about surface mount bypass and ground and power
planes. All of it slowly creeps in.

Will, just quench it as much as I can and, design around the rest of
it.
Thanks again,
ED
 
These are all very good suggestions,
I have taken note. Eventually I will make a board for this project, but
right now I am still in the prototyping stage and experimenting.
*Obviously*
Good suggestion about slower logic devices this makes sense and I
probably would have done the opposite.

Again thanks to all for the comments,
this has been an eye opener, and will help improve my technique as I
move on to more complex projects. I appreciate the feedback.

_later
ED
 
Rich Grise wrote
Move the .1 to as close to the regulator output as is physicall possible
and put the 4.7 on the board, and add at least one .1 uF for ever chip
preferable more sprinkled around the power/ground buses

What's the clock freq. of the PIC
I will try these changes later today, moving the 4.7uf out to th
middle of the board, and putting a .1uF right at the regulator, thi
makes sense. Probably I will put a .1uF right at my ground pin an
power pin since this is wire wrap

Begginning to realize I am just being to nit picky and that this i
something that I will just have to embrace and work around in othe
ways

Thanks for the suggestions
E
 
N

Noway2

Jan 1, 1970
0
With a wirewrap implementation you will probably not be able to ge
ri
of the ringing. For that matter, your circuit logic will be limite
t
a fairly low speed (not clock speed) but signal rise / fall times du
to wiring inductance. As a result, depending on what devices you hav
in your circuit, it may or may not work. Try to stay with slow logi
devices. As I understand it, Microchip PICs tend to be very easy t
work with in this regard, so you have a good chance. Instead of
wirewrap, you may wish to consider a one or two sided PCB. There ar
free tools available that will do the job

If you do stay with wirewrap, keep the wiring as short and neat a
possible and place a good bypass capacitor as close to every power pi
as possible. Avoid using Aluminum Electrolytics, a better choic
woul
be ceramics

Good Luck
 
mike said:
[email protected] wrote:
Thanks for the reply:
mike wrote:

So, if you don't have ground and VCC planes on your circuit board and
surface mount caps with proper, low inductance, connection to the
planes, you'll never get rid of this low level ringing.
I can see a little more clearly now, thanks.
Stick the probe
tip on ground near where your ground clip is hooked. I betcha you still
see most of the ringing. Move the probe a little bit and you'll see
more ringing.
Oh Man! you are so right! Grounding on regulator ground, and then
looking just a few centimeters away at another ground pin, while I
don't see the same waveform its just as nasty. In fact probing to the
ground pin of the scope itself, if I hold my hand just right, I see a
very similar waveform to what I have in the circuit of almost the same
amplitude. I am beggining to see the light.
I can connect the ground clip to the probe tip, waive it in the air and
see FM radio and TV stations ten miles away.
ACCURATE probing is extremely difficult.
Understood, I believe you, thanks so much for your feedback,
I also read up a bit over in sci.electronics.design on bypass caps, so
understand now more about surface mount bypass and ground and power
planes. All of it slowly creeps in.

Will, just quench it as much as I can and, design around the rest of
it.
Thanks again,
ED
 
These are all very good suggestions,
I have taken note. Eventually I will make a board for this project,
but
right now I am still in the prototyping stage and experimenting.
*Obviously*
Good suggestion about slower logic devices this makes sense and I
probably would have done the opposite.

Again thanks to all for the comments,
this has been an eye opener, and will help improve my technique as I
move on to more complex projects. I appreciate the feedback.

_later
ED
 
Top