Author Topic: Korad KA3003D redesign and upgrade  (Read 17142 times)

0 Members and 1 Guest are viewing this topic.

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Korad KA3003D redesign and upgrade
« on: August 25, 2016, 11:02:04 am »
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 menus
  • Replace the R_2R ladders with a proper 16 bit DAC
  • Add a seperate high spec 16 bit ADC, with built in 30ppm reference
  • Add 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 awful
  • Make 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 off
  • Modify 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 rear
  • Add 5v power output on rear (USB A socket). Use connector with detection pin, so OVP is set to 5v when USB is plugged in

I'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!
« Last Edit: October 02, 2016, 12:55:58 pm by cowana »
 
The following users thanked this post: mrchen

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 8682
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: Korad KA3003D redesign and upgrade
« Reply #1 on: August 25, 2016, 07:32:01 pm »
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.

Plus, 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. :-/O
I TEA.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #2 on: August 26, 2016, 10:12:23 am »
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. 
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #3 on: September 02, 2016, 07:59:48 am »
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.
« Last Edit: September 02, 2016, 08:02:28 am by cowana »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #4 on: September 02, 2016, 09:38:05 am »
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. 
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #5 on: September 02, 2016, 11:28:05 am »
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.

Thanks 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).

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 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.

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.

Am 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?
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #6 on: September 02, 2016, 02:10:47 pm »
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.
 

Offline Kevin.D

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: england
Re: Korad KA3003D redesign and upgrade
« Reply #7 on: September 02, 2016, 07:10:21 pm »
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 against
remote sense accidents.
I think it's swings and roundabout's on whether a guard diode or guard resistor is used
Lets 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 main
Vout (disconnected) side of the guard resistor will now rise to  max Voltage. (so the large capacitor
on 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 to
maximum.

I would say the diode is preferable to the resistor if you consider above, most bench supplies use
just one or the other (oddly I just checked with my meter what my thurlby pl330 uses and it uses a
diode on +Vsense side but a resistor on -Vsense side despite the schema showing resistors on both
terminals).
 A possible alternative to  would be to use the BE junction of a small npn transistor (with say a 1k
res in the base to limit current) in the place of the guard diodes and connect the collector to pull
down 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
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #8 on: September 02, 2016, 08:21:22 pm »
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.

For 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.

I would say the diode is preferable to the resistor if you consider above, most bench supplies use just one or the other (oddly I just checked with my meter what my thurlby pl330 uses and it uses a diode on +Vsense side but a resistor on -Vsense side despite the schema showing resistors on both terminals).

I 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.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #9 on: September 03, 2016, 07:32:13 am »
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.
 

Offline mrchen

  • Newbie
  • Posts: 3
  • Country: ag
Re: Korad KA3003D redesign and upgrade
« Reply #10 on: September 11, 2016, 09:11:07 pm »
Add proper temperature control to the fan. It should be totally silent if you're only drawing a few mA, not idling at 1000rpm!

cowana, 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 see  https://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?
 

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3116
  • Country: us
Re: Korad KA3003D redesign and upgrade
« Reply #11 on: September 11, 2016, 10:10:51 pm »
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.
 

Offline mrchen

  • Newbie
  • Posts: 3
  • Country: ag
Re: Korad KA3003D redesign and upgrade
« Reply #12 on: September 11, 2016, 11:28:19 pm »
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.

I forgot to mention - I shorted across the NTC with a screwdriver (simulating high temperature) - no reaction whatsoever!
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #13 on: September 13, 2016, 03:12:40 pm »
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.

When 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.

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 mean 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.

Good 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.

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.

I 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!

cowana, 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 see  https://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.

It'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.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #14 on: September 13, 2016, 06:35:19 pm »
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.
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #15 on: September 17, 2016, 12:05:13 pm »
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 shunt
  • Shunt resistor lowered to 50mR to decrease power required, and opamp gain increased to match
  • The second stage of opamps (which get saturated) are now a OP2177. Small, low cost, pretty good specs, and a quoted saturation recovery time of 4uS
  • Common GND point moved to ISENSE+ node to avoid base currents going through shunt. Spilt resistor biasing modified to suit
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #16 on: September 17, 2016, 01:39:58 pm »
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.

 
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #17 on: September 17, 2016, 03:03:16 pm »
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).

Would 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.

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 ).

Is 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!

C29 for the shunt amplifier is likely not needed.
What 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?

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.
Is that specifically across R33, or would R41 do the same thing?

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).
It 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?
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #18 on: September 17, 2016, 04:08:29 pm »
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.
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #19 on: September 17, 2016, 05:08:16 pm »
First post attachments updated.

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.
Common mode rejection is a good explanation for that one.

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.
That makes a lot of sense too!

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.
That'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.

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.
I  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 :P.
« Last Edit: September 17, 2016, 05:11:14 pm by cowana »
 
The following users thanked this post: neilw20

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #20 on: September 17, 2016, 07:57:56 pm »
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.
« Last Edit: September 17, 2016, 08:23:18 pm by Kleinstein »
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #21 on: September 18, 2016, 06:01:02 pm »
Attachments in post 1 updated.

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.
Thanks 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!

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.
I'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?

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.
Good 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.
« Last Edit: September 18, 2016, 06:06:54 pm by cowana »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #22 on: September 18, 2016, 08:48:15 pm »
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.
« Last Edit: September 19, 2016, 03:27:56 pm by Kleinstein »
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #23 on: October 02, 2016, 12:53:49 pm »
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 regulators
  • Changing these linear regulators from 317s to 7812/7805s. Slightly higher noise, but no voltage setting resistors needed, and will do the job
  • Diode isolating of the 24v supply used for the +6/-6v analog rails, to stop that dropping under the main load
  • A seperate LC filter on the part of the 5v rail used for the analog section, to cut out digital noise
  • Ferrite beads on the power supply of ADC and DAC
  • 100R series resistors on the SPI lines, to prevent ground bounce between digital and analog sections
  • Various pin swaps on the STM32 to aid with routing
  • Switched 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 amplifier
  • Back EMF protection diodes on the relays. The ULN2003 driver has them already, but dedicated diodes limit the size of the current loop
  • Small (10nF) capacitor across the + and - sense lines. Hopefully will smooth out anything picked up as they cross the board
  • LC filter added to +12v providing the main transistor control signals. Should remove relay/digital noise
  • Test points changed to 2-pin headers (signal + ground), for easy connection and monitoring

There 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!
« Last Edit: October 02, 2016, 03:02:34 pm by cowana »
 
The following users thanked this post: prasimix

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #24 on: October 03, 2016, 03:54:14 pm »
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.

 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #25 on: October 04, 2016, 07:43:30 pm »
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.
I 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?

D11 and D12 should be strong enough to carry the full load current - worst case the current will flow here.
They're both 3A rated schottkys.


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.
That 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.

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.
Noted (and added). Always better to have not fitted components on the PCB than to have to bodge extra ones on!


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.
The 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!

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.
The 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!
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #26 on: October 05, 2016, 03:38:22 pm »
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.
 
The following users thanked this post: cowana

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #27 on: October 06, 2016, 02:52:44 pm »
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.
That'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.

In the layout D11/D12 look rather small for 3 A diodes.
Yeah, 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.

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.
Staying 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).

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.
Good 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.
« Last Edit: October 06, 2016, 02:56:27 pm by cowana »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #28 on: October 06, 2016, 04:04:12 pm »
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.
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #29 on: October 06, 2016, 05:21:02 pm »
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.
What 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!):

Quote
Voltage:
Output Voltage Range: 0-30V Continuously adjustable
Setup Resolution: 10 mV
Setup Accuracy: <0.05% +20 mV
Ripple: < 1mVRMS
Read back Accuracy: 10 mV
Temp. Coefficient: < 0.1% + 10mV
Read back Temp. Coefficient: < 100 ppm+10 mV
 
