Noisy output

Go To Last Post
26 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Guys and Dolls,

I've been searching the fora a bit and could not find anything to the following observation. If it is a problem that needs to be resolved remains to be seen...

While playing with an Atmega168 I found the output of several pins a bit noisy. Humm... Lets zoom in. Ripple noise found of 320 mV at 5V output. Frequency around 38.5 MHz (twice the freq of the xtal). I want to get rid of the noise without filtering the output.

Q: why is this noise here in the first place
Q: How to get rid of it
Q: Is it a fundamental design fault?

Side Question

A 100 muH inductor is in the Vcc line with proper condensators.
I found out if one does NOT put 5V to the AVcc, the chip is not working - but if one has a floating Vcc (+ +5V to AVcc) the chip is still running its code - with a reduced ouput voltage.

why?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I found out if one does NOT put 5V to the AVcc, the chip is not working - but if one has a floating Vcc (+ +5V to AVcc) the chip is still running its code - with a reduced ouput voltage.

The parasitic power could be coming from almost anywhere. Not a "good thing" if you plan to keep it that way.

Re: The ripple on the output pins. Now, have you terminated them somewhere, or are they unconnected? If unconnected you could well be (in my experience) just be picking up the noise via 'scope leads and ground connections. If you drive a 1meg or 10k resistor do you see the same ripple?

Next look for the ripple on Vcc. Clean and pure? No ground ripple? [Yeah, I know, harder to measure.]

I can't say I've ever noticed ripple on output pins at the clock frequency. If I do see some it is usually at the mains frequency, picked up by long leads.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Parasitic power. Hum... have to analyze it.

just to clear it up, two Q:

Does the chip run if if power is attached to AVcc (and float to Vcc)?

Does the chip run if No power is attached (float) to AVcc (only power to Vcc)?

Do BOTH AVcc and Vcc need power to have the chip run (even when no adc is used)?

Oh, fyi: No ripple on Vcc or gnd and I drive the output to gnd through a 22K resistor.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Oh, fyi: No ripple on Vcc or gnd and I drive the output to gnd through a 22K resistor.

That's weird to me. There have been some posts about overtones and harmonics on crystals above a certain frequency, but that's not my bag. And my stuff is generally 8MHz or less. I do have a current design at 20MHz and havent seen any noticeable ripple on outputs--and I'd notice 300mV!

Quote:

Does the chip run if if power is attached to AVcc (and float to Vcc)?

Does the chip run if No power is attached (float) to AVcc (only power to Vcc)?

Do BOTH AVcc and Vcc need power to have the chip run (even when no adc is used)?


Well, they might or might not depending on what is connected. But you never want to run a "real" app that way and expect it to work right.

Your parisitic power, for example, could even be coming in through the pull-up on /RESET (which I assume that you have).

Just for grins, change the fuses to internal oscillator and re-check. And try a slower crystal.

Now I know why I like my nice, sedate, 3.6864MHz... ;)

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Found out that the parasitic power came from the max3235. Its now detached. Chip runs from Vcc (AVcc float). There is a reset resistor of 22k to Vcc, but no parasitic power drawn from that one.

Everything detached execpt xtal+2x27pF cap, two 100nF caps across gnd and Vcc, AVcc, one long isp cable (not connected).

Still ripple., chip uses 22 mA@5.0V through Vcc and if I connect AVcc it uses 19mA.

Any idea's?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Show us a photo of the setup.
Give us a schematic diagram plus layout.
What scope do you use ? How are probes
attached. What kind of wiring to connect
the XTAL ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Both AVcc and Vcc should be connected to your power supply. Why? Some pins (propably the ones that are the ADC pins) get their power from AVcc pin. The point is that if you do not use ADC, you can omit the suggested LC filter on AVCC pin.

What happens if you either ditch the "100muH" (whatever it means anyway, milli or micro Henrys???) inductor or add more capacitance after the inductor? But I guess nothing happens, as you already said there was no ripple on VCC.

- Jani

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have had a similar problem in the past, which was due to wrong value of load caps on oscillator circuit. Some XTALs have a tendency to resonate at some harmonics is proper load is not applied.. Try to double check your crystal's specs, and make sure load caps are recommended values... You could also add a 1MegOhm resistor in parallel with the xtal for stabilization, see if that helps...

At first I thought simply bad decoupling and bypassing, but if you have no ripple coming in via the VCC ports, there should be no ripple on the outputs...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've changed the x-tals to lower and higher freqs. Yes it has infuence. The 3.8MHz does give a much smaller ripple. I also lowered the caps to 22pF -> no result.
I just made some photo's - stand by for them.
I just tried a 1M resistor parallel to the xtal. No effect. And perhaps check the xtal output through pin 20.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

one long isp cable (not connected).

Sounds like a GREAT antenna for noise.

Quote:

chip uses 22 mA@5.0V through Vcc and if I connect AVcc it uses 19mA.

That sounds a bit high to me (are you measuring input to the regulator, or input to the AVR?), but I'm used to running at more sedate speeds. the datasheet indicates about half that (11mA at 20MHz, 5V).

And PLEASE, connect all Gnd and Vcc when doing this kind of stuff. And bypass both pairs. And have all unconnected pins as outputs or pulled-up inputs.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Basic setup:

Capture1:

Blue trace: +5V
Purple: output

Capture 2: Yellow: clock output on PB2 (pin 20)

Oh, I have to check the outputs of the pins. I'm not sure how they are defined.

Nick

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh, why are my 1024x y pictures so small?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Last Edited: Thu. Jan 31, 2008 - 10:53 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well the fact it is a breadboard sure does not help with noise, and also there IS a ripple on VCC... Add some bypass caps near all IC power pins...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

All chips have 100 nF bypass over Vcc/gnd
I know breadboard is not that good. But is it the source of the ripple?

I know, there is also a ripple on the Vcc - but if you look at the first trace, the ripple is much smaller than the output.

Does the clock looks ok to you?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Does the clock looks ok to you?

To me it looks as if the XTAL caps are connected to Vcc and not to GND.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Lennart,

You are right, I've misplaced them when I was changing them to another value. Good spot. No influence on the ripple though.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Given you are using long ground clips (versus the spring high frequency ground clips that go right on the end of the probes) AND you don't have a real PCB any noise and ripple measurements are essentially bogus, imho.

cheers,
george.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do you have another mega168 to try.
Maybe this one had enough both being not connected to AVcc and with XTAL caps connected to Vcc.
I often do breadbording and never experienced the amount of ripple you describe.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also, did you try to disconnect ISP-cable as Lee suggested.
They make a great antenna for picking up noise if not connected at other end.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just tried it with a new atmega168. Same results...
What freq are you using for your breadboarding?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is possible that what I measure is bogus. The clips are not that good, but normally one should use active probles when measuring signals greater than 1GHz.
I did not use the 20 MHz bandwidth filter on the scope, but why is the ripple of blue trace (5V) much smaller compared to the output? When I use the bandwidth filter, the ripple is still visible. It is not an artefact of the scope. (I've swapped the channels and results are the same).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
What freq are you using for your breadboarding?

I mostly use 16MHz crystal.
And my scope (and probes) are not as good as yours. :wink:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Could it be the type of capacitors? The 100 nF ones are multidisk ceramic Z5U. And the ones for xtals are ceramic NPO ?
For the powersupply I've use some old elco's (100 uF/50V and 100uF/25V) and tantal 10uF/16V.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Could it be that you simply expect too much ?
I would not care about these ripples. And
I think you need very good techniques too
really evaluate circuits at that frequency
range. The scopes today are often much
better than the techniques used in probing.....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

isp cable is connected to a dragon....