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

Reply to
ednspace
Loading thread data ...

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
http://www.geocities.com/SiliconValley/Monitor/4710/
Reply to
mike

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.

Care to elaborate on the dedicated socket?

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

Reply to
ednspace

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.

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.

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

--
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
http://www.geocities.com/SiliconValley/Monitor/4710/
Reply to
mike

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

Reply to
Rich Grise

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

Reply to
ednspace

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!

Reply to
Noway2

I can see a little more clearly now, thanks.

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.

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

Reply to
ednspace

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

Noway2 wrote:

Reply to
ednspace

physically possible,

for every chip,

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

Reply to
ednspace

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!

Reply to
Noway2

and

surface mount caps with proper, low inductance, connection to the

you'll never get rid of this low level ringing.

I can see a little more clearly now, thanks.

ground clip is hooked. I betcha you still

probe a little bit and you'll see

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.

clip to the probe tip, waive it in the air and

ten miles away.

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

Reply to
ednspace

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

Noway2 wrote:

rid

to

due

have

logic

are

pin

would

Reply to
ednspace

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.