Current:
Output Current Range: 0-5A  Continuously adjustable
Setup Resolution: 1 mA
Setup Accuracy: <0.1% +3 mA
Ripple: < 3mARMS
Read back Accuracy: 1 mA
Temp. Coefficient: < 0.1% + 5mA
Read back Temp. Coefficient: < 100 ppm+5 mA

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.

I 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.

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.

One 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...
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #30 on: October 06, 2016, 06:17:23 pm »
I just realized the OP2177 is not that bad - though this was a dual version of the OP177  :palm:
It'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.
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #31 on: October 06, 2016, 06:54:53 pm »
I just realized the OP2177 is not that bad - though this was a dual version of the OP177  :palm:
It's actually substantially faster. So the OPx177 family would be Ok. The ADA4177-x is slightly faster.
Ahh, 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.

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.
But you don't get a satisfying click that way ;D. 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 :)
« Last Edit: October 06, 2016, 06:57:44 pm by cowana »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #32 on: October 06, 2016, 08:25:23 pm »
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.
« Last Edit: October 07, 2016, 08:19:55 am by Kleinstein »
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #33 on: October 08, 2016, 01:04:26 pm »
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 amp
  • As 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 issue
  • Do 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!

 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #34 on: October 08, 2016, 02:26:53 pm »
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||R29 
and R24+R33 = R34  (+ supposed added resistor) at about 10 times R39
and 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.
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #35 on: October 08, 2016, 03:25:01 pm »
For a faster response it helps to have the analog to C38,R24 also in series with R34.
Symmetrical design is always nice when it comes to opamps :)

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.
Sounds 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.

For the values one should have R38||R39 = R27||R29 
and R24+R33 = R34  (+ supposed added resistor) at about 10 times R39
and 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.
How 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.
« Last Edit: October 08, 2016, 03:46:11 pm by cowana »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #36 on: October 08, 2016, 05:40:17 pm »
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.


 

Offline dorin

  • Contributor
  • Posts: 38
  • Country: ro
Re: Korad KA3003D redesign and upgrade
« Reply #37 on: February 26, 2017, 03:03:12 pm »
Any update? I am interested in hacking mine too.
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #38 on: April 16, 2017, 04:55:10 pm »
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!

Andy

Edit - 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!
« Last Edit: April 16, 2017, 05:55:29 pm by cowana »
 
The following users thanked this post: prasimix, TheDane, dorin

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #39 on: April 16, 2017, 08:51:34 pm »
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.
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #40 on: April 17, 2017, 04:29:20 pm »
Thanks Kleinstein, that's very helpful. From today's findings:

CV mode
I 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 680pF
  • Reduce R26 from 4k7 to 2k2
  • Increase R36 from 2k2 to 6k8

With 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 mode
CC mode was continuously oscillating. As with the CV section, I decreased the response rate and the AC gain:
  • Increase C41 from 200pF to 680pF
  • Reduce R41 from 4k7 to 2k2
  • Increase R47 from 2k2 to 6k8

The 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!
« Last Edit: April 17, 2017, 04:36:51 pm by cowana »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 7930
  • Country: de
Re: Korad KA3003D redesign and upgrade
« Reply #41 on: April 17, 2017, 08:01:32 pm »
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.
 

Offline cdxa

  • Newbie
  • Posts: 1
  • Country: pl
Re: Korad KA3003D redesign and upgrade
« Reply #42 on: January 16, 2018, 03:00:35 pm »
Hello,
@cowana, do you plan to share mcu firmware? or maybe you sell all as a Korad upgrade kit?
 

Offline cowana

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: gb
Re: Korad KA3003D redesign and upgrade
« Reply #43 on: January 19, 2018, 01:07:30 pm »
Hello,
@cowana, do you plan to share mcu firmware? or maybe you sell all as a Korad upgrade kit?

My 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!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf