Why my mcu generate noise ?

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

Hello 

 

I design a board .on my board there is a ATmega88pa and a 24bit  ADC.

because of adc low stability i suspect to power supply and watch it by oscilloscope .

for watching noise i set the oscilloscope on AC mode   .the result was really strange .

This is what i have on my Vcc and Gnd pins .

the pick to pick voltage is approximately 400m/volt

and when i set the mcu into sleep mode (power Down) it reduced to 2 m/volt.

why  muc generate such a noise ?

Sorry for low quality

 

  

Last Edited: Wed. Nov 5, 2014 - 06:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think you are going to need to post:

 

1) schematic

2) (possibly) board layout

3) code used when this measured

4) details of your measurement technique - type of scope probe - how it's grounded etc.

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

clawson wrote:

I think you are going to need to post:

 

1) schematic

2) (possibly) board layout

3) code used when this measured

4) details of your measurement technique - type of scope probe - how it's grounded etc.

 

Thanks clawson

 

code : even   "While(1);" has same result ;

 

ascope is simple analog with earth ground connected .

 

mcu use internal RC oscillator.

 

power supply is benchtop power supply with earth ground connected .

 

 

 

 

 

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

First off, you'll want more capacitors. 3 100nF (I call that .1uF) caps next to pins 6, 4 and 18.

 

Second, you can tell the processor to go to sleep while doing an ADC, and that improves stability a lot.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

First off, you'll want more capacitors. 3 100nF (I call that .1uF) caps next to pins 6, 4 and 18.

 I have done , after ferrite that coupled by some extra capacitor it is improved but still exist .

 

  Second, you can tell the processor to go to sleep while doing an ADC, and that improves stability a lot.

yes of course .But the main question is why mega88pa generate this .

i have some other boards non of them behave like this . 

and how about if mcu has to do some other tasks during adc conversion ?

 

Last Edited: Wed. Nov 5, 2014 - 06:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

what frequency is your scope set to?

 

Keith Vasilakes

Firmware engineer

Minnesota

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

0.5 us

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

AREF needs a 100nF cap to ground.

 

You MUST NOT connect VCC and AVCC together. AVCC needs the filter, VCC not necessarily but could help with an ADDITIONAL, SEPARATE filter.

ascope is simple analog with earth ground connected .

It all depends WHERE your scope's earth lead is connected during measurement, usually it needs to be close to the test point. Noise will be different in different parts of the board.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Last Edited: Wed. Nov 5, 2014 - 08:41 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Where you place your GND lead will make a huge difference, if probing pin 4 or 6 for noise, use pin 5 for gnd, also how long are the traces from these pins to the filter caps? 

 

As for why it creates noise, parts of the mcu are switching a 8 MHz or greater if using an external xtal. 

You may also want to read Atmel app notes 40 and 42 for info on proper H/W designs.

 

JC

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

Last Edited: Wed. Nov 5, 2014 - 09:31 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think there's a switchmode supply in the setup. Try using a battery. I think there is a number of issues, most have been covered by the other respondents. Let's list them:

1. Bypass caps

2. Location of bypass caps

3. Pcb layout has too many 'islands' on the gnd plane. Actually, it's just a copper pour. Some of the paths are rather long and thin.

4. Scope measurement technique - the ground lead picks up noise. For best measurement, keep it short (<1cm)

5. Digital logic generates noise as part of its operation. The mega88 is no exception.

6. You will be lucky to achieve 24 bit resolution. I only got 14 noise free bits in a project where i used a aduc0834 at 50 samples/sec. For the application, this was more than adequate.

7. Accuracy is also difficult to achieve as every joint is a thermocouple.

8. You have 1000uF caps on the output of the regulators. You have the wrong caps in the wrong places.

Last Edited: Wed. Nov 5, 2014 - 09:48 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What is the time base setting of the scope?

 

