## LC filter for Avcc

21 posts / 0 new
Author
Message

Hi, everyone

I'm developing an arduino-based board for robot control. I'm using the atmega32u4 and want to use the adc for read sensors. I have realized that the schematic for the arduino uno and other boards of arduino, use an ferrite bead for the LC filter in Avcc instead of the inductor suggested in the datasheet for the avr microcrontrollers. Why they do that?

And the other question is, if i use the suggested inductor of 10uH, it is a 35mA of rated current good enough for that purpuse?

I read in other topics that the inductor have to have a low resistance in DC to avoid a voltaje drop greater that .3 volt.

I want to use this component:

https://lcsc.com/product-detail/...

This topic has a solution.

Ivan Castillo. Engineering student from México. 21 years old.

Last Edited: Tue. Jul 17, 2018 - 02:00 PM

A ferrite "bead" has more attenuation at high frequencies than does a conventional inductor.

As to whether or not 35mA rating is sufficient, you only need to look at the  electrical characteristics for the device you are using. Then add up the current for the MCU and the currents for all the peripherals you are using plus all of the pin load currents (e.g. LEDs, for example).

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

From a quick read of the datasheet, your inductor says a max current of 15mA. Looking at the i/vs inductance curves, the inductance drops off sharply at max current. I’d suggest a part with a higher current rating and lower resistance - this means it will be physically larger. Avcc powers some port pins, so you need to consider what current you expect from those pins. Your current choice of inductor would become a piece of wire with just a LED as a load.

Note that a ferrite bead is an inductor. They are normally rated for the impedance at a given freq - 100MHz.

So, the better option is the ferrite bead? I dont want to use a larger component in order to get the desired rated current (aprox. 100mA for the whole uC). But, what is about of the impedance and resistance of the ferrite bead? How can i know these values?

Thanks for the support!

Ivan Castillo. Engineering student from México. 21 years old.

>> A ferrite "bead" has more attenuation at high frequencies than does a conventional inductor.

the better option is the ferrite bead?

It's not clear.  AFAICT, Ferrite beads get used to attenuate the really HF stuff that would make the FCC annoyed with your product (typically rated in "ohms @ 100MHz", right?), but the inductor in AVcc is for filtering out the "moderate" switching frequencies from the reset of the chip so they don't interfere with the analog circuitry  (<16MHz.  Probably much less, given the ADC operating frequencies.)

15mA is plenty for the m328 itself, but you'll need to watch out if you're driving any high-current loads (LEDs, for example) from the sections of the chip that are also powered by AVcc. (which I guess is only some of the portc pins that you are dedicating to ADC inputs, anyway.  Although ... it's hard to say for sure.)

If I was really wanting 10bits of accuracy out of the ADC, I'd be looking that the supply voltage with a scope, very carefully, as I tried out different LRCB-type combinations.  (maybe you'd want a "better" class of cap on AVcc than you normally use for bypass, for instance...)

(The arduino analog circuitry is pretty ... lame.  The Uno R3 doesn't even have the ferrite bead (there's one in the USB circuitry, but the refernce schematic shows AVcc and Vcc directly connected.)  And then they go an attach "antennas" to the two pins that double as I2C, and to Aref...)

A ferrite bead is NOT "just an inductor". It has a lot of additional attenuation at high frequencies. A simple inductor helps, but, in many cases, a ferrite bead helps more.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

(has anyone designed a test circuit and software that tests the effectiveness of the AVcc filtering?   "We'll just slam this 80mA worth of LEDs on PORTB/PORTD with PWM and SPI going, while we try to read this highly accurate reference voltage from the ADC..."  OTOH, it's not really obvious to me that the AVR ADC is actually "good enough" to go to all this trouble in the first place...

I've use the ADC many times in the classic tiny's & megas, both with inductors & not..can't say that it made a major difference (unless you want to get down to 1 count of noise)..Of course I usually avg 4 samples for good measure anyhow, so perhaps I'm oblivious to any noise. Seems like an LC filter would do nice to minimize supply ripple & some hash, while the beads are mainly hash reduction (as westfw noted)...What you need to filter depends on what your supply & system brings to the fight.

http://www.analog.com/media/en/technical-documentation/application-notes/AN-1368.pdf

note they warn us about resonant peaking making things worse!

Resonance peaking is possible when implementing a ferrite bead together with a decoupling capacitor. This commonly overlooked effect can be detrimental because it may amplify ripple and noise in a given system instead of attenuating it. In many cases, this peaking occurs around popular switching frequencies of dc-to-dc converters.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

It would really help if the OP told us why he needs an LC on his AVCC, what type of VCC power supply they are using and what type of analog signals they intend to measure, please.  In many of my applications, VCC was tied to AVCC directly and we would average out in software any noise or use the noise to increase analog resolution by over sampling.

Jim

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274

I agree with #8. I usually don't need a fast sampling rate so I just use the oversample & decimate/average technique. In fact I tend to use a moving average to smooth the ADC signal, basically a software filter. In this case, the noise actually helps, as long as it's not correlated to the MCU clock, that one needs to be filtered out (but that's what the decoupling caps are there for).

What really is important, is that the voltage supply is stable vs. load changes (low impedance), or the ADC readings will be messed up. I once had the bad idea of having an underpowered power supply drive LED displays and the MCU at the same time, this caused VCC fluctuations that were really bad for analog accuracy. The fluctuations were just too big to be filtered out.

caused VCC fluctuations that were really bad for analog accuracy

Yeah, you can help that situation (sometimes a lot), by making your sensor signals ratiometric.  As the supply droops, so does the signal, in proportion (beware of signal cap filer delays).  A dial input pot works well in that manner.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Yeah, I need to give more thought to those ratiometric techniques.

Click on the below link for Microchip's (Formerly Atmel's) AT01080: XMEGA E Schematic Checklist

