DIY 10V/2A power supply - Page 1
Forum section: electronics / projects

author: Lovely_Santa
author_rank: Contributor
timestamp: April 05, 2016, 04:36:30 pm
content: Hey EEVbloggers!I made already some nice power supplies, different ranges for different uses...But everyone has to start somewhere... So I have a stupid ATX power supply (more than one), even some with a floating ground (the ground disconnected from the earth, but the case still connected to earth)My little brother (that is not so little anymore) want one of my power supplies, just to start off... Instead of giving him one, I want him to understand how it work (like I learned).. For a starter I wanted to make one without a lot of "difficult" components. This means no huge datasheet analysis etc...So... Here it is, a 10V/2A powered by an ATX power supply (12V) That's why it even has a HUGE 10mF C1.How it works1. Reference voltageThe diode D1 is a 3V zener. The output of the U1 OpAmp will increase until the diode is turned on. At this point, the opamp stabilises, so the zener reference voltage (3V) will appear across the resistor R3. Becose there is (almost) no current flowing into the non-inverting input of the opamp, all the current flow trough R4, giving also a voltage drop of 3V as the two resistors have the same value. So the output of the OpAmp will be 6V with reference to the virtual ground (marked with GND). I will explain the difference between the virtual ground and the V- (0V) connection later on.2. Voltage regulatorThe OpAmp U2 has a constant gain of approximately 2, according to the formula A=1+R8/R7. This will raise the 6V reference (on the non-inverting input) up to approximately 12V. (The OpAmp has some offset, so the maximum will be at least 10.5V). For any tolerances in the circuit, we can compensate this by the trimmer TRIM1 (lowering the gain by increasing R7). By trimming TRIM1, we can also set the gain that it will raise the 6V reference up to a maximum of 10.5V, so we have an even beter resolution by changing the pot P1 (becose of the voltage rail loss between 10.5 and 12V from the OpAmp). The output of U2 will drive transistor T1 (and he will drive T2) so the capasitor C8 will load to the required voltage. The moment you switch the load switch the voltage will set on the output, without an extra peak (except when you set heavy load on the output ofcourse).3. Maximum current outputTo measure the current, the circuit detects the voltage drop across a resistor (R7) which is connected in series with the load. To prevent the voltage drop over this resistor to interfear with the voltage regulator, the voltage is regulated above this resistor, even the voltage reference (and this explains the virtual ground). U3 is the OpAmp that regulate the current. The inverting input is biased at the virtual ground via R13. We can set the maximum current on the output by regulating the 10K pot P2. Just like by the voltage regulation, we can trim this with the trimmer TRIM2.When the voltage drop over R7 increases, the voltage on the non-inverting input will decrease (becose the virtual ground will raise).The moment when there want to flow more current than we setted, the inverting input will become higher than the non-inverting input, so the output will be 0V. At this moment the voltage reference will go down, and the circuit will deliver only the maximal current. Becose this is an unstable circuit (but will deliver a nice constant current) C9 will slow this down a bit.When the circuit is limiting the current (instead of the voltage), T3 will put the LED on.So, this is itWhat do you think about this simple design?Some questionsAnyone know good connectors for power connectors? Like for the input and output connectors?Anyone know what this white connector is called? I realy like them, but can't find them anymore... Found them once.. I (want to) use them on pots.Greetz,Lovely Santa

author: jeroen79
author_rank: Frequent Contributor
timestamp: April 05, 2016, 09:07:16 pm
content: The ATX powersupply has it's 0V tied to mains earth.That means that your supply will not only be not-floating but going up and down slightly above mains earth with the current going through R11.If you add it between T2 and Vcc you would not have this issue.

author: RGB255_0_0
author_rank: Frequent Contributor
timestamp: April 05, 2016, 10:44:29 pm
content: No idea if these fan connectors have a specific name but basically they'rehttp://m.ebay.co.uk/itm/PK-OF-10-FEMALE-3-PIN-FAN-POWER-CONNECTOR-BLACK-INC-PINS-/221915379106?_trkparms=aid%253D222007%2526algo%253DSIC.MBE%2526ao%253D1%2526asc%253D20150519202351%2526meid%253D09e21d979910430083aafad8a8bf5d4d%2526pid%253D100408%2526rk%253D3%2526rkt%253D3%2526sd%253D321895248478&_trksid=p2056116.c100408.m2460You can get then in 2 and 4 pin for PWM fans.

author: Lovely_Santa
author_rank: Contributor
timestamp: April 05, 2016, 11:04:02 pm
content: Quote from: jeroen79 on April 05, 2016, 09:07:16 pmI know when you get an ATX supply it's ground is tied to the mains earth. This is connected by the mounting pins from the PCB to the frame.This is not only a connection between the 0V and the earth, it's also a connection in the PCB. So I isolated the case and the earth from each other and connected the 4 ground connections with each other. At that point the earth from the case is still intact and will earth the case, but the 0V connection is floating (it's isolated by the main transformer).There is no problem with that, becose I already connected multiple of those power supplies in serie without shorting each other outI'm not that noobie... It was just one of my first projects and that ATX power supply is just gathering dust over there... I could use this circuit even on an other supply that I'm sure is isolated from the mains earth..Quote from: RGB255_0_0 on April 05, 2016, 10:44:29 pmThanks! I'll use those for my pots, but are those good enough for 2A? For the supply connections.. Don't thinks so... So any other ideas for the 12V/2A connections?

author: RGB255_0_0
author_rank: Frequent Contributor
timestamp: April 05, 2016, 11:16:01 pm
content: http://www.overclock.net/t/673960/max-draw-on-cpu-fan-header-p35-ds3l#post8543385drawing 3.7 amp.http://www.overclock.net/t/500254/max-amperage-for-mobo-fan-headerYou can always give it a test.

author: station240
author_rank: Unknown
timestamp: April 06, 2016, 04:58:25 am
content: Those connectors are easily found using the search term "molex 2.54mm" My local(ish) electronics shop keeps them in stock, so I have no problems getting them.For the higher current (input/output power) try 6mm spade connectors, as used in washing machines, dishwashers etc etc. The PCB side just has 2 pins to solder in (using a lot of heat).Alternative is PCB mount terminal blocks, heaps of different versions around.

author: Lovely_Santa
author_rank: Contributor
timestamp: April 06, 2016, 08:24:14 am
content: Quote from: RGB255_0_0 on April 05, 2016, 11:16:01 pmThanks, i'll use those, I even like those 2.54mm pins (have loads (and I mean huge loads) of male headers in stock :p)Quote from: station240 on April 06, 2016, 04:58:25 amI'll have a look thanks

author: Lovely_Santa
author_rank: Contributor
timestamp: April 06, 2016, 09:05:39 am
content: So here it is, all items that are needed for the project:Link to conrad.beIt's a €50 project (for me actualy 25 since I have all the capasitors and resistors)Just listed them if anyone want it...

author: StillTrying
author_rank: Super Contributor
timestamp: April 06, 2016, 09:05:21 pm
content: Hello, EEVBloggersI'm just popping in to point out the obvious.Starting from 12V, there's no way you'll get 10V @ 2A from that output circuitry. I think you'll be losing about 3.5V from the op-amp, about 2V across the power emitter followers, and up to 1V across the 470mR.Maybe 7.5V with no load, and 5V @ 2A if you're very lucky.What do you think about this simple design?Well you did ask.

author: Lovely_Santa
author_rank: Contributor
timestamp: April 06, 2016, 10:26:40 pm
content: Quote from: StillTrying on April 06, 2016, 09:05:21 pmYes I askedand thanks for thatI'm still a student, not a professional, even I make sometimes mistakes...That's why you should breadbord everything out and measure it... (I calculated some things while I made it, and some things i knew already)Let's do itI tested it today on breadboard (I did very quick the 2A test becose I don't have a huge heatsink connected to the power tranisistors at this moment)..The power supply give over 12V (12,15V). So let's just take 12...I have a 0,95V drop over the current resistor R11, what I was aware of...So then I still have 11V left that will float trough my active circuit.As far as I am concerned, the opamps need to be able to send output to activate the transistors... So that means it need to output 10V (+0,95V).. So 11V ... No problem with that power supplySo when I connect that even 10.5V (0,95V+9,5V) to the transistor, I get a 0,3V drop over the power transistor, so 11-0,3 = 10.7V on the output... (What I even measured and is correct).The problem is I need to get that 10.5V to the transistor. With the TLC271 have a 1.5V drop over my opamps on the rail.. But I was aware of that before I made it... The explaination for that is that I can't find 12V rail to rail (with short circuit protection) on my online shop. I'll go see on my local stores, but I don't have time for that.. TLC271 is the best I have for now...So I can get that 10V output, as long as I find a 12V rail-to-rail opamp...So for now, with the TLC271, when I try it with my currect setup, I get a 9.2V output @2A...So easy to get 7.5V with those... or it can be done to get 10V with rail to rail opamps...An other solution I thought about was to change the current resistor to a lower value, so I had less voltage drop.. But then the regulation is't that good becose I get a too low reference value.. So it gives lot's of noise.. So I'll go with the opamp solution.. (and stick to my plan :p )But thanks StillTrying to point that out, very correctly, but a bit too unsecure.. (but I guess it's just mee that's too secure..)

author: station240
author_rank: Unknown
timestamp: April 06, 2016, 11:11:48 pm
content: Have you considered using a Quad op amp instead of 3 separate packages ?Reason being less pins to solder (14 vs 24), uses less space, perhaps cheaper.

author: StillTrying
author_rank: Super Contributor
timestamp: April 07, 2016, 12:39:41 am
content: Hello Lovely_Santa. I don't mean to seem rude with my rather short answers/suggestions.Don't worry we've all been there, multiple times.Yes breadboard is good, but so is simulation such as LTSpice/SwitcherCad. It seems like a massive learning curve at first, but well worth it in my opinion. You can start very simply with just a voltage/battery source across a resistor, look at the V/I graphs and then wire up their 555 chip. I tend to use it to simulate just parts of a circuit such as your output stage.Back to your circuit. If you really want 10V output from 12V input I don't think you can do it that way. If you imagine the base of the BD139 shorted directly to the 12V, then its emitter will be about 0.75V below 12V, and the emitter of the 2N3055 another 0.75V below that.And it gets worse, because when those power transistors are saturated their current gains will be very low, may only 5 or so, which means the driving op-amp would need to supply 100mA at 12V, and that's not going to happen even with a rail to rail op-amp.The usual way to get around this low dropout problem is to change one of the output transistors to a PNP type, emitter towards the 12V input, collector towards the output. If you think about it now, rather than the op-amp having to reach right up to 12V to turn on the transistors, it now only has to pull down 0.8Vbelow12V to turn the transistor on.In practice because the op-amp won't reach right to to 12V to turn the transistor off, - you need a 2 resistor divider between the op-amp, base of the transistor, and the 12V line."change the current resistor to a lower value"Yes, I tend to use 0.1R there, so you don't lose to much voltage, and if needed I use a good old CA3140 to amplify the 0.2V up to about 2V. The CA3140's inputs and outputs work right down to 0V, even on a single supply.I hope I'm not confusing or putting you off, I find designing a stable PSU even at only 2A ,very difficult and I've been trying for about 30 years - so far.

author: Lovely_Santa
author_rank: Contributor
timestamp: April 07, 2016, 10:42:23 am
content: Quote from: station240 on April 06, 2016, 11:11:48 pmYes yes, but for my first version I wanted everything through hole... (for breadboard)... So when I looked for opamps, the TLC271 was only available in single opamps/package at that time.. I have the MC3403DR quad opamp.. It's in SOIC14 package. It has the same characteristics as the TLC271.I found even a 12V rail to rail opamp TL97* that could do the job (and that's sold in my local store... again, they have only one version in DIP package, for this one it's a TL972IP... So maybe i'll take those... They have also the TL974, but only in SMD versions...Quote from: StillTrying on April 07, 2016, 12:39:41 amIt's OK, no problem man, I'm happy you take time to helpQuote from: StillTrying on April 07, 2016, 12:39:41 amDidn't tought about that one... I'll see what I can find as pnp transistors, don't have many at the moment... Maybe i'll simulate it...I'll first ask my brother what he wants.. Becose he's more into microcontrollers etc... So he only need a nice current limited circuit at 5V most of the times.. Maybe i'll make him 2 supplies, 1 for at least 5V, and one up to 10V...Becose he realy want it fast, I have to make something with only the parts I have right now... So i'll tink I'll prototype board the one I have right now and say it's working fine up to like 6V or so.. If he needs more power, he can take one of my own power supplies, got more than one :p

author: StillTrying
author_rank: Super Contributor
timestamp: April 07, 2016, 01:34:12 pm
content: Just to give you some future ideas Lovely_Santa,A very rough output circuit, - in practice you'd have to do many calculations or simulations, and more components, before building it.By using 1 PNP you no longer have 2 base-emitter junctions in series with the 12V, so save 0.7V, which is a very useful amount when you've only got about 2V spare headroom to play with.By using the op-amp outputthe other way upyou no longer have to find an op-amp that goes right up to the 12V, just up to about 9.5V(output off), and down to about 1V(output hard on). Because you're inverting the sense of the signal here, you use the op-amp +/- inputsthe other way aroundso that the overall feedback is still negative.If you use a single supply type op-amp with inputs that work down to 0V, you'll be able to adjust the output down to very nearly 0V.Problems: Harder to keep stable at all output current levels than the double emitter-follower arrangement.

author: Lovely_Santa
author_rank: Contributor
timestamp: April 07, 2016, 03:28:30 pm
content: Quote from: StillTrying on April 07, 2016, 01:34:12 pmThanks for the ideas, always usefullStill when I have the right OpAmps that goes up to 12V, I still don't have that 2V spare headroom, but only like a bit above 1V, becose the voltage drop over the current resistor... Then I should get an amplifier on that voltage drop, which will give again some noise... So that's the reason why I want to stick with that 470mOhm resistor...Then your pnp setup is what you told me in your previous post, exactly what I was thinking... But you told already the reason why I don't prefer PNP transistors:Quote from: StillTrying on April 07, 2016, 01:34:12 pmThis is becose the p-type material in the transistor is much thinner than the n-type, with that reason the electrons will be less controlable floating from the emitter to the collector... That's what is causing the unstability...So I was thinking... I could go change it to a pnp based circuit, or I could higher my input voltage... If I give him the ATX psu, it has a -12V 1A connection. It's not a problem, becose is't isolated from the mains, so then he could use the -12V as the ground reference and then he has 12/15.3/17/24V (before -12/0/3.3/5/12V).. So then I could use the 15.3V maybe or even the 17V if that was necessary... But the problem then is that I need again other OpAmps to do this... I could take OpAmps from 16 or 20 or 24V operations... But then I need to find those (in my local store again...) Or the other solution is to limit the output to only a good 7.5V instead of 10V... It don't need to be perfect either... remember that it's just for my brother as a starter...So thank you StillTrying, now I don't know anymore what I want :p Still Trying to figure that out...

author: mikerj
author_rank: Super Contributor
timestamp: April 07, 2016, 06:02:54 pm
content: Quote from: Lovely_Santa on April 07, 2016, 03:28:30 pmNothing to do with electron/hole mobility; it's because the PNP transistor is configured as a common emitter amplifier so you have added at lot more gain into your loop.

author: technix
author_rank: Super Contributor
timestamp: April 07, 2016, 06:37:43 pm
content: This seem very similar to my own design but for a beginner's linear regulator I think this design is a bit of overkill, using op amps and all. You can actually make full use of the -12V rail from the ATX power supply for your op amps by the way.

author: Lovely_Santa
author_rank: Contributor
timestamp: April 07, 2016, 06:51:31 pm
content: Quote from: mikerj on April 07, 2016, 06:02:54 pmI agree, that's what I was trying to say.. Let me try again plz...Let's start from the basics.. PNP transistor is made of 2 materials N-material, which has an acces of electrons, and P-material, which will accept electrons. When P and N material is connected, this will ballance each other out, what will give a neutral zone (just like it would be normal silicium)... To let the transistor work, you need to apply a current that pushes the elektrons away, so with the negative pole to the P-material and the positive pole to the N-material.When you apply a voltage (greater than -let's say- 0,7V), so like you would apply to a normal diode (PN junction), there will be a current from the emitter to the base... (So the base current Ib) The moment you have that current, a large amount of electrons will flow from the P material, over the N material (like it will do on a NPN transistor) and over the other P material again... this will give negative and negative electrons, so this will force the electrons to flow back...So this is why you have to add a lot more into your loop to get the same result. Becose of that bigger amount it get's more unstable than an NPN transistor... So when you have the option to choose between an NPN and a PNP to get a job done, I would rather go for the NPN than the PNP... Or at least for the power supply here... But that's maybe my view on the case...What do you think? Maybe I'm a bit too theoretical..

author: Lovely_Santa
author_rank: Contributor
timestamp: April 07, 2016, 06:56:43 pm
content: Quote from: technix on April 07, 2016, 06:37:43 pmThen I would need a +-12V OpAmp... I could use it.. but it's useless... becose they will go rail to rail already... + I have a voltage drop over the current resistor... So it would only get a 3th connection in the system...

author: StillTrying
author_rank: Super Contributor
timestamp: April 07, 2016, 10:21:29 pm
content: I sort of agree on the stability of the output TRs.PNP TRs seem to benot quite as good as NPNs, slightly lower gain and speed, I think it's mostly imagination, when I was very young there were only PNP TRs.I think it's mostly what mikerj said, because with the darlington NPN NPN arrangement the voltage gain is only about 0.9, so it's stable. When you swap the first TR for a PNP you're sticking about 30+ voltage gain where it's not needed. You can reduce the PNPs unnecessary voltage gain by putting a small resistance in it's emitter, but then start to lose the 0.7V you gained in volt drop across that resistor. Although you keep nearly all the gain of not needing an op-amp that goes right up to the supply rail.Everything is compromise somewhere or other.

author: Lovely_Santa
author_rank: Contributor
timestamp: April 08, 2016, 10:27:02 am
content: Quote from: StillTrying on April 07, 2016, 10:21:29 pmYeah.. everything will give other problems... I just think that the 2V isn't enough to get the 10V output + 2A (voltage drop)...So let me say it again:Quote from: Lovely_Santa on April 07, 2016, 03:28:30 pmOr like technix said, maybe look into some designs without op amps at all... but i'm not so sure if it will be as stable as it will be now :s ...

author: technix
author_rank: Super Contributor
timestamp: April 08, 2016, 05:49:41 pm
content: Quote from: Lovely_Santa on April 07, 2016, 06:56:43 pmAll voltage rails are available at the main 20/24-pin plug. Quite a few common op amp can work with a +/- 12V power rail, like TL084.

author: technix
author_rank: Super Contributor
timestamp: April 08, 2016, 05:52:05 pm
content: Quote from: StillTrying on April 07, 2016, 10:21:29 pmOne of my recent linear power designs used P-channel MOSFET as the pass element (down to 100mV headroom!)

author: Lovely_Santa
author_rank: Contributor
timestamp: April 08, 2016, 06:18:22 pm
content: Quote from: technix on April 08, 2016, 05:49:41 pmNow that I think about that... I guess I will have more opamps that qualify if I take a symetrical power...EDIT: took a look at the TL084... It can be used up to +-18V... so good enough.. AND it include the Vcc+... So this would work with the pnp setup...It could also work with the npn setup like it is now... even beter than the TL271's...I'll go next week to my local store and see if they sell those... (I can get them online... but that would take some time as I need 35€ to get free shipping, so it will stand then on the list)

author: Kleinstein
author_rank: Super Contributor
timestamp: April 10, 2016, 05:46:30 pm
content: Using a PNP or P-MOSFET output stage changes the circuit a lot - it is not just inverting the signal, but a whole different (and usually slightly more complicated) type of compensation. If done right this can give good performance. The simple emitter follower type regulators can have trouble with highly capacitive loads too.A suitable Rail Rail OP for 12 V operation is a TS912/TS914 - not sure about short circuit proof.The -12 rail from the PC supplies is usually very weak, so at best to power some OPs or give a minimum load to the output transistors.

author: Lovely_Santa
author_rank: Contributor
timestamp: April 10, 2016, 09:24:47 pm
content: Quote from: Kleinstein on April 10, 2016, 05:46:30 pmThe -12V rail is indeed weak, but 1A is more than enough to power some OPs..Thanks for the suggestion, the TS912/TS914 are both sold by my local storeOnly on smd mount, but i'll make a little pcb for SOIC8 to DIL8 to test on breadboard