Bench Power Supply School project - Page 1
Forum section: electronics / projects

author: sap chicken
author_rank: Contributor
timestamp: November 25, 2012, 07:15:16 pm
content: Hello, I am Carlo and I am an engineer student. It’s my second year. At our school we do a group project each semester (4 semesters a year 8 weeks each).This semester we (4 students) want to build a bench power supply. I came across the Power supply video series from the EEVBlog and we think it will be a nice project to design one ourselves.Because it’s my second year I’m still quite new to electronics and don’t understand every circuit so I thought I’ll post the progress on here and I might ask a few things if you guys want to help.We got a few rules from our teacher:#1 We are not allowed to work with mains voltages.(our supply is limited to:Another bench power supply from our laba pre wired 4 tab 5A transformer from the lab - 5V - 10V - 5V - 10V –a notebook charger or any other pre wired dc source)#2 We are not allowed to use the Arduino programing language, it must be in AVR studio4.#3 Buy your components yourself (we set a budget of 20 euros but we can add more)School can supply us with 1/4W 5% resistors from the E12 series and ceramic/plastic capacitors (10p-1uF) for free tough.They also don’t like us to just use 2 adjustable voltage regulators in series like some bench power supplies.[url=http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.html]http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.html] [url=http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.html]http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.html]http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.html] [url=http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.html]http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.html]http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.html]http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.html] http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.html]http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.html]http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.html]http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.html]http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.html] http://www.circuitsonline.net/schakelingen/158/voedingen/lm317-labvoeding-bijgewerkte-versie.htmlIt’s week 2 of our project now and we need to come up with a requirements document and design document (black box style)our requirements:RQ1 : Voltage 0 – 10 volt.RQ2 : Current 0 – 750 mA.RQ3 : The set Voltage is displayed on a display.RQ4 : The set current is displayed on a display.RQ5 : The voltage on the output is displayed on a display.RQ6 : the flowing current trough the output is displayed on a display.RQ7 :The ripple on the output voltage is less than 100mV p-p at maximum currentRQ8 : If the output is short the current flowing can’t be higher than the set current +-7.5mARQ9 : The system is controllable with push or rotary buttonsRQ10 : The accuracy of the voltage is within 50mVRQ11 : The accuracy of the current is within 7.5mARQ12 : the current flowing out of the transformer is less than 4A (due to the rating of the transformer)RQ13 : The final product must be soldered on a prototype board or PCB.RQ14 : The final product must come in an enclosure of some sort.Our disign documents black box has been added in the attachmentsthe Circuit of the current meter and the voltage controller has been added in the attachments

author: Bloch
author_rank: Unknown
timestamp: November 25, 2012, 07:57:36 pm
content: Quote from: sap chicken on November 25, 2012, 07:15:16 pmNot exactly that a BNC was design for- kids now a days

author: PA0PBZ
author_rank: Super Contributor
timestamp: November 25, 2012, 08:29:51 pm
content: Yeah, BNC is totally insane

author: Unknown
author_rank: Unknown
timestamp: November 25, 2012, 08:34:15 pm
content: While not the most obvious choice for 1.5 A DC, BNC connectors should be able to handle it without problems.

author: IanB
author_rank: Super Contributor
timestamp: November 25, 2012, 08:37:37 pm
content: But why not use the obvious choice in common with other bench power supplies? Being different for the sake of different is not a good engineering design principle.

author: sap chicken
author_rank: Contributor
timestamp: November 25, 2012, 08:41:04 pm
content: OH MY GOD LOL, sorry I mend banana plugs of course XDI’ll change that…

author: peter.mitchell
author_rank: Super Contributor
timestamp: November 26, 2012, 08:20:23 am
content: I'd have an efficiency goal too (so relays that switch transformer taps or switching pre-reg).Does a rotary encoder count as a button input to your instructor? Knobs feel better to use than buttons (imho), but I can see why you're not going to use pots (too easy), plus there are rotary encoders with push button function too.Binding posts -> banana plug sockets, they offer a way to put in banana plugs PLUS attach bare wires.Can you use pre-wired AC supply? Eg, 24v 1a AC wall wart? Opens up options for dual supplies / pos + neg rail.Does 20 euro cover the external supply, and enclosure (does it have to be in an enclosure?) ect?

