ATX Power supply constant current mod - Page 1
Forum section: electronics / beginners

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: September 02, 2020, 08:58:49 am
content: I'm trying to mod a ATX power supply to get variable current control, eg. If set the control to 1A I should get a constant current of 1A.That said I want to pull as much current as I can probably till the full rating of the supply rail.I'm trying to take some inspiration from this guy who modded the power supply to get around 2A constant current.https://freeelectron.ro/diy-switch-mode-constant-current-supply/I opened up an ATX and found that it contains a SDC2921, this IC is the PWM controller and has the over / under voltage protection circuitry in it.This chip has one error amp which is currently used in voltage control mode, both the 12V and 5V rails are sensed by the error amp and a control output is generated accordingly.The error amp pins14 - Output15 - In(-)16 - In(+)It seems that the In(-) pin is internally connected to reference of 2.45V.I have attached a screenshot of the mod I'm proposing to do, I will sense the current with a sense resistor on the output rails like 5V or 12V and then get it to around 2.5V level with a diff amp and then sum it at he junction of the voltage sense 12V and 5V as shown in the figure.My question is if1. If I do current sense do I need to remove the 12V/5V voltage sense (although this may raise the voltage levels at the output, and I may need to change the output caps) .2. can I keep both the voltage sense and current sense connected, and would the current sense work in this configuration?TIA

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 02, 2020, 02:43:42 pm
content: A power supply like this is a complete control system.If you change the feedback, you may introduce intabilities, which cause oscillation.The chip itself probably does not care (nor know) what it is controlling.If it gets more feedback, it outputs less, if it gets less feedback, it outputs more (PWM probably).But getting those loop parameters right is not a real "beginners" task, nor is messin' around with mains voltage.If you're just looking for a cheap power supply, an old fashioned mains frequency transformer would be a better choice. Or leave the ATX power supply closed, and add an external circuitry for the current control.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: September 02, 2020, 03:12:25 pm
content: Quote from: Doctorandus_P on September 02, 2020, 02:43:42 pmI appreciate your concerns, and thank you for the pointers for dealing with mains voltage. I will be taking the necessary precautions and safety measures when working on the power supply.QuoteI need a high current source that is adjustable, and atx power supply are a good avenue from which high current can be pulled off. Commercial power supplies with high current outputs are expensive and will break the bank.You suggest that I should leave the power supply closed, what kind circuits do you recommend to connect externally, they would have to be switch mode considering the current levels involved, and then an external switch and circuitry, to then control the switch, if I get it done internally, it might take and op amp and a sense resistor, and that uses the internal switches.Hoping to hear from you again.I hope the experts over here will share their experience and hopefully we get this working.

author: magic
author_rank: Super Contributor
timestamp: September 02, 2020, 07:45:38 pm
content: Quote from: ZeroResistance on September 02, 2020, 08:58:49 amYou can imagine that R2 consists of two resistors in parallel, each forms a divider with either R1 or R3 to turn 12V or 5V, respectively, into 2.45V. Connecting outputs of the dividers together produces a weighted average of their individual outputs, where the weights are inversely proportional to output impedances of the dividers (output impedance of a divider Rx,Ry is Rx in parallel with Ry, by Thevenin's theorem). The error amplifier has one of its inputs fixed at 2.45V so it tries to make the other input 2.45V too. This is what happens when both rails are in regulation (or one is too low but the other too high, the beauty of group regulated PSUs).If you add current sense signal through a third resistor, it will get averaged with the dividers, with a weight determined by the added resistor. Zero output current will pull the average down, forcing the output to increase to maintain 2.45V, increasing current will slowly force the outputs to go back to normal and then further down to zero. That's not really what you want; instead, a diode would be better.There is some risk of introducing instability and having the controller oscillate around the intended current (say, 0A to 2A and back instead of a steady 1A). Not a great thing to happen.

author: ZeroResistance
author_rank: Frequent Contributor
timestamp: September 04, 2020, 09:04:56 am
content: This is the circuit of the error amp that I traced for the ATX power supply that I opened.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 04, 2020, 02:18:26 pm
content: The circuit you need depends on the the purpose it's for.For controlling DC motors, a simple FET PWM chopper is good enough.There are a lot of buck converts and schematics, which can be adopted by changing the switching elements and anductor.Also, Current mode LED drivers are very common, from very little chips, to vey versatile options.I've bought a roll (about a meter) of PT4115 some time ago, only to discover I already did the same previously, so now I've got ... plenty of them.But for "high current" you're probably better of with a chip which controls an external MOSfet.There are also a lot of different (half) H-bridge MOSfet drivers which may be adoptable to go in between some uC and some MOSfets.What sort of loop speed do you need? uC's with 1MSPS ADC's are common these days and are probably good and fast enough as a base for an SMPS.DPS5005 modules are sold for less then EUR 30 from China direct, and are universal power supplies, upto 50V 5A. They also have 20Amp versions, and these modules have current limiting, but I don't know how good it is.Recently I had a peek at the datasheet of a TPS54331 ( Litlle SOIC08) step-down SMPS, upto 3A).It is not the chip you want. I mention it because it is sold as a voltage regulator, but the thing itself is a current source with voltage feedback. Other SMPS chips probably do similar.