Custom Programmable Switching Power Supply (Pics, Sch, Video inside) - Page 1
Forum section: electronics / projects

author: cjk2
author_rank: Contributor
timestamp: January 10, 2011, 01:38:05 am
content: Does anyone have a professional variable SMPS they would be willing to take apart and post pictures of? If not I may end up spending a few hundred dollars on a BK precision (the one Dave has) or an Instek just so I can see how they work.I have been working on the design of my own programmable power supply for about a year now and have made some progress. I have had some stability problems but those seem to be solved for the most part. I have more noise on my output than I would like but I believe that can be reduced with a better designed output filter.Currently I am using type 2 compensation but I must admit I have not had any control theory classes yet. I selected the compensation values by trial and error. I am sure I could increase my transient performance and stability if I did a real study of the compensation.I would be intersted in any suggestions about how to correctly do digital control of this kind of power supply. I can not find much of any information about this type of design online, it seems like I will be one of the first hobbiests to try a programmable switching power supply.I have attached a schematic and some pictures of my prototype. I have posted a video of this supply opperating here:Note that the photos are of my current prototype but the schematic is for my next planned revision. The video shows my current prototype as well.I could not get these files attached so here are links:http://rfhv.com/SMPS/IMG_7068.JPGhttp://rfhv.com/SMPS/IMG_7069.JPGhttp://rfhv.com/SMPS/IMG_7152.JPGhttp://rfhv.com/SMPS/SMPS%203%20Digital%20Prelim%201.pngYour feedback is welcomed.

author: glossywhite
author_rank: Regular Contributor
timestamp: January 10, 2011, 02:29:12 am
content: Woweeee! cleverness

author: DJPhil
author_rank: Frequent Contributor
timestamp: January 10, 2011, 12:26:23 pm
content: Excellent work!I think you may be right about being among the first to try such a supply at the hobbyist level. The hard math and custom transformers make for a steep slope. It seems most of the more advanced and capable folks decide to just buy a good supply and work on their own interests.I wish I could help more, but you're way ahead of my understanding already.I've parted out a half dozen old AT and ATX supplies, and I've got a few more on the chopping block. I seriously doubt they constitute a useful source of information, but if you need me to work them over for some info just holler.Again, very well done.

author: Mechatrommer
author_rank: Super Contributor
timestamp: January 10, 2011, 12:37:10 pm
content: hmm. for minutes ago i've been holding a question. actually i'm interested at the design, ummm, my question is... is that, umm orange thing on the pcb, mmm.. o well, is it possible when you are done... to sell it at 1 tenth of BK precision of the same spec?

author: Unknown
author_rank: Unknown
timestamp: January 10, 2011, 02:20:23 pm
content: If you want to see commercial examples, your best bet is to find service manuals from the time that they still published schematics.This Agilent 603xA manual (3MB, PDF)is one example. Agilent/HP manuals tend to be very good. Service manuals have schematics and theory of operation, so they're much more useful than just pictures.

author: saturation
author_rank: Super Contributor
timestamp: January 10, 2011, 06:56:29 pm
content: A fine construction and design job, kudos.

author: Time
author_rank: Frequent Contributor
timestamp: January 10, 2011, 08:34:43 pm
content: Wow, impressive. You are walking a fine line between a hobbyist project and professional design. I wish I had the time and money to put into a personal project like this.I do have an Instek GPS3030DD 30V/3A DC supply. In what detail are you wanting to see the guts? Just an overall tear down with clear images of both sides of the boards?http://www.tequipment.net/InstekGPS3030DD.html