Check page 3 and 4 for Power Supply connections.

I know you're not using an XMega but the information still applies. They do a fair job at explaining why this helps.

ki0bk wrote:
It would really help if the OP told us why he needs an LC on his AVCC

From the opening post, it looks like he's just following what it says in the datasheet - and wondering why the Arduino does differently?

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...

ka7ehk wrote:
A ferrite bead is NOT "just an inductor".

So what is it, then?

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...

Nothing is "just an inductor", ideal inductors don't exist (like any other ideal component).

A ferrite bead is is a lossy inductor. The ferrite material, itself, is chosen to be lossy instead of minimizing loss as would be the case of a conventional inductor or transformer.

The model for this component is a series Rs, representing the DC resistance plus a parallel L and Rp. At low frequencies, the impedance of the L is small compared to Rp, so Rp is effectively shorted out, and the effective circuit is the series combo of L and Rs. At high frequencies, the impedance of L is high compared to Rp so L has little impact on the circuit, which is then effectively the series combination of Rp and Rs.

It is all in the material. Inductor -> low loss ferrite, suppressor bead -> high loss ferrite.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

thanks

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...

awneil wrote:

ki0bk wrote:

It would really help if the OP told us why he needs an LC on his AVCC

From the opening post, it looks like he's just following what it says in the datasheet - and wondering why the Arduino does differently?

Exactly. I really don't know if the LC filter is very necessary in the first place. I only know that if I can do things better by following the datasheet, I will do it.

I only want to read distance sensors, i guess it not need much accuracy. I have done this with an arduino nano and other boards without LC filter and the resulst are good enough. I dont use any buck/boost converter in my design, only a linear regulator.

I think my better option is place the low current inductor in the avcc pin that power the port F and leave the other avcc tied to vcc.

`I attach the schematic just in case.`

## Attachment(s):

Ivan Castillo. Engineering student from México. 21 years old.

This reply has been marked as the solution.

I would say that in a microcontroller based circuitry we have three frequency ranges:

1: frequencies generated by switching loads on and off, like PWM, LEDs, various communication interfaces like I2C, SPI, etc. These range goes from 0 to the core frequency

2. the core running frequency

3. parasite frequencies generated mainly by wires, PCB traces ringing due to unterminated lines. These frequencies goes well beyond the CPU running frequency up to many MHz.

Now, lets take the ADC apart and split it in two: 1. the analog circuitry like a bunch of OP AMPs, and the voltage reference used to compare the measured voltage against. The analog circuitry ideally should not be sensitive to the AVCC noise. It is less sensitive to lower frequencies than the higher ones. As for the core frequency, since it is generated inside the microcontroller, not much you can filter it out. The only way to get rid of it is to put the micro in some sort of sleep mode during the conversion. Regarding the third category, here a filter comes handy. These kind of frequencies could be generated by something else than the microcontroller itself. Every time an I/O is toggled, a ringing appear. Here a ferrite bead comes handy. Still, I would say that the AREF is the main part where things matter.

No filter can overcome the first type of frequencies. A bunch of LEDS could be turned on for half second, which can cause a drop of 10mV. No practical filter  would filter this out. The beauty is that this drop in voltage would not be sharp, so the analog circuitry is immune to it.

Inductor vs ferrite bead. A wire is an inductor in a medium with a certain magnetic permeability. If it is in the air, it is about air's magnetic permeability. An inductor that we know from day to day talk is a wire wound around something with a magnetic permeability. When you wind a wire, more chances that you wind it turn after turn, in one layer or more. These turns develop a capacitance between them. If you have multiple layers, the capacitance is even higher. Digikey gives a parameter for inductors called self resonating frequency. A quick look at their parts shows that inductors with one layer have higher self resonating frequency than those with multiple turns. As the frequency increases, the capacitance starts to be noticeable, which lowers the impedance of the inductor, lowering its filtering capability. On the other side, ferrite beads often is a wire passing not around, but through the ferrite, or a sort of coil with few turns where there is ferrite material between the turns, so the capacitance is non existent of very small. This is the reason they are effective at high frequencies.

Inductors are good to filter persistent noise frequencies, like ripple from a power supply, but cannot filter noise with DC component in it, like unpredictable load turned on or off. Noise from power supplies of any sort or DC-DC or AC-DC converters are in the range of few kHz up to few MHz. Beads ferrite are effective I would say from few MHz up.

Another aspect regarding the two: because in the case of an inductor the turns are wound around the core, they still emanate some of the magnetic field around the inductor which is not good from EMI point of view. You may have seen some of the power transformers with some copper shield around it, or PoE transformers with a metal shield over it. A ferrite bead does not have this problem because the conductor is entirely inside the ferrite material with much higher magnetic permeability than the surrounding air.

As for the original questions, I would say that if you don't want to spend the money for a good ferrite bead, then don't bother, tie AVCC to VCC, take more ADC samples and average them. Your analog sensors gives you at best about 1% accuracy, which your ADC easily surpass it.