WHERE is the ground lead connected? You really need to connect it close  to the MCU ground pins.

 

What sort of analog probe are you using?

 

How long is the ground lead of the probe and how is it attached to the probe?

 

As a note, you will NEVER have zero noise on Vcc. A few mV is not uncommon. The MCU generates current pulses at 2X MCU clock frequency and those pulses can be from a few 10s of mA to approaching 100mA. Those pulses have VERY fast rise times and will make most PCB traces and inexpensive low frequency "probes" ring like a bell. Any sensitive circuit (ADC, DAC, RF, and so forth) almost always requires additional Vcc filtering. Ferrite beads and 10nf to 100nf caps are in order. 

 

Also, your bypass caps must be properly  connected to do any good. For example, MCU bypass caps should not just go from Vcc to some generic point is a ground plane. Instead, they should have as short a trace as possible between the MCU Vcc pins and the MCU ground pins. 

 

Hope this helps

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

js wrote:

AREF needs a 100nF cap to ground.

 

You MUST NOT connect VCC and AVCC together. AVCC needs the filter, VCC not necessarily but could help with an ADDITIONAL, SEPARATE filter.

ascope is simple analog with earth ground connected .

It all depends WHERE your scope's earth lead is connected during measurement, usually it needs to be close to the test point. Noise will be different in different parts of the board.

I dont use mcu ADC .so i dont need to separate them .but as you see there is a ferrite   and cap on vcc.

scope's prob is closely on 3 and 4 pin. 

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

ki0bk wrote:

also how long are the traces from these pins to the filter caps? 

about 4 ~ 5 mm

 

As for why it creates noise, parts of the mcu are switching a 8 MHz or greater if using an external xtal. 

now i'm using 8M internal RC oscillator  with 4 Divider .

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

You haven't done a DRC on your pcb have you? At a glance, it looks like the 0V from the AVR simply an island. Sorry to be the bearer of bad news, your pcb needs to be scrapped and a new layout done. It is seriously poor.

 

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

I dont use mcu ADC

I see that part now! So where is your ADC circuit? It would have made sense to show that part also on the diagram as you are reading the noise on the chip.

 

Are you filtering the VCC going to the external?? (obvious now) ADC?

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

John - he simply hasn't connected the 0v to the AVR! How many times have we done that?

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

js wrote:

I dont use mcu ADC

I see that part now! So where is your ADC circuit? It would have made sense to show that part also on the diagram as you are reading the noise on the chip.

 

Are you filtering the VCC going to the external?? (obvious now) ADC?

 

I have another board with atmega16 without any ferrite the noise(p-p) is about 3 m/v

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

Kartman wrote:

John - he simply hasn't connected the 0v to the AVR! How many times have we done that?

 

so what is this 

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

and this is what i have after ferrite : 

Volit/Div = 5mv 

Time/Div =0.5 us

 

 

 

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

perhaps there is a GND connection but for sure it's a bad layout. Try solder your grounds together.

 

And there should be a cap on the "inner side" of VDD (or move C25 to the other side of the coil)

 

Just make sure that that it's the AVR, what happen when you hold reset down ?

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

my first post :

 

and when i set the mcu into sleep mode (power Down) it reduced to 2 m/volt.

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

Mori - I can not see how you've connected 0V to the AVR on your pcb.

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

Kartman wrote:

Mori - I can not see how you've connected 0V to the AVR on your pcb.

Sorry Kartman you are right.

this schematic was modified .

 in my schematic the GND net on regulator was not connected correctly .....

and i put a ferrite on GND pin .then i realize it's wrong .

but  i shorted that ferrite and GND pin is connected to 0 volt well.(by the wire )

Last Edited: Thu. Nov 6, 2014 - 11:22 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

after better grounding and add aluminum smd capacitor(100 uf) close to ferrite  

this is the result :

 

 

after ferrite , before sleep 

 

and after sleep:

 

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