author: Harvs
author_rank: Super Contributor
timestamp: November 26, 2012, 09:12:56 am
content: QuoteAs far as requirements go, some of these are in the "solution space", i.e. you're pre-empting exactly what you're going to build and writing requirement to match it. Generally that's bad systems engineering practice. I don't know how your teacher wants it done, so only take this advice if applicable. But, if I were writing the requirements, the first step in writing requirements is to develop them in the "problem space".Things like, instead of "A button interface", which is a solution, the requirement might be"The user can set voltage and current directly from the device front panel to a resolution of XXmV and XXmA."Then it's up to the design phase to choose a 10turn pot, a series of buttons, a rotary encoder, a touch screen or whatever the designer comes up with within the bounds of the spec.Then you should probably break the spec into difference sections. Those for straight acuracy/performance requirements, those for functional requirements, those for enviromental requirements and so on.But then maybe I'm looking into this too muchIt's just one of those things I battle with every day...

author: sorin
author_rank: Frequent Contributor
timestamp: November 26, 2012, 02:50:37 pm
content: see this:http://elektrotanya.com/hp_agilent_e3631a_dc-power-supply_sm.pdf/download.htmlpage 130

author: sap chicken
author_rank: Contributor
timestamp: November 26, 2012, 04:46:15 pm
content: @peterEfficiency is a tricky one, for example: if we set the current limit to 500mA and we short the output. The output is a short so almost 0 Ohm so the output power will be almost 0W.The input voltage of pass transistor needs to be a few volts above the output voltage so you’ll lose at least the voltage across the transistor * 500mA. So let’s just say the losses are about 3WThe efficiency = Pout/Pin = Pout/(Pout+Ploss) = 0/(0+3) = 0% efficientWe could say the efficiency at one output voltage and load (like 5V 10Ohm), might add that.We want to use a buck converter as a pre regulator, the LM2576T-adj goes for 1.65 euro’s here.We set our minds on the transformer from the lab at school and we will use the 5V and 10V tab in series so that won’t cost us anything (except for maybe a fuse if we blow one)We were thinking about making our own enclosure from sheet metal and Perspex, don’t really know if school has some but we can always just ask around.So the cost will only be the semiconductors, the big capacitors, the LCD and the buttons.@ HarvsWe’ve got templates for the documents we have to write so I can’t really change the form. We have to make the requirements first so we have a goal to reach, at the same time we need to write the tests to test if we reached the requirements. So they want us to be a bit specific about the requirements like we can’t just say ‘the voltage and current of the power supply are adjustable’, we will get a test case like:Requirement: the voltage is adjustableResult: the voltage of the first measurement deferens from the voltage of the second measurement.Procedure:#1 start the system.#2 measure the voltage on the output with a multimeter and store the result.#3 push the V+ button.#4 measure the voltage on the output with a multimeter and store the result.Also I’m from the Netherlands and we know the word ‘knop’ this can mean push button or any rotary control. We like those cheap push buttons but might still chose a rotary encoder later on.@sorin That’s quite the power supply, I’ll keep that one. But I don’t really think we’ll do something like that.We had a meeting today and the teacher agreed with the requirements and the amount of them, so we’re going to come up with the tests for them and now we’ll go on to the design phase.RQ1 : Voltage 0 – 10 volt.RQ2 : Current 0 – 750 mA.RQ3 : The set Voltage is displayed on a display.RQ4 : The set current is displayed on a display.RQ5 : The voltage on the output is displayed on a display.RQ6 : the flowing current trough the output is displayed on a display.RQ7 :The ripple on the output voltage is less than 100mV p-p at maximum currentRQ8 : If the output is short the current flowing can’t be higher than the set current +-7.5mARQ9 : The system is controllable with push or rotary buttonsRQ10 : The accuracy of the voltage is within 50mVRQ11 : The accuracy of the current is within 7.5mARQ12 : the current flowing out of the transformer is less than 4A (due to the rating of the transformer)RQ13 : The final product must be soldered on a prototype board or PCB.RQ14 : The final product must come in an enclosure of some sort.

