Author Topic: MC34063 gives me ADC noise on AVR! :(  (Read 22308 times)

0 Members and 1 Guest are viewing this topic.

Offline shadewindTopic starter

  • Frequent Contributor
  • **
  • Posts: 329
MC34063 gives me ADC noise on AVR! :(
« on: March 01, 2011, 02:18:24 pm »
Okay, here we go again with my MC34063 problems. Now I think I've managed to calculate everything correctly but when using this circuit to power an AVR circuit with an ATMega8 controlling some LEDs using the ADC inputs, I get lots of ADC noise which makes the LEDs flicker. Everything worked perfectly when I was using a linear regulator.

http://www.onsemi.com/pub_link/Collateral/MC34063A-D.PDF

The one I have used is the one on page 7, bottom right (which isn't complete, I know but I've completed it with the one above).

The values and components are as follows:

Rsc = 0.22 ?
Input capacitor = 100 µF
Feedback resistors = 30 k? and 10 k?
Diode = SR304
External switching transistor = STX826
Timing cap = 680 pF
Inductor = 22 µH
Output cap = 100 µF

I'm feeding it 12V through a wall wart but I've calculated it to work with voltages down to 7 volts as well.

I've tried adding an extra LC-filter (another 22 µH and another 100 µF) but that didn't help. I've decoupled VCC and AVCC, each to ground with a 0.1 µF X7R cap. AREF is also decoupled in the same way. I've tried filtering AVCC through a series inductor as well but that does help. I've tried enabling the brown-out-detector to see if it resets because of crappy power but it runs fine. The only thing I have yet to try is look at the power through an oscilloscope since I don't have one :(

Is it my power circuit which is miscalculated or otherwise crappy? Is this a common problem? It all worked fine when using a linear regulator but I need more power with less heat.
« Last Edit: March 01, 2011, 05:51:30 pm by shadewind »
 

Offline tecman

  • Frequent Contributor
  • **
  • Posts: 444
  • Country: us
Re: MC34063 gives med ADC noise on AVR! :(
« Reply #1 on: March 01, 2011, 02:43:59 pm »
The issue of noise can be many faceted.  There is noise straight through the supply, common mode noise, and magnetically coupled noise.  You stated that you added an L-C filter with no effect.  So you now should look at common mode noise.  This can be coupled through the ground leg to the uProcessor.  Make sure that the leads are short and heavy enough for the peak currents.  Remember that the mail output cap on the 34063 sees large current spikes.  The wiring from the diode to the cap is also critical.  These runs should only contain power suppl currents as much as possible.  The output from the power supply should be pulled directly from the output cap, in terms of wiring.  The last item is the inductor.  What type of inductor is it ?  Is it too close to other sensitive wiring ?  Toroids are best for minimal leakage inductance.  Little straight wound chokes (look like resistors with windings on the outside) are the worst. 

One solution is to derive your AD ref from a small linear reg and use the 34063 for everything else.

I have a number of products using 34063s and see AD input noise under 10 mV.  Layout and design is critical.

paul
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: MC34063 gives med ADC noise on AVR! :(
« Reply #2 on: March 01, 2011, 03:11:48 pm »
It shouldn't be a surprise to anyone if 34063 produces noisy output voltage. 34063 is used because it is cheap, absolutely not not state-of-the art switch-mode regulator in noise sense. Biggest problem is subharmonic switching noise (which is for example in audio band) due to its naturally erratic (some call it hysteretic) operating principle.

You can see my measurements of the output (in step-down configuration) in here.

Regards,
Janne
 

Offline shadewindTopic starter

  • Frequent Contributor
  • **
  • Posts: 329
Re: MC34063 gives med ADC noise on AVR! :(
« Reply #3 on: March 01, 2011, 03:37:55 pm »
tecman: Well, I'm running everything as short as I can on the breadboard which is not easy. The inductor is a ferrite core radial one.

jahonen: Are saying this is to be expected when using the 34063? Because if I'll have to work really hard to make this work, it's probably better just getting another switcher. It's not like I'll have a fancy PCB with ground planes and stuff, it'll be a quick and dirty protoboard so if it doesn't work on a breadboard, it probably won't work there either. Any recommendations for nice but relatively cheap regulators?

As you've said, I could simply use a 7805 to power the MCU and analog stuff and then use the 34063 to power my LEDs (which is what'll require all ze power).
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: MC34063 gives med ADC noise on AVR! :(
« Reply #4 on: March 01, 2011, 04:57:22 pm »
Good that you mentioned the Breadboard, as it probably is the major contributors of noise in this case. Breadboard is a difficult environment for a switch-mode regulator, since loops and parasitic capacitances tend to be large, whatever the placement. Also, radial inductors tend to have relatively high stray field. I'd change that to something more shielded, but that is again difficult on a breadboard. However, I have many times soldered wires to a SMD-inductor and used it on a non-SMD-way in some occasions :)

What is your regulator configuration, step-down or step-up? What is the input voltage/output voltage and current? For step-downs, my usual choice for casual use has been LM2675, it is very simple to use and it usually works satisfactorily even with non-perfect layouts. For step-ups, LM2588 (5 A switch current) or LM2585 (3 A switch current) might do the job.

If the regulator fails to solve the problem, you might build the regulator on a separate copper clad board (using Jim Williams high-speed style :)), using it as a ground plane, and just connect this "sub-board" to breadboard using wires. This will eliminate ground-induced noise.

Regards,
Janne
 

Offline shadewindTopic starter

  • Frequent Contributor
  • **
  • Posts: 329
Re: MC34063 gives med ADC noise on AVR! :(
« Reply #5 on: March 01, 2011, 05:05:21 pm »
I was going to order the LM2575... any reason why the LM2675 is better?
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: MC34063 gives med ADC noise on AVR! :(
« Reply #6 on: March 01, 2011, 05:21:56 pm »
I was going to order the LM2575... any reason why the LM2675 is better?


Better is a bit strong word here, LM2675 has higher switching frequency, so smaller inductors can be used (I usually stick 68 µH or similar). LM2575 is probably also ok and has high voltage version also available, if needed.

Regards,
Janne
 

Offline shadewindTopic starter

  • Frequent Contributor
  • **
  • Posts: 329
Re: MC34063 gives med ADC noise on AVR! :(
« Reply #7 on: March 01, 2011, 05:49:57 pm »
I went with the LM2675 with a 47µH inductor as per Nationals recommendations. We'll see how that goes. I don't expect it to suddenly work given the less than stellar circumstances (breadboard) but from what I understand, MC34063 is really the worst you can get :)

Anwyay... how will lowering the input voltage affect the output voltage with no other parameters changed?
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #8 on: March 01, 2011, 06:16:52 pm »
I went with the LM2675 with a 47µH inductor as per Nationals recommendations. We'll see how that goes. I don't expect it to suddenly work given the less than stellar circumstances (breadboard) but from what I understand, MC34063 is really the worst you can get :)

Anwyay... how will lowering the input voltage affect the output voltage with no other parameters changed?

Lowering the input voltage is not usually a problem (unless it stays above the minimum specified for a regulator chip), it just reduces inductor ripple current and thus output voltage ripple. Thus there is no problem with using lower than nominal input voltage, inductor is just not optimal in cost-sense (unnecessarily large) but in performance sense, no problem or even better.

Regards,
Janne
 

Offline tecman

  • Frequent Contributor
  • **
  • Posts: 444
  • Country: us
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #9 on: March 01, 2011, 08:36:42 pm »
I would not call a 34063 "the worst possible".  Since it requires a number of discrete components, physical design and layout are more critical.  Most of the high current components are external, so their placement is where to pay attention.  Since it is a current mode switcher, overall noise inducing factors are actually lower than some other chips.

paul
 

Offline tecman

  • Frequent Contributor
  • **
  • Posts: 444
  • Country: us
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #10 on: March 01, 2011, 08:39:13 pm »

I would not call a 34063 "the worst you can get".  Since it requires a number of discrete components, physical design and layout are more critical.  Most of the high current components are external, so their placement is where to pay attention.  Since it is a current mode switcher, overall noise inducing factors are actually lower than some other chips.

I agree with jahonen that breadboarding any switcher can be a big problem due to poor grounding and current carrying paths being far from optimal.

paul

 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #11 on: March 01, 2011, 08:52:56 pm »
When I first measured 34063 I thought it is broken (switch node waveform seems erratic), but I found out that the effect what I observed is actually described by OnSemi:

AN920-D says:

Quote
The error amplifier again monitors the output voltage, compares it to the reference level and generates a control signal. If the output voltage is below nominal, the control signal will go to a high state and turn on the gate, thus allowing the oscillator clock pulses to drive the series?pass element alternately from cutoff to saturation. This will continue until the output voltage is pumped up slightly above its nominal value. At this time, the control signal will go low and turn off the gate, terminating any further switching of the series?pass element. The output voltage will eventually decrease to below nominal due to the presence of an external load, and will initiate the switching process again.

This process invariably produces subharmonic noise since there is no stable operating point (see my measurements, it produces peculiar multi-level ripple). Of course, the good thing about simple operation that it can't be unstable, regardless of the filter capacitor ESR etc. since there is no regulating loop in same sense than in conventional regulators. I wonder if bad reputation of SMPS in audio applications is due to 34063 or something like that. But at least it is very cheap, certainly adequate for many applications.

Regards,
Janne
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #12 on: March 02, 2011, 12:31:01 am »
When I first measured 34063 I thought it is broken (switch node waveform seems erratic), but I found out that the effect what I observed is actually described by OnSemi:

AN920-D says:

Quote
The error amplifier again monitors the output voltage, compares it to the reference level and generates a control signal. If the output voltage is below nominal, the control signal will go to a high state and turn on the gate, thus allowing the oscillator clock pulses to drive the series?pass element alternately from cutoff to saturation. This will continue until the output voltage is pumped up slightly above its nominal value. At this time, the control signal will go low and turn off the gate, terminating any further switching of the series?pass element. The output voltage will eventually decrease to below nominal due to the presence of an external load, and will initiate the switching process again.

This process invariably produces subharmonic noise since there is no stable operating point (see my measurements, it produces peculiar multi-level ripple). Of course, the good thing about simple operation that it can't be unstable, regardless of the filter capacitor ESR etc. since there is no regulating loop in same sense than in conventional regulators. I wonder if bad reputation of SMPS in audio applications is due to 34063 or something like that. But at least it is very cheap, certainly adequate for many applications.

Regards,
Janne

If I understand correctly, this seems to lead to the use of a low value capacitor on the output (possibly followed by another LC filter). If the cap is small enough, the limit-cycle should happen into one switching (clock) cycle, thus avoiding most of the sub-harmonics you mention.
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline shadewindTopic starter

  • Frequent Contributor
  • **
  • Posts: 329
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #13 on: March 02, 2011, 03:39:19 pm »
UPS arrived with my components from Farnell today (it's crazy how fast Farnell is) and I tried out the LM2675N-5.0, that is the fixed 5V version. I wired it up in just a couple of minutes and it worked perfectly on the first try with no noticable noise on the ADC inputs. Think I'll stick with this one ;)
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #14 on: March 02, 2011, 04:08:41 pm »
Nice to hear that it worked. LM2675 is really "simple switcher", hard to go wrong with it.

Regards,
Janne
 

Offline shadewindTopic starter

  • Frequent Contributor
  • **
  • Posts: 329
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #15 on: March 04, 2011, 03:25:21 pm »
A question here... how important is the choice of the input and output capacitor here? The data sheet gives advice on specific models which all have a very high price in common. There doesn't seem to be anything in common between the suggested capacitors... the capacitances are not even in the same ballpark with one of the suggested ones for a 22µH inductor having a capacitance of 220µF and another one having a capacitance of 2200µF!

What should I choose?
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #16 on: March 04, 2011, 03:39:43 pm »
Basically, input capacitor should be large enough to withstand the input RMS ripple current (which is half of output DC-current worst case if duty cycle is 50%), and output capacitor should be large enough so ESR-related ripple is small enough. Capacitance itself does not usually dominate very much, usually ESR-related constraints mentioned are more significant.

Regards,
Janne
 

Offline shadewindTopic starter

  • Frequent Contributor
  • **
  • Posts: 329
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #17 on: March 04, 2011, 03:44:00 pm »
How is the ripple related to the ESR of the output capacitor?

*goes googling*
 

Offline shadewindTopic starter

  • Frequent Contributor
  • **
  • Posts: 329
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #18 on: March 04, 2011, 04:03:10 pm »
What's worse is that nearly all of the recommended models I checked have been discontinued!
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #19 on: March 04, 2011, 04:38:39 pm »
What's worse is that nearly all of the recommended models I checked have been discontinued!

Just find some good low-ESR (or low-Z) from brand name manufacturer (like Sanyo, Panasonic, Nippon-Chemicon etc.), and you'll be just fine (at least if we are still talking about LM2675).

Regards,
Janne
 

Offline shadewindTopic starter

  • Frequent Contributor
  • **
  • Posts: 329
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #20 on: March 04, 2011, 04:45:00 pm »
I'm actually talking about the LM2676 now since I need a bit more power for another project. And the capacitance doesn't really matter, or what?
 

Alex

  • Guest
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #21 on: March 04, 2011, 10:51:51 pm »
Just a little contribution, did not want to start a new thread. When designing a boost converter with the MC34063, you must make sure that the duty cycle is not more than 0.857 or 85.7%.

This is a limitation due to the internal design of the IC and it is often overlooked. It is not stated on the datasheet (ON semi) but it is stated in the application note (ON semi again).

I saw a published circuit that did not consider this so I though I would bring it to your attention. It is fine on Dave's  blog #110 (75%) but the limitation was not mentioned.
 

Offline shadewindTopic starter

  • Frequent Contributor
  • **
  • Posts: 329
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #22 on: March 05, 2011, 01:26:28 am »
Just a little contribution, did not want to start a new thread. When designing a boost converter with the MC34063, you must make sure that the duty cycle is not more than 0.857 or 85.7%.

This is a limitation due to the internal design of the IC and it is often overlooked. It is not stated on the datasheet (ON semi) but it is stated in the application note (ON semi again).

I saw a published circuit that did not consider this so I though I would bring it to your attention. It is fine on Dave's  blog #110 (75%) but the limitation was not mentioned.

Good to know! I will probably not use the MC34063 for this project since the LM2676 requires much fewer parts and provides 3A without external transistors but who knows in the future :)
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #23 on: March 05, 2011, 07:24:34 am »
I'm actually talking about the LM2676 now since I need a bit more power for another project. And the capacitance doesn't really matter, or what?

At least for electrolytics, if the ESR is acceptable, then the capacitance is also. This is supported by the fact that if one calculates necessary capacitance for certain amount of ripple (ignoring ESR for a while), it is usually ridiculously small. Thus in practice one ends up with much greater capacitance due to ESR reasons. If you look at the sizes of recommended oscons versus electrolytics, you'll notice that recommended oscons have much smaller capacitance. Oscons tend to have very low ESR values compared to their capacitance. LM2676 seems not to be particularly sensitive to low-ESR output capacitors, since oscons are mentioned in the datasheet.

Regards,
Janne
« Last Edit: March 05, 2011, 07:27:28 am by jahonen »
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: MC34063 gives me ADC noise on AVR! :(
« Reply #24 on: March 05, 2011, 12:32:12 pm »
Just a little contribution, did not want to start a new thread. When designing a boost converter with the MC34063, you must make sure that the duty cycle is not more than 0.857 or 85.7%.

This is a limitation due to the internal design of the IC and it is often overlooked. It is not stated on the datasheet (ON semi) but it is stated in the application note (ON semi again).

I saw a published circuit that did not consider this so I though I would bring it to your attention. It is fine on Dave's  blog #110 (75%) but the limitation was not mentioned.

What's the problem with high duty-cycles? Is it related to the small time interval between two switching events? I don't see any other reason, even thinking of stability.
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf