Korad KA3003D redesign and upgrade - Page 1
Forum section: electronics / projects

author: cowana
author_rank: Frequent Contributor
timestamp: August 25, 2016, 11:02:04 am
content: My lab has a couple of large bench power supplies, but I recently wanted one with a smaller footprint, for use at my PC desk.The Korad KA3003D fits the bill nicely - 30V/3A is ample for the majority of projects, and it's a nice compact size with a well laid out front panel.Having bought one cheaply, it does a good job - although there are several features that could be improved. Being an engineer, this seems like a good opportunity for a project!The chassis, transformer, controls and main capacitors/switching transistors make up a lot of the cost of a PSU - so using these existing elements provides a much better starting point than beginning a PSU project from scratch.The current controller board is rather limiting (unrecognisable microcontroller, R_2R ladder DACs etc), so I am planning to redesign and replace this board. The button, display and rear switching boards all do their designed job well enough, so can stay as they are and connect to my new board.Summary of new features:Replace the rotary encoder with a higher quality one, with a centre press for navigation through menusReplace the R_2R ladders with a proper 16 bit DACAdd a seperate high spec 16 bit ADC, with built in 30ppm referenceAdd proper temperature control to the fan. It should be totally silent if you're only drawing a few mA, not idling at 1000rpm!Drive the piezo with the micro's timer, so sampling the buttons/muxing the LEDs doesn't modulate the audio and sound awfulMake memories act like memories (long press to save). Sort out OVP and OCP. Acceleration on rotary encoder. Add power/energy readout options.Increase max output voltage limit for low currents (eg 35v at 500mA). Improve regulation and transient performance. Ensure the output is actually 0v when output is switched offModify the display board to change the OCP and OVP LEDs to RGB. One colour when set, one when at their limit.Add isolated USB interface (for calibration and control)Add remote sense contacts on rearAdd 5v power output on rear (USB A socket). Use connector with detection pin, so OVP is set to 5v when USB is plugged inI'm doing this project as a learning project - trying to design the best possible power supply. I've gone for an overkill microcontroller (STM32F4 @ 84MHz) as I want to try experienting with their features, and try out FreeRTOS on a project. Plus they're only ~£2, so it seems silly to go with something smaller.I've attached the schematic so far (both as a pdf and images), and would be grateful for any thoughts. Sheet 1 is the basic DC rails, sheet 2 the digital logic, and sheet 3 the analog regulation circuitry (which I'm sure could be improved!). Sheets 4 and 5 are for reference, and are the existing circuitry on the switching and IO boards. Sheets 4 and 5 are partially based on the excellent reverse engineering done by user pomonabill221, and partially on my own investigations.Overall, I'm approaching this as a learning project/design exercise, trying to get the best spec out of something cheap, small and reasonably lightweight!Edit 2/10/2016: Please see Reply #23 for the latest schematics and PCB designs - the ones attached to this post are outdated and just here for thread continuity!

author: bitseeker
author_rank: Super Contributor
timestamp: August 25, 2016, 07:32:01 pm
content: Quote from: cowana on August 25, 2016, 11:02:04 amPlus, it's just as much fun to mod an existing device to improve/extend it as it is to make something from scratch. Looks like a nice set of enhancements.

author: Kleinstein
author_rank: Super Contributor
timestamp: August 26, 2016, 10:12:23 am
content: These cheap supplies often run rather hot and squeeze more current out than they should. So one should likely reduce the maximum current - at least when the higher transformer tap is used. The transformer will likely not like more than about 2A on the long run when at 30 V, 3 A at up to 14 V might work. The original 3 A are OK for short time (e.g. 10 min) use, e.g. if there is kind of slow acting / temperature sensing protection.For the given transformer you may not have the option to get a +-24 V. You likely have to stay with the same type of regulator: so a main supply with likely 2 transformer taps and an auxiliary supply for the control circuit.Staring with a cheap supply could well be cheaper than buying the transformer, case, heat-sink and other reusable parts.

author: cowana
author_rank: Frequent Contributor
timestamp: September 02, 2016, 07:59:48 am
content: Thanks Kleinsein - that's a good point about the transformer potentially being a limiting factor. It does have a thermal cutout embedded in it, but I'll add a separate temperature sensor to my schematic - that way it can start winding back the current as the temperature approaches the cutout point. It could also make the buzzer activate at this point in order to alert the user.I'm keeping the overall design (exactly as you said; 2 transformer taps and an aux supply for the control circuit) the same as the original control board, to stick with the original transformer. The +/-24v supply is that aux winding for the control circuit, which the Korad board regulated down to +/-12v. I'm using +/-10v as my opamps have a slightly lower max voltage (MAX44251s).As I've currently done the new design, I'm clamping the sense terminals to the output terminals via back-to-back diodes (so the maximum difference is ~0.7v). Is this an acceptable way to ensure a broken sense connection won't suddenly put a big voltage on the output of the PSU?Another improvement I've made is to add a relay (RLY2) to physically disconnect the base of the main switching transistors when the output is meant to be turned off. The original Korad design did not have this, meaning when off the supply outputted a 'regulated' 0v (which was often around -100mV). Should this work, or do I need to include some additional circuitry to stop a spike on the output when the relay is closed (supply switched on)?Both of these sections are on the attachment Sheet 4 of the original post if anyone is interested in taking a look.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 02, 2016, 09:38:05 am
content: The more normal way to protect again a lost sense connection is having a resistor (e.g. 50 Ohm-1K range) between the power output and the sense line. There can also be an additional diode (usually just 1, but high current !), but this is more to protect the resistor from overload (if the power connection gets lost or a user uses just the sense terminal). A 100 Ohm resistor usually does not introduce a significant error, as the sense line is usually still low impedance (e.g. << 1 Ohm) - so still > 99% of the drop are corrected.A lower supply for the OPs is OK, for the MAX44251 I would even consider +-5 V or maybe +8 and -4 V. I don't think a large negative supply is needed or helping. It's better not to get to close to the absolute maximum. It's strange to me why the Korad design needed +-15 V. Usually something like + 5 or 6 V and -2 V should be enough be for such a supply.It should even work using only a single 24 V raw voltage and use a shunt regulator / virtual ground for the negative side. So one could get away with slightly less power - though not that much, as most of the power would be from the +5 V / +3.3 V and only the negative current is what is saved.For the regulator circuit I would be careful in using an AZ OP like the MAX44251 - there could be an extended time to recover from saturation. So it might need extra anti windup circuitry to prevent the OP to go into saturation.

author: cowana
author_rank: Frequent Contributor
timestamp: September 02, 2016, 11:28:05 am
content: Quote from: Kleinstein on September 02, 2016, 09:38:05 amThanks for the advice - I'll factor in that change (along with a few others) over the weekend. My previous design had been to cope with a floating sense line - it makes lots of sense the issue could just as easily be a floating power line (and so the sense connections would need to power the load).Quote from: Kleinstein on September 02, 2016, 09:38:05 amIt seems obvious when you say it! I was concerned about having to protect the ADC (rated at an absolute maximum of +/-6V on the input) from the full opamp's range - decreasing the opamp supply rails to +-6V solves this issue and is a much neater solution. The MAX44251s are rail-to-rail, so there's no need for such a high supply voltage.Quote from: Kleinstein on September 02, 2016, 09:38:05 amAm I right in thinking that when in CV or CC mode the opamps controlling that mode are in the linear region (with the unused mode's second opamp saturated) - then when it changes from one mode to the other, this swaps over? Is there any way of telling this recovery time from the datasheet? The only time I could find that might be related is the power-up time (25us) - I don't know if this would indicate the order of magnitude of the recovery time?