author: sorin
author_rank: Frequent Contributor
timestamp: November 26, 2012, 05:03:41 pm
content: see just that:is very simple just 3 OP Amp

author: sap chicken
author_rank: Contributor
timestamp: November 26, 2012, 05:44:54 pm
content: I looked at that one but I don’t understand it yet, can't see any current measurement or feedback, can't see any voltage feedback and also can’t find anywhere how to set a certain voltage or current.

author: sorin
author_rank: Frequent Contributor
timestamp: November 26, 2012, 06:06:07 pm
content: are you kidding ...Do you know what is and how work a Operational Amplifier??if yes do some math ...ps. to do a good power supply, you need to analysis the loop response

author: sap chicken
author_rank: Contributor
timestamp: November 26, 2012, 06:44:11 pm
content: I'm not kidding, I know what a OPAMP is and how it works I do not know how to do loop analysis or do any kind of math with the opamp and those diode things and transistors.The circuit is just a bit new to me, I can see those MBAV99's are they just two diodes in series with a tab in the middle of them?The U21B is used for Constant current I guess, it's used as a weird looking differential amplifier with a 2200pF capacitor as feedback so it amplifier the voltage across the .2Ohm resistor?the U21A is used for constant voltage, on the - is just the output voltage, with again that 2200pF cap? and on the + is some sort of filtered and with diode protected reference point.Don’t know how that can work because the supply of the opamp is +-15V and the input on the - of the opamp can be up to 25V.in the power rail itself you have that pass transistor with a LM317CC scours and a PNP emitter follower on it's base?

author: Shuggsy
author_rank: Regular Contributor
timestamp: November 27, 2012, 02:45:03 am
content: Quote from: sorin on November 26, 2012, 02:50:37 pmThanks for this! Quite an interesting design. Not sure I follow it all right away with the DAC referencing bits, but I've been on a power supply kick lately and I'll be reading through it soon. The more I look through control loops like good power supply designs the more I keep learning.Quote from: sap chicken on November 26, 2012, 06:44:11 pmLooks that way to me. Appears to be for protection of the transistors from the opamps going wild with their voltages.Quote from: sap chicken on November 26, 2012, 06:44:11 pmYep! Didn't trace out the schematic enough to see where the Iref comes from, but the overall idea is that both the opamps are fed a reference on one input then U21B gets a voltage corresponding to the output current while U21A gets a voltage corresponding to the output voltage on their other respective inputs. Remember, the opamps will do whatever they can to swing their outputs such that the two input nodes are at the same voltage (roughly speaking). In the case of these opamps, either one may take control of the driving transistor (Q2 here) to drive the pass transistor for that power supply rail (Q1 here) until the output voltage or current is such that whichever opamp is in control has equal voltages on its two inputs.Quote from: sap chicken on November 26, 2012, 06:44:11 pmThis works because the input voltages to the opamps are divided down from the actual output voltages. Since this is the -25V supply section, the top rail in sorin's pic is the Common (0V reference) rail for it.Quote from: sap chicken on November 26, 2012, 06:44:11 pmNot sure which part you were talking about with the LM317... there are a few of those in the schematic but they mostly deal with reference voltages. If you're talking about the Q1 and Q2 for this supply, Q1 is the pass transistor while Q2 is a driving transistor used to control Q1. Q2 is driven by the opamps in limit the voltage or current as discussed previously.sap chicken, if you're interested in a more straightforward power supply with similar control scheme, I recommend the service manual for the HP6238B power supply. It explains the design concepts behind all the power supply rails and has only 1 page of schematics. Download the service manual from the first link on this google search:http://www.google.com/#q=hp6236b+service+manual

