What power supply makes an AVR "Happy"?

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

Ok heres the scenario, I am playing with LTSpice trying to make a nice smooth SMPS (32Khz) power supply for my AVR.

I can throw big caps and big inductors at it to get a nice smooth supply (but increasing the cost of the design). However will this make any difference in the grand scheme of things? Will the only difference in the universe be that I feel happy about my smoother supply, but the micro is functioning identically, and is just as robust?

I am not using the ADC.
So what are the ripple requirement to make the micro never skip a beat, and not damage/degrade it (if such a thing can happen from a repetitive spikey supplies).

As we all know engineering is a trade off, but what is the goal?

I checked out the electrical section of the datasheet with no joy.

And out of interest, with an AT90CAN32, in the bypass capacitors for a 4MHz clock, it recommends two bypass capacitors. Since I am the sucker who will be placing double caps multiple times on these boards, do I really need two different Values (the datasheet recommends 560nF and 120nF)?
Can I just slap one or two parallel 220nF (easier when its comes to buying)? I am sure it will still run, but how does one measure such robustness degradation?

Just a noob in this crazy world trying to get some electrons to obey me.

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

In theory, the double bypass capacitors are an attempt to use the self inductance of each capacitor to create a series tuned resonance path to ground. Supposedly you are shooting for these self resonance frequencies to be related to the AVR clock frequency. Nice theory, but your results may vary. There is some controversy about if this helps or hurts, but this is all based on more theory. Typically, the smaller the capacitor value the less self inductance the capacitor has. In some cases a single very large value bypass capacitor will look more inductive to very high frequency Vcc noise and fail to some degree to bypass this type of noise. If your EMC requirements are stringent, then dual bypass capacitors or more exotic types of capacitors are a small part of one possible approach to the magic art of EMC compliance. If you choose a single bypass capacitor ignore the data sheet and forget about a 220 nf value which was never recommended anyway.

The answer is no, a single capacitor will not substitute for both capacitors when attempting to achieve the data sheet recommended two capacitor reduced EMC (maybe, maybe not) design.

Another thing is the larger value capacitor which is not as effective at bypassing higher frequencies will provide a larger AVR current spike reservoir, with a short path between the chip power pins before this current spike gets to the ground plane. The smaller capacitor then takes over and bypasses the higher frequency noise. More theory, but usually totally insignificant compared to all the other variables in the art of EMC.

Last Edited: Sat. Mar 19, 2011 - 11:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could measure the closest approach with a tesla coil. Don't get too close or you'll have to replace the MCU each time.

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

Quote:
Can I just slap one or two parallel

I think this is the variable we are not able to calculate/simulate actually. Is/are the caps big enough, does it have adequate ESR or inductance, is it close enough? And in PDIP40 or MLF20? And if the source is low or high impedance? But when I PWM inductive sink at 5MHz, will the cap be ok?
Atmel gives guidelines which guarantee performance under "typical" conditions, how far it is from my design? I know an AVR without a cap works till you start switching inductances with IOs. But what kind of function..

Quote:
So what are the ripple requirement to make the micro never skip a beat

    - du/dt < some_threshold or - sqrt(int((x-mean(x))^2))

    Anybody has the idea on how to check my cap is not 10 times too low or too high (in terms of RLC)? Decrease values till AVR starts making stupid things, then mount twice as much in a final design?

No RSTDISBL, no fun!

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

If you are not using the ADC or the analog comparator, just go cheap and take the straightest path.

I would only go SMPS due to thermal problems with linear regulators.

In every mundane aspect of design is a universe of study. You could spent an eternity perfecting your SMPS and lose sight of the overall design.

Dual caps serve a useful purpose, the smaller cap takes care of quick transients, the larger cap for slower transients. It is an over simplification, but I think it is a reasonable approximation for majority of applications.

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

Mike B wrote:
There is some controversy about if this helps or hurts, but this is all based on more theory.
:lol:

Mike B wrote:
The answer is no, a single capacitor will not substitute for both capacitors when attempting to achieve the data sheet recommended two capacitor reduced EMC (maybe, maybe not) design.
So the dual caps is just to reduce the EMI? It does not make the micro any more robust?
I have no EMC restrictions, but I would like to my design as simple as possible. So every resistors becomes 10K or 1K, and every cap becomes 220nF (1206).

The datasheet says the following:

Quote:
The operating frequency (i.e. system clock) of the processor determines in 95% of cases the
value needed for microcontroller decoupling capacitors.
But it doesnt say what it is all in aid of. It is nice to know its about EMI, thank you Mike!

Just a noob in this crazy world trying to get some electrons to obey me.

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