author: cjk2
author_rank: Contributor
timestamp: January 10, 2011, 09:24:51 pm
content: Thanks for the replys so far."I've parted out a half dozen old AT and ATX supplies, and I've got a few more on the chopping block. I seriously doubt they constitute a useful source of information, but if you need me to work them over for some info just holler."I have probably taken apart 30 of these over the years. They are very helpful to study."hmm. for minutes ago i've been holding a question. actually i'm interested at the design, ummm, my question is... is that, umm orange thing on the pcb, mmm.. o well, is it possible when you are done... to sell it at 1 tenth of BK precision of the same spec?"I am interested in selling these. I will likely end up at a price of around $300 for a complete supply and maybe less for a kit. My development cost for this project will probably end up around $600 or so."If you want to see commercial examples, your best bet is to find service manuals from the time that they still published schematics. This Agilent 603xA manual (3MB, PDF) is one example. Agilent/HP manuals tend to be very good. Service manuals have schematics and theory of operation, so they're much more useful than just pictures."Thanks for posting that. I have had a look over it and it looks like mine uses similar techniques."I do have an Instek GPS3030DD 30V/3A DC supply. In what detail are you wanting to see the guts? Just an overall tear down with clear images of both sides of the boards?http://www.tequipment.net/InstekGPS3030DD.html"Thanks, I actually have a supply almost identical to that, mine has analog readouts tho. I am looking for information on a digital programmable design however. Basically if it has pots on the front it won't do me much good as I already understand how those work.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: January 11, 2011, 01:12:50 am
content: Somewhere I have the manual for a Farnell LS30-10 0-30V 0-10A bench SMPS - this has schematics, and I think circuit description - let me know if interested & I'll scan it. I've been using one (more recently two) of these PSUs daily for about 25 years, so extremely solid..!

author: Mechatrommer
author_rank: Super Contributor
timestamp: January 11, 2011, 06:29:38 am
content: Quote from: cjk2 on January 10, 2011, 09:24:51 pmwell is it the magic word "programmable" that makes it a bit pricey? you can bulk order parts, to make cost lower.we can help you with the promotion... as "discounted beta testers". thats "a promise"

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: January 11, 2011, 02:29:46 pm
content: Here's the Farnell LS30-10 (30V 10A) and 60-5 (60V 5A) schematics and circuit description :http://electricstuff.co.uk/forumfiles/Farnell_LS30-10_60_5.pdf

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: January 11, 2011, 04:12:20 pm
content: These Farnell PSUs are 60W not 300W - power available is a curve between 30V@2A and 6V @10A

author: cjk2
author_rank: Contributor
timestamp: January 12, 2011, 07:45:41 pm
content: "well is it the magic word "programmable" that makes it a bit pricey? you can bulk order parts, to make cost lower.we can help you with the promotion... as "discounted beta testers". thats "a promise""All of the parts just add up. For example, my project uses an ADC and a DAC. Just these parts alone cost about $6 each. Another $5 for the UC3825, 5 more for the microcontroller, 7 for the 60hz transformer, about 5 more for the custom SMPS transformer if I make it myself, etc... It just all adds up and by the time you are done, once you include the case, laser cut front pannel, screen printing, etc, you are up to several hundred dollars for a complete unit."Here's the Farnell LS30-10 (30V 10A) and 60-5 (60V 5A) schematics and circuit description :http://electricstuff.co.uk/forumfiles/Farnell_LS30-10_60_5.pdf"Thanks, I had a look at this, and I will study it more when time allows.Here is my board layout for anyone interested.

author: Mechatrommer
author_rank: Super Contributor
timestamp: January 12, 2011, 08:26:43 pm
content: Quote from: cjk2 on January 12, 2011, 07:45:41 pmsorry if you feel offended, but its not my intention. maybe i'm too cost concious since some area/market/niche in ee are making alot of profit and beyond our/my "affordability". but further discussion on this will be OT. so from your statement, you are not in those area, the same with other psu brands i think. you have the right to state your reasonable price. from your technical issue, you are master enough, and i hope you can solve it in due time with help of the rest of masters. Cheers.

author: cjk2
author_rank: Contributor
timestamp: January 12, 2011, 08:49:06 pm
content: I am not offended at allI know that money is a big factor when you are starting out in this field so if I do end up selling this or other designs I plan on pricing them fairly. Something like the actual cost to me plus maybe 10 or 20 percent. I doubt I would ever do what might be done in the industry where the markup is huge.

author: Mechatrommer
author_rank: Super Contributor
timestamp: January 13, 2011, 04:16:45 am
content: Quote from: cjk2 on January 12, 2011, 08:49:06 pmi agree. R&D costs alot of money even sometime like 10x or more the cost of end product. R&D is the most difficult part. later when you start this design into mass production or selling, bulk order and the like, i think you should see some cost drop from your initial invesment. its just how you are going to price your time, effort and invesment earlier in the mass produced products. and lastly, dont forget to consider your aftersale service/ warranty cost later into your pricing.

author: Murphy
author_rank: Regular Contributor
timestamp: January 13, 2011, 11:49:31 pm
content: I have a big switch mode I've already taken pictures of if anybody is interested. Unfortunately this company does not provide schematics.http://www.avalontest.com/e-store/prod_details.asp?pid=2182&pcid=12157493871983

author: cjk2
author_rank: Contributor
timestamp: January 14, 2011, 02:07:19 am
content: I am very much interested, any pictures you have would be a great help.

author: Murphy
author_rank: Regular Contributor
timestamp: January 14, 2011, 03:24:19 am
content: These are what I have off my camera that I took to see how to put it back together after repairing it. Not a lot of microprocessor control going on here just a ton of analog, they do make a card to link it to labview but I don't have that.If there's anything in particular you want to know or get better pictures of I'd be happy to help.Nice work BTW

author: Hypernova
author_rank: Unknown
timestamp: January 14, 2011, 06:43:49 am
content: With the reading jumping what are your ADC sampling freq? Have you tried over sampling even more? I have a xmega based 8ch SMPS fan controller and the xmega handles everything. Even with a noisy first rev PCB the jumps weren't anywhere your level. I over sample at 250+ samples. If you are just displaying you don't need very high speed, might as well average some more.I'm a CSE guy so I probably knew even less than you do on SMPS (mine was just step by step using Microchip app notes), but if you need help on extracting maximum use out of the xmega I can help with DMA and multi level interrupts.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: January 14, 2011, 09:52:28 am
content: Quote from: cjk2 on January 12, 2011, 07:45:41 pmThis is where clever design and part research comes in. Microchip do some nice cheap 12 bit ADCs (e.g. MCP3201 $2) and DACs (e.g. MCP4725 $1)And where possible use MCU onboard peripherals. For example PWMs can be used for DACs There will be MCUs way less than $5 that will do this job. If you need horsepower the NXP Cortex M0 ARMs are about $1.50.

author: xani
author_rank: Frequent Contributor
timestamp: January 15, 2011, 11:33:19 pm
content: Quote from: cjk2 on January 12, 2011, 08:49:06 pmI think that even at 40% marigin it would still be much cheaper than "factory made" SMPSIf you are going to sell it after you finish:1.Would be nice to have "analog-only" version where you can just connect few potentiometers and some random panel meter as "budget version", or if someone wants to control it from arduino or something like that2.Isn't XMEGA a bit of a overkill for "read ADC, write to DAC, read keys" ? And if you use XMEGA, they have (at least from I could read fromhttp://www.atmel.com/products/AVR/default_xmega.asp) 12 bit ADC and DAC so that's 2 chips less (and if a noise is a problem if I remember correctly AVRs have "low noise" mode , processor sleeps while making measurements)

author: Zad
author_rank: Super Contributor
timestamp: January 16, 2011, 12:13:59 am
content: When developing stuff I generally go for the highest spec controller in a range, to give me memory and resource space. Only when I'm moving over to production do I worry about what chip is most cost effective. With 1-offs it just isn't worth the struggle.

author: Bored@Work
author_rank: Super Contributor
timestamp: January 16, 2011, 08:03:36 am
content: Quote from: xani on January 15, 2011, 11:33:19 pmThey have it on paper, yes. In practice the Xmega ADCs and DACs are severely broken.From a random Xmega datasheet I have sitting on my hard drive (brokenness might vary with Xmega type):QuoteAnd from experience with Atmel in the past, as well as reading other people's experience with the Xmega ADCs, that might not be all that is broken. E.g. people wrestle with differential and signed vs. unsigned ADC mode. IMHO Atmel hates to tell their customers the full truth and only lists something as an errata when it is already known all over town.There is also no sign that Atmel intends to fix things. Instead, each new datasheet revision lists more errata, while Atmel sticks with the same silicon revision.

author: Hypernova
author_rank: Unknown
timestamp: January 16, 2011, 09:36:56 pm
content: Quote from: BoredAtWork on January 16, 2011, 08:03:36 amNone of them are show stoppers if you know your bounds, I use the ADC at signed single ended and it's has worked for me just fine.

author: Bored@Work
author_rank: Super Contributor
timestamp: January 16, 2011, 09:58:11 pm
content: Quote from: Hypernova on January 16, 2011, 09:36:56 pmSure, if you can offset the development cost with a production run of a few million, then the extra development cost to tame the Xmega crap is neglectable. If you do a small production of hundred boards then it isn't worth the trouble to work around all the issues.I dumped the Xmega crap in the middle of a project, because after I worked around the broken ADC, and after I worked around the broken DAC, I ran into an issue with the clock system. All that while Atmel was still lying that everything was hunky dory with the Xmega.Looking at the current list of issues this was a good decision. Because Atmel now lists issues with I2C, PWM, wakeup from sleep, EEPROM access, and whatnot.

author: cjk2
author_rank: Contributor
timestamp: January 17, 2011, 12:19:44 am
content: QuoteI am sampling at around 100hz. I do not feel I need to oversample more than 20 times, if I do, I feel I just need a real ADC with less noise.QuoteThanks for sharing. If time allows I might go back and try to optimise my design to knock $10 or so off the cost. For now, I am just going to stay with hardware I am comfortable with and that I know will work.QuoteI will certainly consider having an analog only version. The only reason I am hesitant is that it seems like a bad idea to have an analog signal voltage run through the noise environment of the case. Putting the DAC and ADC right on the control board helps to keep the sensitive signals very short and on the same board.About the XMEGA: I simply like these and I am comfortable using them. I have already written code for these chips and know how to use the peripherals with minimal haste. I suppose if I wanted to produce 100 of these power supplies I would probably try to redesign the micro controller section to save a few bucks. For now I am just sticking with what I know will work and is easy for me to code for.QuoteYes I agree. I do not feel like trying to work around Atmel's silly ADC and DAC problems. Having said that, their micros seem to work fine and I like the IDE, so for now I am sticking with the Xmega, just not using the ADC or DAC.So in summary: I feel that for a precise piece of equipment I am best to use a real ADC and DAC that is from a reputable company (I am using parts from Linear). The XMEGA is overkill but I like it because the IDE is easy to use and I have already written code for these. Also, the ADC and DAC that I picked have 14 and 16 bit upgrade paths that are pin compatible should I feel that more resolution would be helpful.

author: xani
author_rank: Frequent Contributor
timestamp: January 17, 2011, 11:46:17 am
content: Damn I know I shouldn't expect much from builtin ADC/DAC, but that, just terrible design from atmel ;/Quote from: cjk2 on January 17, 2011, 12:19:44 amHmm yeah, analog version would probably need at least some caps to filter out noise, if not diff. amplifier on input pins. Still, putting 2 pin header on each ADC/DAC input would make conversion to analog easy (just dont mount ADC/DAC) and also provide nice test points to connect scope/meter, even if performance would be a bit worse (for most hobbyists "good enougth" anyway).

author: cjk2
author_rank: Contributor
timestamp: March 08, 2011, 11:03:06 pm
content: An update to all of this:I got the supply to work fully under digital control. I have so far been able to reach about 170W output power into a 9 ohm load.From my youtube description:I use an ATXMEGA16D4 to deal with the user interface and digital section. My ADC and DAC are both dual channel parts by Linear Tech. I have 12 bits of resolution in both set and read ranges. This gives voltages from 0-40V and currents from 0-5A with about 4000 steps in between. This yeilds just under 4 significant digits of resolution on the display. So far I have been able to go up to 50V and 5A but not at the same time, currently the maximum power output of this supply is about 170W into my resistive load. The output is very accurate on the voltage range with better than 1% accuracy with no calibration. Ripple is about 50mv at 100khz. Overshoot and undershoot are ok but not great so far (about 5% going from a 100 to 9.1 ohm load and much worse going from short to open). I am operating in current mode with about 50% ramp compensation (the ramp waveform is a 50/50 mix of the internal ramp generated by the chip and the primary current waveform). I have not yet dealt with fine tuning of the compensation networks. I expect to be able to achieve more stable operation and better transient response.Here is a video of the supply working.

author: Mechatrommer
author_rank: Super Contributor
timestamp: March 08, 2011, 11:59:51 pm
content: very neat and professional look.

author: sorin
author_rank: Frequent Contributor
timestamp: May 13, 2014, 07:05:51 pm
content: Please can someone reupload the "Farnell_LS30-10_60_5.pdf"Thank you!