Shop OBEX P1 Docs P2 Docs Learn Events
Using a switching regulator, unclear what speed to choose. — Parallax Forums

Using a switching regulator, unclear what speed to choose.

rwgast_logicdesignrwgast_logicdesign Posts: 1,464
edited 2012-10-16 03:33 in Propeller 1
Ok so im designing a propeller board for a friend which is going to be used as the main sensor interface for a PC built in to a robot. I have thoroughly went over all the requirements with him and gave my input. One of the biggest requirements is the ability to step down from a higher voltage maybe in the 12-18v area to 3.3vs without wasting a ton of the battery. After doing a bit of research ive decided a switching regulator will be the best way to go. I have a few buck boost chips somewhere although im not sure they will be what I use. So right now most any chip in a through hole package is open for consideration.

Ive been doing alot of reading on ee-times and other places about using switching regulators and how to propely filter the noise etc. One thing im unsure about is what speed regulator I need and exactly how you figure that out. Ive seen desing powering pics with 1000khz, to design up to 6mhz. I plan to use an mcp3208 ADC on the board too, im not sure between that and a propeller exactly how fast of a regulator I need to use, I think the ones I have a 2.2mhz but there older so im sure there going to have alot more noise than something more modern which is not a good thing to deal with when designing your first switching regulator supply especially if you dont have a scope.

Any info from someone who has set up switching regulation before would be greatly appreciated.
«1

Comments

  • groggorygroggory Posts: 205
    edited 2012-10-08 15:36
    I went with an ADP2108 for my design. Works great. Low parts count. Very stable. High accuracy. I really like this chip.

    When you lay it out, follow the reference design to the letter. Switcher PCB layout is tricky.

    EDIT...sorry. My chip will not do ya. Your input voltage is too high. Still...nice chip for a smaller input voltage. :-)

    ...For ease of use, look into the simple switcher line of integrated high power switching regulators.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-10-08 15:41
    A lot depends on how much current you need and how much board space you can spare. The sizes of your inductors and capacitors will decrease with frequency and increase with current requirements. The switching regulator and transistor costs tend to increase with frequency.

    -Phil
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-10-08 15:46
    I use the simple switchers from National Semiconductor on all my propeller projects, eg LM2574 for the 3.3V. One inductor and one diode, plus the input and output caps. Fixed 52khz frequency, so if you want you can filter that out eg page 16 of the datasheet http://www.futurlec.com/Linear/LM2574HVN.shtml recommends a 20uH and 100uF LC filter for 10x reduction in ripple.

    52khz is above audio frequencies and to my ears, my propeller playing Bach on a .wav file via high quality headphones has no audible noise.

    In theory, going by the switcher data sheet, if there is 1% ripple (without that LC filter) then there will be an error on an A to D of 1% if you were sampling faster than 52khz. Less than 52khz and the errors will average out. Add that filter and it will be 0.1%. Since the A to D uses very little current, you could also use a RC filter after that for even more reduction. Bypass caps on the A to D chip have this effect as well as the R is the PCB track.
  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2012-10-08 16:04
    If you are pulling less than 2.25 amps, Texas Instruments has a really nice series of DC-DC converter modules. The PTH series is one that I have used before. The PTH08080WAH is a 12 wat version and handles Vin from 4.5 to 18 volts. The output is adjustable from 0.9-5.5 volts. Designed as surface mount, but can be utilized in a TH manner if needed
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-10-08 17:34
    Google search the forum threads, seems I saw something a while back posted by Peter Jakacki on just this thing. Maybe he will answer up or you could always PM him. Also, if you are thinking of building one, you could always check out TI (formerly National Semiconductor) web bench and design it yourself.

    Web bench works and will do the whole design for you, even offer you a prototype and give you a price for it. Just slapped together a 500khz 5-9vdc down to 3.3V switcher for test to see if it still works. Yep....

    Frank
  • ZootZoot Posts: 2,227
    edited 2012-10-08 17:51
    An alternative to rolling your own may be using a ready-to-drop-in switching regulator module, often available in the $11-$15 range, 2-3A, high input voltages. Meant as a drop-in replacement for linear regulators like the venerable 78xx. The cap(s), inductor, regulator, etc. are all on a tiny PCB that can be dropped into through-holes on the main board. Do a search at Digikey and you'll turn up lots of examples, e.g. http://www.digikey.com/product-detail/en/V7803-2000R/102-2187-ND/2352146
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-10-08 17:53
    Google search the forum threads, seems I saw something a while back posted by Peter Jakacki on just this thing. Maybe he will answer up or you could always PM him. Also, if you are thinking of building one, you could always check out TI (formerly National Semiconductor) web bench and design it yourself.

    Web bench works and will do the whole design for you, even offer you a prototype and give you a price for it. Just slapped a 500khz 5-9 down to 3.3V switcher for test to see if it still works. Yep....

    Frank
    Ahem, I was going to butt out of this one as there are lots of reasons why people would choose these "simple" switchers and mainly it's because the big bulky parts are easy to get and easy work with as well as keeping the equipment warm :)
    http://forums.parallax.com/showthread.php?133717-Switch-mode-power-supplies&highlight=5010
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-10-08 18:23
    Get one of Peter's boards!

    In general, the faster they run, the smaller the components (and the smaller the filtering components too, if indeed you even need them).

    Nice work Peter.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-10-08 21:51
    Ahem, I was going to butt out of this one as there are lots of reasons why people would choose these "simple" switchers and mainly it's because the big bulky parts are easy to get and easy work with as well as keeping the equipment warm :)
    http://forums.parallax.com/showthread.php?133717-Switch-mode-power-supplies&highlight=5010

    Sorry bout that. Guess it's hard to run from one's internet history.........
    FF
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-10-08 23:23
    Ok guys thanks im lookin through peters thread ill check out the TI workbench Ive never even heard of it.

    I looked up the mcp3208 specs it [FONT=Arial, Helvetica, sans-serif]has a 100 ksps sample rate, so according to Dr_Acula this means my switching regulator would have to be capable of at least 100khz in order to not cause noise on the ADC?[/FONT]
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-10-09 01:30
    Hey RW,

    I have been working with the MCP3201 so far, and have pushed it to its maximum sample rate (note only get 100ksps @ 5V supply, remember the limiting resistor between MCP320x data out and the prop pin you are using for input). I may be wrong on this next part as I have not played yet with the MCP3208, but if you use more than one channel, you will not get 100ksps on all 8 channels. The specs call for a clock frequency of 20*sample rate so you have a 2MHz clock rate for the device. (3201 only requires 15 clk pulses as no channel select or single/diff input select/ 3208 needs 4 pulses just to set up the channel for conversion). My reasoning (correct me if I am wrong 3208 users) is that if the conversion part of the device is 100ksps then by sampling all eight channels then each channel will only be sampled 100ksps/8 channels. So while a single channel could theoretically sample 100ksps if you are sampling on all 8 channels then each channel is now sampled at 12.5ksps and because nyquist sampling theorem says that the highest frequency present in the input signal can not be allowed to exceed 1/2 of your sample rate now you are down to 6.25KHz as the highest frequency allowed into the sample system.

    This was stuff I saw when I went off on a long detour down the analog / digital / analog garden path a few months ago. Objects, scope shots etc in other threads...

    As to the noise, it will probably average itself out in any event given enough samples as the odds of your sample clock and the ripple being in phase at any given point in time is pretty remote.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-10-09 18:37
    you are right frank but I have to design to account for the user only using one channel on the ADC, not saying thats always true but it could very well happen.

    Im not really understanding what your trying to explain to me about the nyquist sampling theorem, Are you saying saying I cant have a regulator switching at frequencies over 1/2 of my sample rate?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-10-09 19:17
    RW, don't try to correlate the frequency of the switching regulator with the sampling frequency of the ADC, they really don't have anything in common and besides there is always some noise on the supply lines even with linear regulators.
    Have you read any good books lately?
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-10-10 09:32
    Seconding what Peter said.

    When you look at the data sheet for the MCP3208, be sure to pay close attention to what they say in section 6.4 Layout Considerations and 6.5 Utilizing the Analog and Digital Ground pins. They also suggest their app note, AN688,“Layout Tips for 12-Bit A/D converter Applications”.

    There is a graph in the data sheet that touches on power supply rejection.
    Screen shot 2012-10-10 at 9.21.49 AM.png


    What that means is that slow (<10Hz) changes in the power supply voltage have little effect on the digital reading. But ripple at higher frequencies degrades the accuracy. It doesn't show anything above 10kHz, so that is anybody's guess. The bottom line: Keep the power supply quiet, good bypassing, and follow the layout advice.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-10-10 11:42
    you are right frank but I have to design to account for the user only using one channel on the ADC, not saying thats always true but it could very well happen.

    Im not really understanding what your trying to explain to me about the nyquist sampling theorem, Are you saying saying I cant have a regulator switching at frequencies over 1/2 of my sample rate?

    Sorry to add confusion to your question. The sampling was in regard to the number if channels and your looking at the mcp3208. Probably should have started a different thread. If you can find a copy of Caxton Foster's "Programing in Realtime" it has a very good and understandable section on sampling and digital filtering.

    As to supply and layout, check the appnotes Tracy calls out. Also, check out a book called "A Bakers Dozen" by TI engineer Bonnie Baker, really good practical material on this area. (don't recommend the e-version of this however) Again, sorry to mix topics.

    Frank
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-10-10 11:53
    Hey RW and anyone else, here is a cool link to check out.....

    http://www.edn.com/rss/ContentGroup?contentItemId=4238440

    FF
  • ManAtWorkManAtWork Posts: 2,176
    edited 2012-10-11 03:02
    http://www.national.com/ has a really nice design tool called WEBENCH designer. Just enter your requirements and it will suggest which chip to use. You can also adjust wether you want to optimize for board space, efficiency or low cost. It also makes suggestions which inductors, diodes ect. to use.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-10-11 15:00
    @tracey

    the graph you posted says its in khz at the bottom so wouldnt this mean i should stay under 10khz not 10hz and things look noisy at 1mhz+? just want to make sure im reading things right. This is going on a real pcb so ive got one shot to get it right. i will definately take the adc layout notes in to consideration, thanks for the tip on the app note.

    before writing this post i came across this article

    http://www.eetimes.com/design/power-management-design/4214526/Use-a-switching-regulator-to-power-a-hi-speed-ADC--without-significantly-sacrificing-performance

    i was basically just trying to figure out how switching speed effects a circuit which im still unclear on, but i found this article and it sort of spooked me that id have a noisy inaccurate adc if i didnt pick the right frequency regulator.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-10-11 15:15
    @tracey

    the graph you posted says its in khz at the bottom so wouldnt this mean i should stay under 10khz not 10hz and things look noisy at 1mhz+? just want to make sure im reading things right. This is going on a real pcb so ive got one shot to get it right. i will definately take the adc layout notes in to consideration, thanks for the tip on the app note.

    before writing this post i came across this article

    http://www.eetimes.com/design/power-management-design/4214526/Use-a-switching-regulator-to-power-a-hi-speed-ADC--without-significantly-sacrificing-performance

    i was basically just trying to figure out how switching speed effects a circuit which im still unclear on, but i found this article and it sort of spooked me that id have a noisy inaccurate adc if i didnt pick the right frequency regulator.

    There is something to running an ADC straight off a switching supply without sufficient ripple filtering but the biggest worry is ground noise and cross-coupled noise etc from a poorly laid out pcb. Besides, I practically never run directly from the switching regulator, it is much easier to switch down to 5V and then run this into one or more 3.3V LDO regulator and ripple is never an issue.
  • TubularTubular Posts: 4,703
    edited 2012-10-11 18:35
    There is something to running an ADC straight off a switching supply without sufficient ripple filtering but the biggest worry is ground noise and cross-coupled noise etc from a poorly laid out pcb. Besides, I practically never run directly from the switching regulator, it is much easier to switch down to 5V and then run this into one or more 3.3V LDO regulator and ripple is never an issue.

    I second what Peter says. Switcher to 5v then LDO to 3v3.

    One option for up to 28v input to 5v output, at 500mA, are these. $2.85, qty 1 at Digikey. Little bit more at mouser ($3.25) or Newark. If you want cheaper you can always plug in a 7805 and reduce supply voltage, or dissipate the heat.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-10-11 20:44
    So are these just a drop in replacement for an ldo? that pdf is pretty brief
  • TubularTubular Posts: 4,703
    edited 2012-10-11 21:22
    Kind of. They are a drop in replacement for a regulator, but they regulate by switching rather than dissipating heat. The switching means they are a little bit "noisier" than a linear regulator (eg 7805, or a LDO version thereof). In general the noise can be reduced just by adding more external capacitance. This is the reason Peter suggests using a switcher to reduce the 12-24v down to 5 volts, at an efficiency ~ 85%. Then using a LDO regulator can give you a nice clean 3v3 for the ADC and propeller to work from.

    "LDO" means low dropout voltage - its just a variant of linear regulator that needs say < 0.5v headroom to operate, whereas a traditional 7805 might need a few volts to regulate correctly. This is why you'll see products that like 7.5v ~ 9v input - enough headroom above 5v to regulate correctly, but not too much heat to dissipate.

    Yes I agree the datasheet is brief. It would be good to see some more graphs in it. There are nicer products out there, or you could design your own based on suggestions others have offered and learn something in the process. But without a good reason to justify your own design, sometimes it's possible to get by with a $3 off the shelf module like these. "Learning" is an entirely valid reason, but its always good to keep in mind the alternatives out there.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-10-11 23:11
    i was just surprised these were full modules no inductors or anything like that needed. most modules modules especiallys those designed as a drop in replacement for ldo's are 10 to 20. do u know if they sell a 1amp version?
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2012-10-12 00:45
    @ Dr_Acula

    Back in post #4 you said that 52KHz was beyond your hearing.

    Is that just while you hold a human form? I would have thought that once you have wrapped yourself in your cloak, tranformed and then off into the night, a 52KHz noise would represent a significant hazard to your navigation systems ;-)
  • TubularTubular Posts: 4,703
    edited 2012-10-12 13:06
    i was just surprised these were full modules no inductors or anything like that needed. most modules modules especiallys those designed as a drop in replacement for ldo's are 10 to 20. do u know if they sell a 1amp version?

    There certainly are, eg this one that puts out up to 1.5 A
    http://www.digikey.com/scripts/DkSearch/dksus.dll?lang=en&vendor=0&WT.z_cid=ref_findchips0311_dkc_buynow&mpart=OKI-78SR-5%2F1.5-W36-C&cur=USD

    There are others in the Recom range that are 1 amp (some may be isolated, some non-isolated), Cui also make some. But the above one seems good value. Just search for dc/dc converters on the supplier sites.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-10-15 20:07
    Since there have been a couple of good links to affordable switching modules I came across this one after a tip from Clus99. The price is only $2.32 in 100 qtys and they have heaps of stock.
    http://au.mouser.com/Search/ProductDetail.aspx?R=R-78E5.0-0.5virtualkey99990000virtualkey919-R-78E5.0-0.5




    Input Voltage Range:
    7 V to 28 V








    Number of Outputs:
    1








    Output Voltage (Channel 1):
    5 V








    Output Current (Channel 1):
    500 mA









    Package / Case Size:
    SIP-3








    Series:
    R-78E




  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-10-15 21:35
    @Peter

    That is the same module Tublar posted looks pretty nice for the price especially, Ive decided to use the adjustable vesion of the LM chips Dr_Acula is using. I got 5 dip packages on the way, Im going to attempt to make seperate 3.3 and 5v switching rails, and just make sure I do the best job filtering I can. These chips operate in a good frequency that doesnt cause to many problems on the ADC to begin with when you look at the chart Tracy posted. 52khz is pretty mid range as far as analog interference with the mcp2308 so im guessing with a filter I should be just fine. The ADC needs a 5v power rail to operate at full speed anyways so using an LDO to step to 3.3v isnt going to help the noise interference on the ADC.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-10-15 22:05
    Oh yeah, it is the same one except Digikey has almost nil stock. Use the recommended post filter (inductor and cap) on the switching reg if you are going to run directly from it. Alternatively if you can adjust the switching reg to around 5.5V or more then you could feed that into an LDO for a nice clean 5V.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2012-10-16 00:27
    @ Dr_Acula

    Back in post #4 you said that 52KHz was beyond your hearing.

    Is that just while you hold a human form? I would have thought that once you have wrapped yourself in your cloak, tranformed and then off into the night, a 52KHz noise would represent a significant hazard to your navigation systems ;-)

    Darn, foiled again!

    Re posts over the last day, I like the idea of using a switcher to get 5V then a LDO linear regulator to get 3.3V. Efficiency plus low noise.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-10-16 03:33
    So if I take these adjustable switching regulators and make them lets say 3.8 and 5.5 which supply 500mA, and then stick a 500mA 3.3 and 5.5 LDO after them am I going to lose any efficiency? This seems alot like cheating!! I mean obviously ill be losing the half of volt burned in the LDO but beyond that will this make the switcher less efficient somehow? If I go this route do I still need to filter the ripple?

    I had planned to do both 500mA rails with the switcher to save every last bit of power, I figured with the frequency of the switcher I chose the ADC and prop should work fine as long as I add the filters after the switcher use good decoupling throughout the PCB, and do my best to make a ground plane for analog and digital connected by a 1 mill trace or something. Do you guys for see any problems with this? When decoupling the prop I usually use

    2x Ceramic x7r .1uf
    2x Ceramic x7r 10uf
    1x Tant 33uf on crystal side only, under pcb

    I also place my 3.3v LDO as close as possible to the propeller and I can overclock to 104 mhz up to 112 mhz running that intense turbulance VGA/Sound demo. Do you think by moving to a switcher only I will lose the ability to OC this well? I was thinking about maybe using something like a current adjustable LDO to limit the prop to its max 300mA anyways, but not sure wether I want over current protection for various reasons.
Sign In or Register to comment.