author: Kleinstein
author_rank: Super Contributor
timestamp: September 02, 2016, 02:10:47 pm
content: In the normal CC/CV regulation circuit, the OP that is not in linear operation will usually go to saturation. However there is a possibility to add some circuitry to prevent this to make the cross over faster. However this might add a minimal offset error (e.g. due to transistor -leakage). For an AZ OP I would really consider this.The time for recovery could be comparable to the power on time. 25 µs might still be acceptable, though not really good. It also depends on how much extra offset is present for the initial phase. If there is no direct number for the recovery, this is about the best guess, at least for the order of magnitude.For just a supply and not a calibration source, I don't think you need AZ OPs for regulation. Just good low offset OPs (comparable to OP27) should be good enough. Current measurement might be a different thing.

author: Kevin.D
author_rank: Frequent Contributor
timestamp: September 02, 2016, 07:10:21 pm
content: Hi Cowana .I agree with you on modifying rather than building from scratch .On the use of 'guard' diode or resistor between +/- Vout and Vsense to protect the load againstremote sense accidents.I think it's swings and roundabout's on whether a guard diode or guard resistor is usedLets look :- there are 3 possible scenarios we can guard against.1 . Remote sense becomes uncoupled. In which case Vout rises to max without protection .Either using a diode or resistor will limit this rise .2. Main wire becomes uncoupled. Here if using a guard diode then the Remote sense wire (usually thin) will then have to carry all the current (this is no prob if you don't mind the wires burning when this happens).On the other hand if guard resistor is used then this will limit the sense wire current BUT the mainVout (disconnected) side of the guard resistor will now rise to max Voltage. (so the large capacitoron the main output gets charged upto Vmax which then gets delivered to Vout on re connection of main wire to your load).3.Remote sense wires polarity gets mixed up (e.g. V+ sense is connected to -Vout) in which case for the guard diode case the outcome is similar to 2 above (diode and sense wire must carry full current),For the guard resistor case it's also going to be similar to the resistor in 2 above with Vout rising tomaximum.I would say the diode is preferable to the resistor if you consider above, most bench supplies usejust one or the other (oddly I just checked with my meter what my thurlby pl330 uses and it uses adiode on +Vsense side but a resistor on -Vsense side despite the schema showing resistors on bothterminals).A possible alternative to would be to use the BE junction of a small npn transistor (with say a 1kres in the base to limit current) in the place of the guard diodes and connect the collector to pulldown the base/gate drive to the pass transistor (or pull down current limit). So whenever the remote sense difference exceeds ~.6 drop on either lead BE becomes forward biased and Vout is pulled down to low value) this should give full protection in all the above scenarios.regards

author: cowana
author_rank: Frequent Contributor
timestamp: September 02, 2016, 08:21:22 pm
content: Quote from: Kleinstein on September 02, 2016, 02:10:47 pmFor each of the current and voltage regulation, there are the two stages - the first which amplifies the voltage/current to the right scale and range, and the second which compares it to the DAC output and does the actual regulation. As it's only this second stage which saturates, the first stage can be an AZ type (thus being nice and accurate) - then the second stage can be a more standard opamp, which recovers quickly from saturation. The only slight disadvantage is from a PCB layout/routing point of view - if dual opamps are used, the original design means one opamp can be used for both voltage parts, and one for both current parts. With one AZ and one standard, the AZ opamp is used for the initial stage of each, then the standard for the next two. Electrically superior, but will make layout slightly less elegant.Quote from: Kevin.D on September 02, 2016, 07:10:21 pmI think a parallel resistor and diode seems to be a good compromise between simplicity and performance. The resistor means that if you forget to connect the sense, it will be pulled to the output (through the resistor), giving you a pretty accurate output - whereas just having a diode would add on the diode's drop. If you try and draw power through the sense wires, the paralleled diode will clamp the voltage drop and ensure you don't burn up that resistor.This behaves reasonably sensibly in all of your three scenarios - ensuring the voltage on the output terminals isn't able to spike up is important.I've updated the schematics in the top post to change the opamp supplies to +/-6v, and to change the sense connections as described above.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 03, 2016, 07:32:13 am
content: Even with just 100 Ohms for sense to power output, there will be a little drop on this resistor. Depending on the divider used this could be something like 1-0.1% of the voltage. So it might help if the voltage divider is not relatively high impedance. This usually is less than a diode drop, but for an accurate voltage one should still have a low resitance connection if the sense inputs are not used.I think you can't just directly connect the sense+ to ground. This might be acceptable only if the sense lines are only internal to compensate for internal wiring drop. But this would also meat that base current in flowing through the shunt too. So voltage sense would need a difference amplifier without the direct sense-GND connection. The regulator GND should be connected to the main power between the output stage and the shunt.The 0.1 Ohms shunt usually does not need protection by diodes. It should be large enough to stand something like 5-10 A anyway, to keep normal operation temperature in a reasonable range. In a more paranoid design, there should be a fuse in the power output line, as there is a chance that an external source might deliver higher current than the reverse diode can stand.

author: mrchen
author_rank: Newbie
timestamp: September 11, 2016, 09:11:07 pm
content: Quote from: cowana on August 25, 2016, 11:02:04 amcowana, I am glad I found your post! I have a Tenma 72-10480 PSU which is a rebranded Korad KA3003D. The fan is indeed spinning even with no load. Please seehttps://www.eevblog.com/forum/testgear/tenma-72-10480-(korad-ka3003d)-power-supply-noisy-fan/.On the power (rear) board there is an NTC but the fan seems to ignore it completely. I even started thinking that my unit has a fault.Any ideas why the fan does not react to the temperature of the NTC?

author: rdl
author_rank: Super Contributor
timestamp: September 11, 2016, 10:10:51 pm
content: Just guessing here, but maybe the NTC has nothing to do with the fan. It could be there just so the MCU knows to shut everything down in an over-temperature situation. It may need to get really, really hot before anything happens.

author: mrchen
author_rank: Newbie
timestamp: September 11, 2016, 11:28:19 pm
content: Quote from: rdl on September 11, 2016, 10:10:51 pmI forgot to mention - I shorted across the NTC with a screwdriver (simulating high temperature) - no reaction whatsoever!