toalan wrote:
If you are not using the ADC or the analog comparator, just go cheap and take the straightest path.

I would only go SMPS due to thermal problems with linear regulators.

In every mundane aspect of design is a universe of study. You could spent an eternity perfecting your SMPS and lose sight of the overall design.

Dual caps serve a useful purpose, the smaller cap takes care of quick transients, the larger cap for slower transients. It is an over simplification, but I think it is a reasonable approximation for majority of applications.

I am getting my 5V from a 24V supply. So I cant think of anything better than SMPS (using a MC34063AD, its cheap, but only switches at 32KHz, I cant find anything that is better but commonly available).

I played with the following idea:
24V -> Linear 18V Reg -> Linear 12V Reg -> Linear 5V Reg. But it just seem too stupid to implement.

I am only powering a AT90CAN32, 8 LEDs at an average of 30% duty cycle. And maybe another 20mA of odds and ends in resistors and driver chips for the LEDs.

Just a noob in this crazy world trying to get some electrons to obey me.

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

dak664 wrote:
You could measure the closest approach with a tesla coil. Don't get too close or you'll have to replace the MCU each time.
:lol:

Just a noob in this crazy world trying to get some electrons to obey me.

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

Brutte wrote:
Anybody has the idea on how to check my cap is not 10 times too low or too high (in terms of RLC)? Decrease values till AVR starts making stupid things, then mount twice as much in a final design?
lol that does make good logical sense.

I suppose one could check how many times it resets, or make it loop though doing a series of calculations and output the results each time.

Just a noob in this crazy world trying to get some electrons to obey me.

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

Figure 8 in the data sheet gives you a practical example.

It quotes 120mV ripple (40mV with optional LC filter).

I would think that any AVR will work fine with this supply. Make sure that you use 100nF caps close to the VCC,GND pins.

If you were using the ADC, I would suggest additional smoothing. If you had a very critical application, using the Buck to reduce to 7V, then a LDO linear regulator to drop down to 5V or so.

Life should not be very complicated. Copy a reference design, and observe the behaviour on a scope. Whinge loudly to the manufacturer if the reference design does not perform as claimed.

David.

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

24v to 5v, I can see the need for a switching regulator. 32khz is a very low switching freq, you will need a big inductor, and you will probably be in discontinous mode due to your small load.

A slightly better switcher is the lm2575, it is a common IC and pretty cheap, I think the switching freq is around 50khz. You will probably still be running in discontinous mode.

Nothing wrong with running the inductor in discontinous mode, for knit pickers it might be a source of obsession.

If it was me, I would go 24->14.5->5v use a lm317 for the 14.5 and the 5v, use external resistors to set the voltage on the lm317. I am guessing you load is ~50ma, so each regulator has to dissipate 500mw, use the pcb for heatsinking on a t220/dpak package. Whether you run into thermal problems would depend on the ambient temperature and airflow. With this I figure you will still be ~$2 ahead in terms of component cost wrt to a low end SMPS, and your ripple on the 5v line will be much better than a low end SMPS.

Edit: I have an affinity to the Lm317, I think it does a kick ass job at voltage regulation since it has an external feedback pin where you can put caps to increase ripple rejection. Even cheaper than a 5% regulator, with 2x 1% resistors it can rival the accuracy of a 1% regulator. It is also widely available from multiple sources, and can be used for many other applications, input voltage range when used as a voltage regulator is better than most low end vreg ICs. Viva lm317!!!!!!!!!!!!!!!!

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

Quote:
I am getting my 5V from a 24V supply.

Quote:
I would like to my design as simple as possible.

Quote:
I am only powering a AT90CAN32, 8 LEDs at(...)

Let me guess, you need 50mA @ 5V and you have decided to put SMPS.. Then the only reasonable explanation is it is powered from a 24V battery in a remote location where energy costs 1000$/kWh.

If not, use LM317 (the smallest version available is for 200mA)or 7805 + series resistor.

Quote:
I have an affinity to the Lm317

Me too..

Quote:
Even cheaper than a 5% regulator

LM317 has overcurrent shutdown, thermal shutdown (works up to 150*C) and costs 0,13$. Where can you get such 0,2A SMPS for 2,6$?

No RSTDISBL, no fun!

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

MC34063AD 24V to 5V configuration in reference design reliably works in one industrial designed controller PSU for a machine. No issues at all comparing to other parts of the machine that fail (more than a decade of records).

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

Quote:
Even cheaper than a 5% regulator

Now I can see I missunderstood this "5%". You meant LM317 is cheaper than 5% linear regulators of 78xx family. Well I understood it is 20x cheaper than SMPS..

No RSTDISBL, no fun!