author: sorin
author_rank: Frequent Contributor
timestamp: November 27, 2012, 07:47:24 am
content: The HP6238B is a good choice to start for beginners.The MBAV99 are just 2 diode in the same case,the diode here, generally are used to protect from reverse current, except the CR22 and CR23 which are used to prevent the revers current on the opamp from each other.The 2200pF capacitoris are used to correct the phase-gain of the system.for more detail:http://www.google.com/#q=Linear+Regulators+Theory+of+Operation+and+CompensationThe voltage across the 0.2Ohm resistor is not amplified , simply the voltage of CC Ref is divided through R96, R97 .

author: Harvs
author_rank: Super Contributor
timestamp: November 27, 2012, 09:45:52 am
content: Ok you've got your requirements sorted now anyway, but you've missed my point somewhat.QuoteEven though you write a requirement in terms of the problem to be solved, in no way does it remove the obligation for the requirements to be measureable and demonstrable. You can be as specific as you like as far as to what the problem is.The difference is taking one step back and looking at what the problem you're trying to actually solve is, instead of launching straight into a solution (be it right or wrong.)But for the sake of your project, it doesn't sound like it will make any difference. This is pretty typical of uni style projects. I know I was like that when I went through uni, and most of the graduates I still see. At the end of the day, uni's are generally focused on the technical skills they're teaching. It's a bit of a pity they can't seem to intergrate the bigger picture systems engineering practices into the courses better.