author: cowana
author_rank: Frequent Contributor
timestamp: September 13, 2016, 03:12:40 pm
content: Quote from: Kleinstein on September 03, 2016, 07:32:13 amWhen the front panel terminals are used, the relay will connect the sense connections to the output (so they are not floating). If I decide to use the rear terminals, it's probably because I want to use the sense connections - so again the floating condition shouldn't be too much of a problem.Quote from: Kleinstein on September 03, 2016, 07:32:13 amGood spot! In the original Korad schematic, the GND point was connected to ISENSE- (also VOUT+) - when I added the sense connection, I moved this across. I'll move the GND point to the the driver side of the shunt (the node called ISENSE+), to stop the base currents flowing through the shunt.Quote from: Kleinstein on September 03, 2016, 07:32:13 amI had assumed that the big diode (D3) was to protect the rest of the output stage rather than the shunt (plus it doesn't really protect the shunt at all, as it is on the driver side anyway). If this diode was on the output side then any reverse current wouldn't go through the shunt - would this be a better option? I've seen this type of diode on most power supply schematics, so I'm assuming it's fairly important!Quote from: mrchen on September 11, 2016, 09:11:07 pmIt's possible that the Korad engineers never wrote the firmware to monitor the NTC! My unit is currently in pieces, but next time I have it together I will try shorting out the NTC and seeing if the software does anything in response.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 13, 2016, 06:35:19 pm
content: In most circuits I have seen so fat the diode D3 is on the other side of the shunt. It somewhat depends on the size of the shunt (how much it can stand worst case) and diode if this is a good idea or not. Usually D3 should be a rather beefy one, so it can stand as much as the strongest supply someone might put in series. So maybe at least a 5 A type, maybe more. If a little paranoid, have a fuse (e.g. 4 A) behind the shunt, just in case - the diode should be stronger than that fuse. So needs the shunt, if the diode is on the drive side.Reverse current of the diode is usually not that important with modern silicon diodes the usually supplies don't resolve µAs, not with a 100 mOhms shunt.The diode is important if the supply is used in series with a second one, the fuse would be to protect the diode and maybe the shunt.The shunt value of 100 mOhms might be a little high for 3 A (quite some power and thus high temperature increase). So one might consider a lower value (e.g. 50 mOhms), but this depends on the existing part, a really beefy 100 mOhms would be OK.

author: cowana
author_rank: Frequent Contributor
timestamp: September 17, 2016, 12:05:13 pm
content: Thanks Kleinstein - your input to this project has been really helpful!I'm reaching the stage where I'm very happy with the schematic - I'll now start working on choosing exact components and moving onto the layout.I've updated the attachments in the first post, with changes including:Large protection diode (5A rated) moved to the output side of the shuntShunt resistor lowered to 50mR to decrease power required, and opamp gain increased to matchThe second stage of opamps (which get saturated) are now a OP2177. Small, low cost, pretty good specs, and a quoted saturation recovery time of 4uSCommon GND point moved to ISENSE+ node to avoid base currents going through shunt. Spilt resistor biasing modified to suit

author: Kleinstein
author_rank: Super Contributor
timestamp: September 17, 2016, 01:39:58 pm
content: The zener diode for protection might cause some errors due to leakage. So one might need to use a higher voltage value, maybe even the base-collector junction of a small BJT (as a low leakage about 7 V zener).The input amplifier for the voltage reading needs take into account the impedance of the divider and the split GND. So choosing the values needs some care. There should also be a capacitor at the + input of the differential amplifier to complement C26 (even if this might end up at 0 pF ).C29 for the shunt amplifier is likely not needed. Similar place for an extra cap at the + input might be a good idea.Just in case it is needed to get the compensation, a small cap in parallel to R33 (voltage divider) might be a good idea. Some such circuits use this.The OP2177 is relatively slow. So it might be worth limiting the output voltage. A crude way would be a diode from the OPs output to GND, so that the voltage can not below -0.7 V (usually no need to go below +1 V).Some better supplies also have a fixed hard limit for the control voltage where D10 and D15 come together. This is an additional fast hard limit for output stage. This might help to limit transients, especially with the relatively slow OPs.

