Using a switching regulator, unclear what speed to choose.
rwgast_logicdesign
Posts: 1,464
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.
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.
Comments
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
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.
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
http://forums.parallax.com/showthread.php?133717-Switch-mode-power-supplies&highlight=5010
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.
Sorry bout that. Guess it's hard to run from one's internet history.........
FF
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]
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.
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?
Have you read any good books lately?
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.
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.
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
http://www.edn.com/rss/ContentGroup?contentItemId=4238440
FF
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.
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.
"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.
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 ;-)
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.
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
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.
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.
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.