author: dr_p
author_rank: Frequent Contributor
timestamp: November 27, 2012, 10:26:37 am
content: @sap chicken:Since you don't understand some things, why don't you take one step at at a time?1 - get a brick laptop adapter (some 12, 15 or 19V at least 2A, whatever you can find from a reputable brand)- get a breadboard2 - build a simple LM317 circuit with adjustable voltage output (via potentiometer).- test it- add an op-amp so a 5V reference goes through the potentiometer, and the op-amp and sets the voltage (you'll need this to interface with the micro-controller)- test it- add a second op-amp in the same manner to limit current (5v, pot...)- test it3 - build/buy micro-controller programmer, build a "Hello world" on a micro, have a beer.- play around with ADCs, get it to do what you want, understand how everything works.4 - get an LCD and make it do something. Add controls - rotary encoders, buttons etc.- learn the proper use of interrupts, or you'llwhen puting everyting together.5 - start a new program, work on PWM controlling a LED6 - build and experiment with RC low pass filters to be used in PWM smoothing. A scope will come in handy here.Start putting them together:- PWM + filters- is the micro good enough? enough pins, ADC, PWM, whatever? Can everything work right at the same time? On paper, at least? Why the f*** didn't I think of that?!- put it all together, fix it 13 times, find at least 3 reasons why it's defined not going to work.- try to find a work-around, but it evolves in a different problem all together.- get frustrated for not choosing multi-turn pots + whatever display option (micro, 7 segment, panel-meters). Way easier.I've been there.So, I went with Dave's schematic ported to a LM317(cause I happen to have some). I've omitted the LM334, used a regular LM324 op-amp, used a regular LM78L05 as the voltage refference and whatever NPN I had lying around.Works great, CC-CV, I'm very happy with it. If you like I can post a PCB image when I get home - single sided, through hole, spaced out.

author: sap chicken
author_rank: Contributor
timestamp: November 27, 2012, 12:40:38 pm
content: Really thanks for the schematics and all but we're still in the documentation phase, we are doing the design document first, the black box style schematic with all of the interfaces. It’s part of the learning experience to come up with our own schematics, our own interface specifications and overall design. We aren’t really allowed to just use a LM317 as a regulator we need to do this with discrete components. I guess we’re going to use a buffered op-amp as a regulator and just use the output voltage as our feedback on the – pin of the opamp.Because we’re going to use a buck converter we can just power our op-amps with the higher voltage so we won’t have any problems with the voltage rails of the opamp.We are also going to power the opamps with a negative voltage (-5V or so) because I did a few tests and I can’t seem to get 0V out of a lm324, it will only go to like 100mV with a 1Kohm load this is bad because we’re going to use the differential amplifier across a current shunt to measure the current.We won’t use discrete dac’s we’ll just use the 8bit pwm outputs of the microcontroller (maybe in combination with a R2R ladder for more resolution on the voltage scale).To set the output voltage of the pre regulator we’re going amplify the voltage between the output of the power supply and the output of the pre regulator in a way that the voltage on the feedback pin equals to 1.25V (reference voltage of LM2576-adj) when the output voltage of the pre regulator is about 3V higher than the output of the bench power supply.

author: jabramo
author_rank: Regular Contributor
timestamp: November 27, 2012, 08:27:19 pm
content: How much time do you have to finish the project?

author: sap chicken
author_rank: Contributor
timestamp: November 27, 2012, 09:08:19 pm
content: The projects are 8 weeks long, those are school weeks so without the holiday’s.We’re in week 2 now and we need to deliver the final product with the documentation and tests before the 21’st of January.

author: Fluxed Matter
author_rank: Regular Contributor
timestamp: November 28, 2012, 01:43:25 am
content: Lot of great information in these two handbooks. Both of them are by Agilent. Check out the DC power supply handbooksOldandNew

author: Thor-Arne
author_rank: Unknown
timestamp: November 30, 2012, 11:49:02 pm
content: Quote from: Fluxed Matter on November 28, 2012, 01:43:25 amOh, these was nice. Thanks for posting it.

author: sap chicken
author_rank: Contributor
timestamp: December 03, 2012, 10:13:14 pm
content: some new information, I’ve added the black box of this project in my first post. My job is to design the schematic of the Voltage regulator and the code on the microcontroller.We are thinking of building a regulator from discrete components but if we fail to get that to work we might still use a LM317.The microcontroller will be a atmel Atmega328 or a Atmega8 because the only programmer we can use is the Arduino programming board and I find it quite the challenge to even get the Atmega8 working with AVRstudio4 on that.

author: kxenos
author_rank: Frequent Contributor
timestamp: December 03, 2012, 11:39:50 pm
content: As a general approach when I have to design something I use some standard steps. The first step is to describe thefunctionalrequirements and the limitations I have (and why). The second step is to make a block diagram that describes the functional units, their requirements and the interfaces between them. The third step is to design in detail each block of the block diagram so that it meets it's requirements and has the correct interfaces. Then I build each block and test it separately to see if it meets the requirements and finally I put them all together. This is a general approach and I mostly use it in bigger software or hardware projects. Documenting each step takes some time but it's very important and might save quite some effort when troubleshooting and/or upgrading. I don't think that you will have to use such detailed modeling process for a simple project but I just wanted to share this in case it is of any use.P.S. As I believe that implementing a ready made design can't be called designing, as a scholar I would like to see you trying to come up with an original design of your own. But then again I don't know whether this is required by this examination or not.Bear with me as English is not my mother tongue, I hope it makes sense.I wish you success! Cheers!

author: sap chicken
author_rank: Contributor
timestamp: December 04, 2012, 08:33:15 pm
content: @ kxenos: Yes, the steps you mention is how we generally do our projects, documenting each step won't cause us more workbecause we have to do that anyway that's why I won't just use a schematic because we have to explain why we use a certain value of resistor/capacitor of why he have chosen this or that chip.Also, here come the questions XDIn the Atmega 328 datasheet they tell us that the maximum voltages on any pin (except for the reset pin) can’t exceed the value of Vcc+0.5V because it can cause damage.We are going to use the ADC inside of the Atmega328 to read out our output voltage and current. It might just be so that at start up or shut down or something, the voltage output of one of the opamps that go to the microcontroller rises faster or drops slower than the supply voltage of the microcontroller.Do we need to clamp the pins with 5.5V zener diodes? or can we just put a resistor in series with the pin to be safe?

author: kxenos
author_rank: Frequent Contributor
timestamp: December 04, 2012, 09:07:32 pm
content: Powering the opamp first is not necessarily going to produce an output voltage. But even if this is the case, for this transient I don't expect that there will be any problem. It is also a good idea, if possible, to place a low pass filter either in the output of the buffers or (better) in their feedback loop.As long as you keep the voltages below the absolute maximum rating (which I think for these ICs are 7V or thereabouts) you are OK in terms of safety. One thing you should have in mind though is that you will have to discard the measurements until the voltages are stabilized.