author: cowana
author_rank: Frequent Contributor
timestamp: September 17, 2016, 03:03:16 pm
content: Quote from: Kleinstein on September 17, 2016, 01:39:58 pmWould a regular diode between the opamps IN- and VCC pins work as a replacement? That way you just have the extremely minimal reverse leakage most of the time, but a high voltage will clamp around VCC+Vf, which the opamp will tolerate.Quote from: Kleinstein on September 17, 2016, 01:39:58 pmIs that cap to GND (rather than the opamps output)? I'll also add some test points for scope probes throughout the design - I have a feeling they'll come in handy!Quote from: Kleinstein on September 17, 2016, 01:39:58 pmWhat makes you say that? (I'm interested in learning, not doubting you!) The capacitor in the feedback loop decreases gain at higher frequencies, so slowing the response down. I would have thought that was actually more important for current than voltage (as current will spike then connecting/disconnecting loads) - is that not the case?Quote from: Kleinstein on September 17, 2016, 01:39:58 pmIs that specifically across R33, or would R41 do the same thing?Quote from: Kleinstein on September 17, 2016, 01:39:58 pmIt looks like the control node (the common end of D10 and D15) should sit at about 1.8v at all times (three stages of transistors, so 3 * 0.6v drop). That means the opamp output should be around 1.1v while regulating, and higher when that mode isn't being used (eg CC mode isn't used when no load is connected). Does that not mean you'd want to limit the positive end (eg stop it going above 1.8v), rather than the negative end? I can't imagine a scenario where it would saturate at the low end (trying to reduce the output voltage, but unable to), unless the whole thing was unstable and oscillating...With your crude method, surely clamping the output with a diode is a bad idea, as it'll just pump as much current as it can through the diode, trying to get the voltage right down (and damaging the opamp). Do you not need some kind of feedback mechanism to the input?

author: Kleinstein
author_rank: Super Contributor
timestamp: September 17, 2016, 04:08:29 pm
content: Diodes to the supply should be OK for limiting at the input. There should be sufficient load not to drive the supply to high anyway.The extra capacitor at the differential amplifiers would be from + input to GND. I am not sure if it will be needed, but it is good to have it in the layout. In principle this is to continue the low pass function for the + input too and keep good common mode rejection. Chances are the capacitor in feedback will not be needed as well.The amplifier current feedback has a high gain of x20, thus the bandwidth will be limited by the OP (though fast) already. To slow a feedback can cause oscillations. The real point where the response is set is with the other OP. As a crude rule of thumb, a simple feedback loop should have only one capacitor that limits the speed - this is called dominant pole compensation.If there is a problem with transients that you don't want to show up on the display, some filtering before the ADC would be the right place. But usually the display / ADC is slow enough by itself.The possible extra cap in the feedback divider should bypass the larger resistor. So if other values are chosen, it would be the other resistor, if this is more convenient for the layout. With the values show, something like 10 nF on parallel to R33 could be about right for improved response, but it depends on the rest and a simulation would be a good idea to find good values. I should have a similar circuit for simulation already - so not that much to change.A very negative output of the OP would only happen during transients. The normal OPs have a limited output current (usually in the 20 mA range) so nothing bad happens to the OP. This could happen when the set voltage is reduced without a load - than it takes quite some time (e.g. ms range at least) to get in regulation again. Thinking more about it, this type of transient should not cause a real problem (could be slight undershoot in the case mentioned), so you can leave that out.The more important type of saturation is the OP at the upper limit, but here a solution is more complicated, especially if one wants high precision. The limited positive supply is a first step already. One way to reduce the effect of saturation is to have an additional RC feedback from behind the diodes. The original RC feedback can than be much faster (more or less to keep the OP happy, if needed at all) and the main part is coming from behind the diodes. This method would also profit from the extra hard limit of the voltage (e.g. during transients, or when the output is off through the relay.For the output disable, it should be enough to disable the positive current, the diodes work against. So one could replace the the relay with something like a PNP transistor.

author: cowana
author_rank: Frequent Contributor
timestamp: September 17, 2016, 05:08:16 pm
content: First post attachments updated.Quote from: Kleinstein on September 17, 2016, 04:08:29 pmCommon mode rejection is a good explanation for that one.Quote from: Kleinstein on September 17, 2016, 04:08:29 pmThat makes a lot of sense too!Quote from: Kleinstein on September 17, 2016, 04:08:29 pmThat's a hard one to get my head around the operation of! I gather you're talking about a series R and C between the control node (the common of D10/D15), and the inverting input of the second stage amps. As the circuit is currently drawn, the operation is obvious - I don't see how changing the main feedback point to the control node would prevent the unused second stage from saturating. That would be with AC coupled feedback - if it was DC coupled, then it diode drop makes it rather complex!One of the good things about the OP2177, is the recovery from a high output voltage (the worse of the two cases in this application) is significantly faster than recovery from a low output (1.4us vs 4us recovery time, then plus 0.7v/us slew rate). That mean should total time from saturation at the positive rail to regulation (1.1v) is around 4.1us, which is probably fast enough compared to the speed of the rest of the loop and the output capacitance.Quote from: Kleinstein on September 17, 2016, 04:08:29 pmI think I'll stick with the relay - I much prefer the PSUs I own that make a 'click' when you turn the output on and off! I do appreciate a PNP transistor in series with R36 or R37 would work equally well though.This is my first proper PSU design, and all your advice has been really valuable and useful. I've reverse engineered several commercial lab PSUs before, and it's really interesting to see how much room for improvement there is on those - for example the original Korad had a huge number of fundamental areas that could be improved (such as using a +-12v supply for the amps, or having the control board GND connected to the wrong end of the current shunt). Maybe Korad need to start asking for help on the EEVBlog forum.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 17, 2016, 07:57:56 pm
content: The circuits in these cheep supplies are really as simple as possible and may evolve over time. The main reasons to change an old working circuit would be if old parts get to expensive or if there is smaller cheaper solution that is still good enough. In old times, before simulations finding the right compensation was a little tricky and still is, as in some cases even the layout has an influence. So they avoid changing things if the old one is ok and not oscillating.A 4 µs delay from the OP is not that bad, but also not that good. The limited slew rate may not be such a big problem, as the main delay is often from the charge in the feedback capacitor and this can already limit the slew rate to even lower values. So more important than a faster OP could be limiting the windup in the small compensating caps. Having the feedback from behind the diodes avoids a large extra charge in the capacitor and thus gives a smoother cross over from CC to CV mode and back. It is also quite simple, so I wonder why we don't find it more often. A few supplies use this variation, but not many.For the simulations I used LT1001 and LT1057 for the slow and fast OP: cross over CC to CV in the original circuit is something like 25 µs or 15 µs compared to 15 µs or 3 µs with the modified circuit. So the modified circuit could really profit from a faster (higher slew rate) OP.Old regulators like the typical 723 circuit and the even older MC1466 used a similar trick, with a common compensation for CC and CV mode. Usually the crossover is good there.edit:The protection diode to replace the zener should be more towards the negative supply (e.g. -5 V ) and maybe one to GND, as normally the voltage should not be positive anyway. The diodes gets more important with the extra cap.

author: cowana
author_rank: Frequent Contributor
timestamp: September 18, 2016, 06:01:02 pm
content: Attachments in post 1 updated.Quote from: Kleinstein on September 17, 2016, 07:57:56 pmThanks for the explanation - that makes a lot of sense. While in regulation, it makes no difference as the capacitor blocks the DC offset provided by the diode, and when the changeover happens, the built up charge is avoided. Very neat!Quote from: Kleinstein on September 17, 2016, 07:57:56 pmI've chosen the OP2177 as it is cheap, compact (two OPs in an MSOP-8), and reasonably good specs. Am I right in thinking this choice is suitable and I'm not going to regret the decision when I come to tuning the CC/CV changeover?Quote from: Kleinstein on September 17, 2016, 07:57:56 pmGood spot. The extra diode to GND isn't required, as the VSENSE- node is clamped from positive voltages by the series chain of VSENSE- -> D29 -> D3 -> R29 (50mR) -> GND.As far as I can see, the specs for the signal diodes used in the circuit (notably D10 and D15) don't have to be anything particularly special. The jellybean BAS16 has a worst case leakage of 0.5uA, and reverse recovery time of 4ns. For the protection diode D4, 0.5uA could give a 0.05% error full at full scale (negligible) - should I be okay using BAS16s throughout the design for the low current paths? Obviously D3, D5 and D29 would be higher current rated parts, as leakage and recovery time are not concerns here.I also realised the circuit used to notify the micro that CC mode is active would not work as I had previously designed it (bottom right of sheet 3). The output of the current regulation opamp is ~5v when not in CC mode, and ~1.1v when in CC mode. Fed directly to a transistor, this would always be active (as >0.6v) - hence the potential divider made of R55 and R94 is required.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 18, 2016, 08:48:15 pm
content: The BAS16 should be OK for the small signal use and protection. It might be a good idea to still have the protection diode to GND, as the extra capacitor (if used) can make it react on fast changes (e.g. a short). Anyway the OP2177 should even include some internal diodes.In my simulation the modified version with a slow OP (LT1001 is rather similar to OP177) is about as fast as the original version with a really fast OP. The simulation were for a fast setting optimized with an LT1001 and only 20 µF output capacitance. This may not be realistic in real life due to parasitic effects. So the OP2177 should be fast enough. A faster OP could allow for a slightly better transient response, especially for the CV/CC cossover.p.s.:To see if the OPs are fast enough, it might need simulations of the circuit. This is anyway a good Idea to get the right size for the caps.

author: cowana
author_rank: Frequent Contributor
timestamp: October 02, 2016, 12:53:49 pm
content: I haven't had quite as much time for this project as I would have liked, but I think I'm about there. Final schematic and PCB attached to this post.There aren't too many changes since the last version, just a number of tweaks done along with the PCB layout. These include:Addition of heatsinks to the two main linear regulatorsChanging these linear regulators from 317s to 7812/7805s. Slightly higher noise, but no voltage setting resistors needed, and will do the jobDiode isolating of the 24v supply used for the +6/-6v analog rails, to stop that dropping under the main loadA seperate LC filter on the part of the 5v rail used for the analog section, to cut out digital noiseFerrite beads on the power supply of ADC and DAC100R series resistors on the SPI lines, to prevent ground bounce between digital and analog sectionsVarious pin swaps on the STM32 to aid with routingSwitched to an STM32F410, which has a DAC. The board has a speaker, why not have the hardware to use it properly?Separate high current return path for relays, fan and speaker amplifierBack EMF protection diodes on the relays. The ULN2003 driver has them already, but dedicated diodes limit the size of the current loopSmall (10nF) capacitor across the + and - sense lines. Hopefully will smooth out anything picked up as they cross the boardLC filter added to +12v providing the main transistor control signals. Should remove relay/digital noiseTest points changed to 2-pin headers (signal + ground), for easy connection and monitoringThere are still a number of tweaks needed on the PCB (via stitching, neatening the silkscreen), but it's basically there. There are ground planes on each side of the board, and there's a split between the analog and digital sections to keep the currents in their own domain. The control signal (going up to the output board connector, CN3) has a dedicated guard trace round it, which is connected to the analog ground.The shunt resistor (lower left) is connected in a 4W-sense method - the light brown shape around that area is just a route keep-out to block the copper fill from that area.The isolated section in the top-left corner is the USB interface - this is isolated (via the UART side), and allows the unit to be controlled/upgraded via an isolated interface exposed to the outside world.I'm sure there will be a lot of tuning and tweaking component values once I start assembling it, but I feel like it's at a good starting point. Any comments welcome!

author: Kleinstein
author_rank: Super Contributor
timestamp: October 03, 2016, 03:54:14 pm
content: The capacitor C34 at the sense inputs could be a problem. If at all it should be rather small (more like 1 nF), as a delay could be a problem. I would more suggest diodes parallel to D11 / D12 to have the high frequency feedback from the power outputs - this helps to reduce ringing from inductance in the output lines. Though usually the user is responsible for using low inductance (e.g twisted) wiring.D11 and D12 should be strong enough to carry the full load current - worst case the current will flow here.The diode D15 could go to GND as well, just like D14 - normally the input voltage should be in the +-200 mV range, no more.C35 only makes sense if there is a capacitor parallel to R39 as well. However one could very well end up with C35 not fitted.I can't find the output capacitors. There should be caps directly at the power-outputs : something like 100-500 nF as low ESR /ESL caps (MLCC) and 1 or 2 low ESR electrolytics with something like 100-470 µF.In the layout, I can't find decoupling caps close to U15,U11,U12. At least U15 is rather fast and might really need one close to the chip.

author: cowana
author_rank: Frequent Contributor
timestamp: October 04, 2016, 07:43:30 pm
content: Quote from: Kleinstein on October 03, 2016, 03:54:14 pmI had initially thought that as the sense lines are relatively low impedance (probably <10R), a small amount of capacitance shouldn't be too much of an issue. I'm not sure I follow your parallel diode comment - I was under the impression that in normal conditions (sense lines properly connected), they would have no effect as they'd be a very low voltage across them?Quote from: Kleinstein on October 03, 2016, 03:54:14 pmThey're both 3A rated schottkys.Quote from: Kleinstein on October 03, 2016, 03:54:14 pmThat doesn't seem right to me. I've designed the divider (R24, R28, R35) to make full use of the opamp range: -35v on VSENSE- equals -5v at the output of the divider. If D15 went to GND, that would clamp it.I made the decision not to bother with diodes on the current amplifier - for that to have 500mV on it, you'd need 10A flowing through the shunt - at which point something has obviously gone totally wrong and it's beyond fixing with the regulation loop.Quote from: Kleinstein on October 03, 2016, 03:54:14 pmNoted (and added). Always better to have not fitted components on the PCB than to have to bodge extra ones on!Quote from: Kleinstein on October 03, 2016, 03:54:14 pmThe output terminal board in the Korad supply has a 220uF, 50v electrolytic and a couple of ceramic caps, which I'm planning to keep. I might replace them with known brands though (Panasonic M series), to guarantee a nice low ESR!Quote from: Kleinstein on October 03, 2016, 03:54:14 pmThe decoupling caps for U1, U2, U6, U8, U10, U11, U12, U13, U14 and U15 are mounted on the reverse of the PCB (right underneath that specific chip). I've tried to keep it mainly to a single sided load, but usually find you get the shortest current loop for decoupling caps if they're on the other side of the board.Thanks for all the suggestions!

author: Kleinstein
author_rank: Super Contributor
timestamp: October 05, 2016, 03:38:22 pm
content: If everything is cabled good the sense input will not have a problem with the extra capacitor. But it could be a problem if the cables are not perfect (e.g. long non twisted cables or even one sense line missing): here the extra cap between the sense input could cause oscillation.Having capacitors from the sense to the power terminals could be an alternative to block RF, but without the negative effect. These caps can also provide a fast path for the feedback signal in case the cabling is not good, so they improve stability.In the layout D11/D12 look rather small for 3 A diodes.I agree with D15 - can not go to GND in this circuit. The circuit I used for simulation did not have the divider resistor, but just the differential amplifier with low gain (e.g. 0.2) - in this case diodes to GND are OK.There is no real need for the voltage sensing amplifier to be a AZ type, a relatively fast precision one would be good enough and lower noise - not a big change, as the pin-out should be the same. The OP2177 is still quite slow, I would prefer a faster version (e.g. >= 1 MHz GBW and > 1 V/µs) with software trimming a low offset voltage is not that important. So more like an TLC272 / TL082.

author: cowana
author_rank: Frequent Contributor
timestamp: October 06, 2016, 02:52:44 pm
content: Quote from: Kleinstein on October 05, 2016, 03:38:22 pmThat's a really neat solution - AC coupling with the output, and taking the DC from the sense lines. I've ditched the capacitor between the sense lines, and switched to your suggestion.Quote from: Kleinstein on October 05, 2016, 03:38:22 pmYeah, they might have been 3A rated, but a quick calculation says they'd last ~1.5 seconds at that before overheating! I've switched them for some slightly more beefy versions, plus added some via heatsinking.Quote from: Kleinstein on October 05, 2016, 03:38:22 pmStaying with SOT23 packaged amps, there are a lot more options available if I go from a dual opamp to a single opamp (which is fine as I'm using separate packages for the first V and I amplifiers anyway). How about an OPA209? Noise is better (2.2nV vs 5.9nV), bandwidth is greater (18MHz vs 10MHz), slew rate is slightly worse (6.4V/us vs 8V/us).Quote from: Kleinstein on October 05, 2016, 03:38:22 pmGood point about software trimming of the offset voltage - I had discounted some opamps forgetting that. With my 16-bit ADC/DAC and the fast floating point unit in the processor, there's no issue with doing multi-point calibration (even non-linear if required). The TLC272 and TLC082 are both available with the same pinout in a TSSOP package (Farnell 2496465 and 2406736 respectively) - I've switched my footprint from the narrower MSOP to that TSSOP package, so will probably use the TLC272 instead.

author: Kleinstein
author_rank: Super Contributor
timestamp: October 06, 2016, 04:04:12 pm
content: The OPA209 is a good low noise OP for a low impedance source, but not that suitable here. It somewhat depends what you are looking for. With the MAX5136 as DAC this will not be super high precision or very low noise anyway. As there is not much gain here the OP does not need to be fast either. So many types to chose from, just like the two regulator OPs.With the better DAC the 1/f noise of the TLC27x could be significant. So a slightly "better" (BJT based) OP might be a good idea. No need for something fancy - so an RC4558 might do it.

author: cowana
author_rank: Frequent Contributor
timestamp: October 06, 2016, 05:21:02 pm
content: Quote from: Kleinstein on October 06, 2016, 04:04:12 pmWhat parameter is it that makes it unsuitable? The main specs I would imagine would be important for the front-end voltage amp would be a high enough slew rate for the voltage changes (which won't be that fast due to the 220uF output cap), low noise, and low drift offset (so you can calibrate it out). Power rails, current draw and output swing are fairly unimportant.In terms of the specifications I'm designing the PSU for, it will be used as a general purpose power supply for my lab (mainly digital/low speed analogue circuits, most of my designs have their own local regulation anyway). However, in the scheme of aiming for a solid robust design, I would like to be significantly better than the original Korad's specs (if it's not, why bother redesigning it!):QuoteQuote from: Kleinstein on October 06, 2016, 04:04:12 pmI presume this is just a matter of what is considered 'high accuracy'? Compared to the rough resistor-based DAC of the original Korad design (which didn't actually use any type of voltage reference), I would have thought the MAX5136 would give a decent output. Is it worth adding an active low-pass filter after the DAC output to remove any high frequency noise from the output? This could have a very low bandwidth (say 500Hz) - it's very rare you want to change voltage or current that quickly.Quote from: Kleinstein on October 06, 2016, 04:04:12 pmOne of the things I liked about the TLC272 was the low drift (and the fact it specifically says it's a precision opamp) - although I do see the high noise figure... The TL082 is in the middle with noise, but much higher slew rate, higher bandwidth, and hopefully lower offset drift...

author: Kleinstein
author_rank: Super Contributor
timestamp: October 06, 2016, 06:17:23 pm
content: I just realized the OP2177 is not that bad - though this was a dual version of the OP177It's actually substantially faster. So the OPx177 family would be Ok. The ADA4177-x is slightly faster.With a 220 µF output capacitor and enough reserve for parasitic inductance (separate boards for power and output caps) one may not be able to have the regulation super fast anyway.The TL082 has rather high offset drift. Another classic would be the RC4558 - though I could not find drift data, but as a BJT based OP, drift should not be that bad.The way to turn off the output with a relay at the base of the transistor is a little strange for a board where you try to save space. Doing it electronic would make more sense.

author: cowana
author_rank: Frequent Contributor
timestamp: October 06, 2016, 06:54:53 pm
content: Quote from: Kleinstein on October 06, 2016, 06:17:23 pmAhh, so many opamps with very slightly differing specs! Luckily they generally have the same pinout - so if I have nice wide pads on the PCB, I can put any of the options that have been discussed so far on. The OP2177 will do nicely as a starting point.Quote from: Kleinstein on October 06, 2016, 06:17:23 pmBut you don't get a satisfying click that way. The boards aren't really tight for space (there's spare digital room top left, and spare analog room top right). I do like small SMD packages though - they're neater, and easier to solder (plenty of flux, then swipe with a hot iron loaded with solder).It looks like the design is almost there now - if no major changes or suggestions comes up, I'll try and get the board layout finished and ordered over the weekend. Kleinstein, you've been amazingly helpful with identifying a lot of the design issues before the stage where it has to involve cutting through copper tracks

author: Kleinstein
author_rank: Super Contributor
timestamp: October 06, 2016, 08:25:23 pm
content: For the sense amplifier one might have to use low tolerance resistors. If wrong, the DC / low frequency output resistance can get slightly negative (e.g. like -1 mOhms) and thus could cause instabilities with an extreme short. It might help to allow for an intentional adjustment resistor to get a defined +0.1 mOhms or so.When not using the sense inputs correctly this will also change the resistor ratio. If the sense+ line is not connected nothing bad happens - just some .1 to 1 mOhms of output resistance. If only the sense- is not connected right and thus relies on the resistor, the output resistance would turn negative. If the voltage divider is not too low in resistance, just the plug / wire resistance can be enough to save the day.P.S:Forgot the conclusion from the first part. It gets quite difficult to calculate the right resistors. So it might be easier to use just a differential amplification (with gain at about 0.15) and no extra divider first. Not much difference: no R35 and different resistor values. For extra flexibility one could split R34 in two in series and have a cap parallel to one (for full symmetry). R24 could than be removed.

author: cowana
author_rank: Frequent Contributor
timestamp: October 08, 2016, 01:04:26 pm
content: I'm not overly worried maintaining ideal behaviour if the sense inputs not being used - the connection marked as 'FRONT_SENSE' is connected to the rear of the binding posts inside the unit, so that'll be the mode used 99% of the time. The rear terminals (with dedicated SENSE terminals) will only be used if I specifically need to use sense connections for a task - although having said that, it shouldn't blow the PSU/DUT up if one of the wires comes loose.That's an interesting idea of removing the voltage divider. Am I right in thinking the attached schematic is what you have in mind?C38 is small (or not fitted)R38 and R39 provide the offset voltage of the output (100mV)C44 matches C35 providing equal responses for each side of the ampAs the gain is x0.1, does the split resistor biasing need to apply 1v (with an impedance equal to R34) in order to achieve the 100mV output offset?Probably depends on the above point, but what's the common mode voltage of the opamp inputs? My feeling is it is 0V, but if it's not then D14/D15 may be an issueDo D14/D15 do anything in that arrangement? If not, is other input protection needed?Apart from a slightly neater arrangement and less resistors requiring high tolerance, I'm not fully convinced of this purely differential arrangement. At the moment, I'm more comfortable with the original idea - but that could change!

author: Kleinstein
author_rank: Super Contributor
timestamp: October 08, 2016, 02:26:53 pm
content: Having just the differential amp, without the divider has a few advantages: it is much easier to calculate the right resistors (and caps) - with the divider it gets a little messy. Less low tolerance resistors needed. The input protection with D14/D15 also helps with cross over from CC to CV mode (less or no overshoot). BW requirement for the OP could be a little lower.The +input f the OP is essentially at GND - it's about 1/10 the voltage of the shunt + drop in positive output line, so well below 100 mV. So the diodes to GND are no problem. They are also well good enough to protect the OP. No extra protection is needed for the sens+ input, unless you want to protect against someone applying a large ( > 10 V) even more positive voltage to the input. If paranoid an diode to GND could be added.Likely C25 and C44 are not need at all, if used they are quite small. The Capacitor C38 on the other side should not be that small - in my simulation it is in the 10 nF to 100 nF range. The main purpose of this cap is to improve the response with highly capacitive loads (e.g. > 5000 µF). This cap also helps that the OPs don't need to be that fast.For a faster response it helps to have the analog to C38,R24 also in series with R34.The offset at the output is slightly higher (e.g. 10% more) than the value set by R38,R39. To much of an offset could be a problem for the diode protection. I would stay at 50 mV which would still cover the range to -500 mV at the input. The OPx177 can also use the negative supply, so no problem to output negative values too.For the values one should have R38||R39 = R27||R29and R24+R33 = R34 (+ supposed added resistor) at about 10 times R39and R24 at about 5-10 times R33. So about R39=R33.One could adjust one of R27, R29 to a slightly larger value to ensure tolerances in the right direction. The 1:60 (or 1:100) divider for the offset could be around the right amount. To one could very well end up with R27=R39 and R29 left out or intentionally larger than R38.So it is mainly 4 resistors that need low tolerance. The other 4 are less critical as they have a larger one in series or a smaller one in parallel. A single resistor (e.g. R29) could be used to adjust for tolerances.

author: cowana
author_rank: Frequent Contributor
timestamp: October 08, 2016, 03:25:01 pm
content: Quote from: Kleinstein on October 08, 2016, 02:26:53 pmSymmetrical design is always nice when it comes to opampsQuote from: Kleinstein on October 08, 2016, 02:26:53 pmSounds good. The main reason for needing any offset is just to avoid having to use the bottom codes of the ADC/DAC (where it might clip) - so it doesn't really matter what the offset voltage is.Quote from: Kleinstein on October 08, 2016, 02:26:53 pmHow do the values in the attached look for a starter? Once I've ordered the PCBs and am in the waiting period, I'll run some simulations and see exactly how it behaves - but it would be good to have some ballpark values to start with.I've also moved those changes across to the layout, and it's looking very neat.

author: Kleinstein
author_rank: Super Contributor
timestamp: October 08, 2016, 05:40:17 pm
content: The resistor values look reasonable. In the simulations I am currently looking at, I had about twice the resistance for all the values (and no offset, and no C25,C44).For low currents the circuit might need an extra resistor from where you have the relay for output enable to ground This is to have enough working current for the transistor before that. Lower resistors on the output board could do a similar effect. If really needed one could like add those in parallel.Otherwise the simulations look good. Only the cross over from CV to CC mode is relatively slow with the OPx177 or a similar OP. The slew rate limit can cause quite some overshoot at the current. For the voltage regulation the OP2177 seems to be fast enough - the limiting factor is the 2N3055 used for the output stage.For the OP used for current limiting a faster OP would be an option to reduce the overshoot on CV to CC cross over.Once in CC mode everything is fine - the output impedance is essentially set by the output capacitor and the load from voltage sensing.The other option I tested is an PNP transistor to do anti windup. It simulates well - but it needs a negative set voltage and thus another OP or level shifting with extra resistors. Also the CC mode indication would than get slightly more complicated. One could use the voltage regulation side, so indicating that voltage regulation is not active.Attached is a simulation file. At the output stage it still contains some extra transistors to make it a kind of limited 2 quadrant one. V5 = 0 turns this part inactive, with V5 at about 1.6 v is gets activated.

author: dorin
author_rank: Contributor
timestamp: February 26, 2017, 03:03:12 pm
content: Any update? I am interested in hacking mine too.

author: cowana
author_rank: Frequent Contributor
timestamp: April 16, 2017, 04:55:10 pm
content: Unfortunately I haven't had too much time to work on this project in the last few months - but here's an update!I ordered the boards back in October, and received them about a month later. I soldered a few up (picture attached to this post), and got to work on the software. The controller is a pretty powerful Cortex M4 running at 100MHz, which I put freeRTOS on. This was my first real experience of using an RTOS in a project, and I'm very happy with it - it's made creating a fairly complex UI very easy.The low-level software drivers are all complete, and the UI is almost entirely finished. Compared to the original Korad firmware, some of the features include:16-bit ADCs and DACs, mean it can be calibrated to a much higher precision.The memories M1-M4 act like proper memories. I use the M5 indicator to show when you're in 'adjustable' mode (entered by selecting the VOLTAGE/CURRENT button) - once in there, you can adjust parameters as you want, and optionally save them to a memory by long pressing a preset button.Adjusting voltage and current show which digit you're on by flashing it between normal brightness and high brightness, which feels much more natural and less jarring than it turning off (as it did before).The default adjustment unit vary depending on if the output is on or off, to prevent accidentally making big changes with the output powered on.The UI is now really responsive and reactive, and is great to use.The speaker now plays proper tones (and 'clicks' as you turn the rotary encoder), coming from an actual DAC.I've written a decent calibration routine, which steps you through what to do (open/short measurements) and allows a good calibration to be performed easily.All display readings now use moving-average filters (with adjustable size) running much faster than the display update rate, so the readings are smooth.Up to now, I've only focused on the software, and it's now in a state suitable for initial use. Having started to look at the actual power supply response, I think I might need a bit more help from the forum!The good bit - with no or little load (<200mA), it performs exactly as you would expect. The DAC sets the correct operating point, the relays select the correct transformer tap, and the opamps regulate in CV or CC mode as required, with a nice clean output.However, as the current increases, things get a little bit unstable. The scope screenshots attached show the oscillation in CV mode (~1.8MHz) and CC mode (~300kHz) when an 8 ohm resistive load is connected. I had previously run transient and steady state simulations of the entire circuit, but this had seemed to show it would be stable (although that could be due to my limited simulation expertise). I've attached the PSpice netlist (generated in TINA) - you may need to rename the file to .cir.My immediate thought was to decrease the high frequency gain of the OP2177 opamp stages by decreasing R26/R41 - although this might just reduce the transient response of the entire power supply, so I've slightly cautious of doing so! Currently R26 and R41 are 4k7, and C36 and C41 are 200pF.Some thoughts on where to start tackling this would be appreciated!AndyEdit - just realised I missed the output capacitor (a 220uF electrolytic) off my schematics and simulations - it is there in reality! Still, the fact the simulation didn't even oscillate with that missing probably shows I'm definitely doing something wrong!

author: Kleinstein
author_rank: Super Contributor
timestamp: April 16, 2017, 08:51:34 pm
content: There are parasitic effects that can make the simulation behave different from real life. Typical such influences are ESR/ESL of capacitors and parasitic inductance of low value resistors.Another point is that the simulation uses perfect values for the resistors. Even small deviations for R33 / R34 , R38,R39,R27,R29 can make the difference from stable to unstable. It is a good idea if R34 is slightly larger than R33.The first usual modification would be increasing the capacitors C36 / C41 to maybe 500 pF or even 1 n. Thus making regulation slower and thus usually more stable. Decreasing R26/R41 could be an option too - it would need a more accurate simulation or just a few tests to see. The not shown values of R36 and R47 are also important as they scale the overall gain.

author: cowana
author_rank: Frequent Contributor
timestamp: April 17, 2017, 04:29:20 pm
content: Thanks Kleinstein, that's very helpful. From today's findings:CV modeI tried decreasing the feedback frequency (via C36), but that didn't have much effect - the issue in CV mode seemed to be the gain was just too high. I played with changing values a lot, and seemed to get the best results with:Increase C36 from 200pF to 680pFReduce R26 from 4k7 to 2k2Increase R36 from 2k2 to 6k8With those values, the control loop is looking fairly good. However I noticed initial transients were appearing as huge signals on the output of the differential voltage amp, so I increased R33 and R34 from 287R to 1k7. This didn't seem to effect the control loops too much, but it seems a better ratio. See attached image (1) for the VSENSE signals and opamp output during a transient.CC modeCC mode was continuously oscillating. As with the CV section, I decreased the response rate and the AC gain:Increase C41 from 200pF to 680pFReduce R41 from 4k7 to 2k2Increase R47 from 2k2 to 6k8The result of that seems fairly good - now both CC and CV mode behave as you'd expect! I'm not sure exactly what performance is possible from a design like this with the right tweaking - the performance is certainly adequate for my needs as it currently is. Having said that, I'd be up for getting it better if that's possible!At low powers, the CV/CC switchover looks very neat, as shown in the attached image (3). One area that doesn't quite look right is the response when the output set to a high voltage (24v), then a high current load is applied, causing it to enter CC mode. Image (4) shows this going from 24V, 0A, CV to 20V, 2.5A, CC - the current initially rises (as expected), CC mode activates, the current overshoots slightly, then comes under regulation - but then takes around 1.5ms to settle on it's steady state value. This seems odd, considering the CC loop is obviously working, as it gets it within 10% of the final value within 20us!

author: Kleinstein
author_rank: Super Contributor
timestamp: April 17, 2017, 08:01:32 pm
content: Increasing R33 and R34 to 1.7 K is likely a good idea. This reduces the high frequency gain of the differential amplifier - with the old values, there was a significant gain in the high frequency limit and thus the GBW of that OP might have been important. It might be a good idea to have R34 slightly larger than R33 - even if it is just to make sure that due to tolerances it is not the other way around. A slightly larger value for R29 would have a similar effect, to make sure the dorp at the shunt is not overcompensated. With the larger values of R33, R34 the one might be able to reduce R36 or C36 a little again. The change in R33 and R34 is also slowing down the loop.The voltage loops still seems to be reasonable fast.The turn over from CC mode to CV mode looks a little slow. If it needs to be faster one could implement a kind of anti windup. However a very fast acting current limit might not be desirable in all cases. Load steps close the the limit do need sort time currents beyond the limit to get a good CV mode performance.For the high current case, this could be due to OP internal protective diodes, that pull down the set value and than cause a rather slow recovery due to C43*R51. So a smaller value for R51 might be worth a try. I am not sure if there is such a protection diode inside the OP (the DS does not tell). It might also help to add such a diode (or NPN transistor to reduce the load to set point ?), to prevent the inverting input of the CC mode OP to go much below the set voltage. This would be a way of limiting windup.It also looks like the voltage is dropping only very little - so that high current example might be just borderline to engage CC mode at all.To test the CV mode regulation, the more critical cases are usually a load with a low ESR capacitor (e.g. film or ceramic) in the 10 µF range and the case with a large low ESR electrolytic cap (e.g. 1000-5000µF) together with a small DC current. Here (especially with the large capacitor) some ringing after a step is normal - but it should not be excessive of cause.

author: cdxa
author_rank: Newbie
timestamp: January 16, 2018, 03:00:35 pm
content: Hello,@cowana, do you plan to share mcu firmware? or maybe you sell all as a Korad upgrade kit?

author: cowana
author_rank: Frequent Contributor
timestamp: January 19, 2018, 01:07:30 pm
content: Quote from: cdxa on January 16, 2018, 03:00:35 pmMy main reason for doing this project was as a learning experience - I've learnt a lot doing it, and got a compact bench PSU with all the features I want as a result.I don't think anyone else would benefit from the 'upgrade' - mainly due to the high the BOM cost of my design (just the opamps, ADC and DAC together are over £15), and the significant time/work required to install it (modifying the rotary encoder, adding cable looms, cutting additional holes in the rear panel for the output connectors). If you're after a high performance bench PSU, there are much simpler options if you're not interested in designing your own!

author: Medved
author_rank: Contributor
timestamp: March 09, 2021, 05:05:26 pm
content: Hello,I came to this topic quite late, but I see quite a few problems regarding the regulation loop topology. Note these problems are already in all the "orignal" Korad 3003/3005/...First the regulation loops, both for voltage as well as current, are extremely long with many gain stages. That means the response can not be that fast or it requires high speed opamps, which then pose their own stability problems. The original "dumped" everything by killing the loop gain directly at the output by a huge output tank capacitor, which requires to have really high capacitance and certain nonzero ESR. The consequence is, the current limit is not able to protect more delicate devices against hot miswiring (connecting the load in reverse while the output is ON,...) or a short circuit while there is voltage at the output, because just the energy within this capacitor is sufficient to kill anything more sensitive connected to it.You may design a current limitting device (e.g. the negative is separated by a diode, anode towards the capacitor, cathode towards the OUT-, biased in forward by some 10's mA via some power resistor from e.g. VBUS).But to me a better choice is to add there a fast acting AC path from OUT- towards the Q11 base, in form of a (small) capacitor from the OUT-, to a cathode of an auxiliary diode and a bias resistor (~ 1/10 of the current flowing through R36 should be enough) towards GND, anode of this auxiliary diode is then connected to the base of Q11. As the diode is biased, it has low AC impedance, so keep that capacitor connected between OUT- and the base of Q11. Then the output voltage is formed by just an emitter follower darlington cascade to the output, so maintaining the voltage pretty close without the need of any big capacitor on the output. That way there is no component storing any excessive energy in it able to cause the damage.The "complication" with the extra diode and resistor is there o allow that capacitor to be disconnected from the Q11 once the output gets shorted, so the I-limit has to act.And it is connected to VOUT- and not SENSE-, to ensure it maintains the voltage on the start of the power path, so it is not influenced by the impedances from OUT to the load point, the capacitances there and line back via the SENSE line.Then I would put a resistor into the line you have drawn between D10 anode and Q11 base (so it has about 200mV drop, given the R36 current), so the opamp output is HC separated from the point where the capacitor added before injects the VOUT- signal. That drop will then dictate, along with the resistances in the emitters of the power transistor, how far the output overshoots/undershoots when the load changes.Similar way I would also add an AC path from OUT- towards the top of C28, e.g. by a capacitor of about C28/10. This then forms a capacitive divider, so provide faster feedback path directly towards the V-regulation opamp, going around the first differential amplifier, so mainly the C26 filtering won't impede the feedback.Then the output disconnect is, according to me, at a wrong place. When disconnected, the feedback sees the output below what desired, so charges the feedback network capacitors (C29 and C38) to voltages corresponding to the output (Q11 base) fully ON, causing huge overshoot once the relay is turned ON (the reg. loop has to drive the Q11 back down). Better idea to me would be a transistor shorting the base of Q11 to GND. That way both the feedback networks are discharged, so the loop starts them from zero, so entering regulation (either voltage or current) "from below", so without any huge overshoot. The base of this transistor then has to be driven to the +12V by a pull up resistor towards +12V supply and actively pulled low by the CPU, in order to make sure the output remains OFF during power up and CPU starting.Another issue I see with the opamps and their supply connection. This is a power supply, not a calibrator, so it does not need as precise opamps, with as bad side effects and overload recovery response. With opamps, you should always keep in mind, what is their reference point for the internal frequency compensation. With practically all pure bipolar technology OPAMPs it is their negative supply line. With the complex rail-to-rail CMOS it depends on the actual output current direction (which of the output transistors is biased so carries the signal), so in short very unpredictable.Why is that important? Because above the GBW, this is the supply from where the opamp has virtually 0dB PSRR, in other words all mess on that supply line passes to its output. From the other supply the PSRR uses to be very high, even way above the range where the opamp has any gain.Therefore it is better idea to use obipolar pamps with their negative supply being your signal GND and which are able to operate from 0V then.LF358 is a good example here.Yes, it has some input current. So match the impedances on their inputs so it does not cause extra offset.Yes, the output can not go below ground. But this circuit does not need that at all.When you maintain some load current from their output to GND (to keep their upper output transistor biased; see their internal schematic in the datasheet), they may easily drive down to nearly zero.And the inputs work well around, or even up to 200mV below zero, so again sufficient for this design.Yes, they may exhibit some voltage offset. But remember., these are pure bipolar devices, so their offset, whatever it is, is proportional to the thermodynamic (absolute) temperature, so quite well predictable and so possible to calibrate out (you just need a temperature sensor around them so the CPU calibration routine knows what to use for that). And for normal lab temperature it is quite constant (a 10mV offset opamp will drift less than 1mV in the temperature range of 10..40degC), so you won't even need the temperature compensation.You may still use some precission amplifier in the current sense (the only place where the 1mV drift would be of any problem). There the offset compensated amp could be used, as there it won't be overloaded (or there is already a huge problem anyway). This would mean only a single opamp would need the negative supply, so once properly filtered, there is no risk of crosstalk and parasitic feedbacks (causing oscillations,...) via that supply line.The sense line connections and stability:I like to add a series resistor of about 100..1kOhm (don't forget to calculate that in for the V-sense amp) to each voltage sense line and use an extra ~100nF capacitor coupling directly the OUT signal high speed component to the feedback. That way you eliminate the inductance of the wiring towards the load.And as you have already quite powerful microprocessor there, I would even go to the analog part working only with OUT terminals, use separate V-sensing amplifier to feed just the ADC and implement the remote sense feedback by DSP within the CPU. In this way you may easily apply restriction on the allowed voltage drop across the wiring (e.g. shut down when the difference is greater than e.g. 0.5V), so have the instrument inherently safe even against virtually any feedback fault (missing wire, the shorting strap not tightened on the terminals,...), without any need for the extra diodes between the Force/Sense (which do not cover all faults).Plus it allows to control the response dynamics by the user, so allows the user to select between fast response with restricted load capacitance to keep it stable or have it stable with a large load capacitance where longer response time could be tolerated.

author: patrickbyron044@gmail.com
author_rank: Newbie
timestamp: February 05, 2023, 08:59:10 pm
content: Hello cowana,Are you still active on this subject ?I have blown my Korad KA3003D. The current shunt resistor Burnt and the diode under in blew up, in small pieces all over.Will you be able to help. with the value of the resistor and number of the diode.Did you complete the upgrade in 2016, I only saw it recently.Regards Patrick