you need a good cap about 100nF between GND and VDD on the AVR, placed closed to it. (Perhaps you have it now)

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

i have it already . well grounding really help and 100uf  impressively reduce the noise .

 

this is my board 

 

hope for better layout 

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

now I got 15 noise free bits at 4.7 hz samples rate .

I hoped to achieve more than this .

Last Edited: Thu. Nov 6, 2014 - 03:19 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

he simply hasn't connected the 0v to the AVR!

I thought that the track going to the pad (Red) through the via was connecting the ground pins and then through another via was connecting the copper on the other side, a bit convoluted. But now I see that the track is going to a pad which goes nowhere.

How many times have we done that?

Whatever do you mean......

 

Anyway I do HATE it when people use Red for top (component)  layer and Blue for bottom layer...... Red has always been bottom layer since I used old Bishop tapes.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

First up, learn how to use the DRC (design rules check) feature of your pcb package. That will hopefully pick up a lot of the simpler mistakes. Your ground pour is next to useless as there are too many islands. Try to keep the tracks on top and arrange them to avoid the islands. 

Understand the types of capacitors and their application. Your 100uF is really only good for low frequencies. I'd probably only use 10uF. Similarly with ferrite beads/inductors. Ferrite beads are good for higher frequencies. For decoupling your power rails you need larger inductance.

For better adc performance you will have to pay close attention to the above. With the small voltages involved, even the noise of resistors can have an effect. 

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

Kartman wrote:

First up, learn how to use the DRC (design rules check) feature of your pcb package. That will hopefully pick up a lot of the simpler mistakes. Your ground pour is next to useless as there are too many islands. Try to keep the tracks on top and arrange them to avoid the islands. 

Understand the types of capacitors and their application. Your 100uF is really only good for low frequencies. I'd probably only use 10uF. Similarly with ferrite beads/inductors. Ferrite beads are good for higher frequencies. For decoupling your power rails you need larger inductance.

For better adc performance you will have to pay close attention to the above. With the small voltages involved, even the noise of resistors can have an effect. 

Thanks Kartman 

can you describe about Island .I google it didn't find any thing .

what do you mean "island" .

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

On your copper fill, you have areas of copper that aren't connected - these are called 'islands'. Altium refers to them in this manner. Google altium pcb island

You have broken up the copper fill with tracks. Redesign your pcb so you minimise the tracks on the copper pour side or arrange them so you don't get islands and maintain the maximum amount of copper.

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

You might try adding a 100-microHenry inductor (they look like green resistors) between Vcc and AREF.

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

Simonetta wrote:

You might try adding a 100-microHenry inductor (they look like green resistors) between Vcc and AREF.

 

You mean like these?

 

http://www.digikey.com/product-d...

 

(Your avatar wouldn't be interested in a 56-year-old unemployed brat?)

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

Kartman wrote:

On your copper fill, you have areas of copper that aren't connected - these are called 'islands'. Altium refers to them in this manner. Google altium pcb island

You have broken up the copper fill with tracks. Redesign your pcb so you minimise the tracks on the copper pour side or arrange them so you don't get islands and maintain the maximum amount of copper.

 

but these are polygon and they  are connected to the GND 

Last Edited: Mon. Nov 10, 2014 - 05:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm not sure what you're saying. Why would you have tracks that connect to the polygon? Altium would just fill over them. You want to design your pcb so that the copper pour is not interrupted as it is on your pcb.

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

Kartman wrote:

I'm not sure what you're saying. Why would you have tracks that connect to the polygon? 

 

because polygon net is GND and Altium Connect polygon to GND  by these tracks .

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

Altium has an option to pour over those tracks. Besides, those tracks shouldn't be there. They are the least of your worries - you need to ensure you get a better copper pour so that it works like a ground plane. Currently yours is not too useful at any frequency above DC and marginal at DC.

Last Edited: Mon. Nov 10, 2014 - 07:08 AM