The 2322 is a dual channel, 30V 2A programmable supply.
I really like this sort of multi-channel remote control programmable linear power supply, they're not easy to find at low cost. You can put the outputs in parallel, series,
generate positive and negative rails. Very useful.
This one came with a few problems to solve.
Some of the behaviour was so strange I thought it was faulty, and I felt compelled to
reverse engineer the circuit to see if anything could be changed.
Two distinct problems are shown in this power on/off curve.
When the supply does not switch into CC mode during power-on - i.e. when
it is allowed to turn on "normally" in CV mode - it looks like it takes several intermediate steps before settling at the programmed setpoint. This is also minor, but also quite ugly.
The setpoint in that picture is pretty high, but this was done with some of the output capacitance removed so the inrush current was much lower and the limiter wouldn't trip
Here's the voltage over a 47 ohm resistor with the output set to 8V and 10mA. The voltage rises to 8V before the current limit kicks in,
in other words a peak 170mA is drawn. It takes around 20ms for the controller to bring the current back down.
The main functional components of the unit are the mainboard, the power supply board, and the digital card.
The interesting parts are here, on the mainboard. The digital card connects to the 8-bit ISA connector (Channel 1 signals) and the IDC connector in the bottom left (Channel 2 signals).
The digital card uses an 8051 at its core, or more specifically a 80C31 clone. It might be worthwhile to make a replacement with a modern microcontroller.
The communication between the card and each channel is done through photocouplers, and each channel is completely separate on the mainboard.
Here I draw all the visible traces (front copper in red, back copper in blue) over a picture of the board to make it a little easier to see the connections at a glance.
For now, I've only reverse engineered Channel 1, though Channel 2 should be more of the same.
The reference voltages for the controllers are generated by an AD7541 12-bit DAC and 4066 CMOS switch in a sample-and-hold configuration. The signal is held by 2x470nF capacitors with a 1k in series, then buffered.
The DAC is also used to generate voltages for a software SAR ADC used to read back the voltage and current.
It is here where the power-on CC/CV and multi-step issues occur.
A "floating regulator" type output stage. The unregulated input 60VDC has no shared ground with the rest of the circuit. Circuit ground is at the
emitter of the series pass transistors (RMI = GND), while signal ground is at the output positive rail (+OUT = SGND). This circuit is nearly identical to that of the LPS-305 negative rail.
Readback is done using a software SAR ADC running on the microcontroller.
The DAC output is periodically used to generate reference voltages for the measurement comparators.
Also shown is U35A, which handles the overvoltage protection. Both OVP and OCP are primarily handled in software.
A typical diode-OR CV/CC control sharing scheme. The top branch is a pure integrator which handles current control. The bottom branch
is a filtered PID controller for voltage control.
The output sense nodes:
The output current through \(R_{s}\) is sensed by measuring voltage at RMO, where $$-V_{RMO} = I_{out}R_S = I_{out}/10.$$
The current control is done by U33A, which compares current programming signal CCP to RMO. U32B converts CCP from signal ground reference to circuit ground reference, and inverts it.
R61 and R69 attenuate CCP by 50, and with a maximum DAC output voltage of 10V, the maximum programmable CCP signal is 200mV and the maximum programmable current is 2A.
Ultimately, the controller setpoint can be expressed as
$$V_{Iset} = R_sI_{set} \text{ ,where } I_{set} = -CCP/5$$
The error signal is then
$$e = V_{RMO}-V_{Iset} = R_s(-I_{out}-I_{set})$$
U33A is used as a pure integrator with R1 (R68 in the schematic) and C1 (C40). Anti-windup diodes D14, D13, D12 prevent the error accumulation from getting out of hand.
The transfer function of the current controller can be written as
$$\frac{V_{i}}{e}(s) = \frac{-1}{sR_1 C_1}, $$
and the controller crossover frequency is given by $$f_{i} = \frac{1}{2\pi R_1 C_1} = 10.61\mathrm{kHz} .$$
LTspice frequency sweeps. Top to bottom: 1. open loop gain \(C(s)P(s) = I_{out}/e \) , 2. plant gain \(P(s)=I_{out}/V_{i}\) , 3. controller gain \(C(s)=V_{i}/e\)
The open loop system crossover frequency for the CC mode is at 6.2kHz and the phase margin is around 75 degrees.
The CC controller is very slow. It's also quite bad at rejecting power supply ripple.
I suppose the reason for using a pure I-controller here is so that it has a very subdued response and the CV loop can dominate. Usually, CV mode is the normal
operating condition for a lab power supply, so it's reasonable that voltage control gets priority over current control.
Still, it may be good to push the CC loop crossover frequency up to try to suppress the current overshoot a bit. Ultimately, maybe the CC mode needs a better controller design altogether.
The voltage controller at U33B is sort of shaped like a Type-3 compensator, and is in effect a filtered derivative PID controller.
The controller's setpoint is fixed at signal ground, i.e.:
$$V_{Vset} = V_{S+}.$$
The "actual" setpoint which controls the output voltage is the CVP signal, fed in at a summing junction at the inverting input of U33B. Thus, we have error signal given by
$$e=3.57CVP + V_{S-} - V_{V_Vset}$$
For this AC analysis of the controller, we can choose arbritrary DC values \(V_{S+}=CVP=0\mathrm{V}\), so that
$$e=V_{S-}$$
U33B has a local feedback network formed by R1 (R84), C1 (C48), R2 (R80), Rd (R81), Cd (C52). R73 does not affect the controller frequency response.
The transfer function for the voltage controller can be written as
$$\frac{V_{v}}{e}(s) = -\frac{R_1}{R_2+R_d}\frac{(\omega_{z1}/s + 1)(s/\omega_{z2} + 1)}{(1 + 1/\omega_{p}s)},$$
where the pole and zero frequencies can be found as:
$$\omega_{z1} = \frac{1}{C_1R_1} \rightarrow f_{z1} = 7.8\mathrm{kHz},$$
$$\omega_{z2} = \frac{1}{C_dR_d} \rightarrow f_{z2} = 445\mathrm{kHz},$$
$$\omega_{p} = \frac{1}{C_d (R_2//R_d)} \rightarrow f_{p} = 16\mathrm{kHz}.$$
LTspice frequency sweeps. Top to bottom: 1. open loop gain \(C(s)P(s) = V_{out}/e\) , 2. plant gain \(P(s)=V_{out}/V_{v}\) , 3. \(C(s)=V_{v}/e\)
With the output set to 30V and a 10k load, the phase margin is around 74 degrees, and the system crossover frequency is 4.6kHz.
Here we see the current programming and voltage programming waveforms at the output of the 4066. The two waveforms above show the CVP_PULSE signal and the CVP_SWITCH signal,
and the other pair are the CCP_PULSE and CCP_SWITCH signals. From this it's clear that the time constant of the RC network in the sample and hold is too long
for the programming pulse duration, and it takes a couple cycles to get to the programmed level, on both rise and fall. This is what causes the "multistep" power-on/off waveform.
In SPICE, we can confirm this is expected behaviour based on the selected R, C and programming pulse duration.
Unless I'm missing something, this just looks like a design error.
A more subtle issue we can see here is the sequencing of the CVP and CCP signals. Notice that the CVP signal is always enabled before the CCP signal, which causes the current
limit to kick in on every startup regardless of the programmed current.
Waveforms, top to bottom: 1. DAC output, 2. CCP_SWITCH, 3. CVP_SWITCH, 4. Output
As for the sequencing issue, it's a relatively minor problem. More of an annoyance than anything. It's also quite a difficult one to fix, as it's entirely a firmware issue.
The original ROM chip is a 27C512 UVEPROM, and I replaced it with a W27C512 EEPROM.
Very fortunately, you can find new firmware for a rebranded, later version of this unit:
the Motech 1204.
Though the boards in that one look completely different, and it uses a different ROM chip, it seems like the fundamental design is the same. This new firmware switches the CV and CC programming sequence.
There are a few caveats, of course.
If the new firmware is loaded, the supply's calibration will be invalidated because the EEPROM addressing is not consistent between versions, and the internal calibration calculations are done differently.
More importantly, the OVP setpoint is no longer accurate. The new firmware expects a smaller ratio on the sense divider, and as a result the actual voltage limit is about 40% higher than the programmed limit.
That might still be usable, because it's a consistent behaviour. The fix for this, if desired, is simple - replacing R79 and R45 (9k1) with 13.3k should restore normal OVP function. That would probably
be considerably less effort than reverse engineering the new firmware and changing the ratio in software. Alternatively, replacing R77 and R47 (20k) with a 13.5k is also acceptable.
I also suspect the GPIB functionality may be broken with the new firmware, but I haven't checked this since I don't have any GPIB controllers.
Now to dealing with the overshoot. Taking the reverse engineered circuit into LTspice, it seems that the overshoot at the CC/CV transition and the falling edge are both expected.
Looking at the negative overshoot, for example, the simulated overshoot is remarkably close to what we can measure on the unit.
The easiest modification which all but eliminates the overshoots in either direction is reducing the value of C48 from 6n8 to the ~100pF range. This fundamentally changes the controller behaviour,
and essentially removes the derivative action.
With C48 = 100pF, there is zero negative overshoot. There remains a very minor overshoot at the CC/CV transition, but it is below 50mV and very hard to notice.
The CC-CV transition is kind of an "extreme" situation, so this is probably acceptable. More acceptable than several hundred mV, at least.
Using C48 = 100pF pushes the crossover frequency of the controller up to 350kHz and costs some phase margin, which drops by around 10 degrees compared to the stock configuration with the same loading condition.
The phase margin is around 64 degrees in this case.
Using C48 = 200pF results in a larger overshoot (100mV CC-CV overshoot and -20mV negative overshoot), but it yields a very good >80 degrees phase margin due to better compensation of the plant characteristics.
Anything between 100pF - 1nF for C48 results in markedly better performance than stock due to higher bandwidth while maintaining positive phase and gain margin.
Phase and gain margin are not bulletproof stability tests, however, and it is usually useful to also look at the output impedance of the power supply. As the bandwidth increases, the interaction between the effective
supply output inductance and the output capacitors form an LC resonator which limits the stability. Specifically, the phase of the output impedance approaches or exceeds 90 degrees. So it appears
there may have been a deliberate tradeoff between transient response and the output impedance behaviour, where absolute stability was achieved at the expense of overshoot.
I would prefer the opposite for a general purpose lab supply.
As long as the supply does not oscillate, some ringing with difficult inductive loads is reasonable. Nearly a volt of overshoot on power-on and off is not.
Of course, going deeper into the loop shaping is also an option here, but replacing C48 alone seems good enough to solve most issues with a minimum modification. Something like C48 = 320p maintains
positive phase and gain margins, does not let the output impedance phase exceed 90 degrees, and fixes the transient response.
Though the output impedance still indicates stability, it has much smaller margins than the stock configuration.
I suspect this will cause some worse ringing with certain difficult loads, but that is preferable to the large overshoot on startup.
In real tests, it also happens to reduce the output voltage noise quite substantially, possibly due to better PSRR with higher bandwidth.
Like with the real test, here we set up the LTspice model to deliver ~8V/10mA into a 47R load.
The simulation seems to show the slow CC regulation is expected.
In the current controller, changing C40 from 15nF to 1nF is enough to suppress the overshoot to below 20mA with any set voltage.
Again, the load is a 47R resistor, and the current limit is set to 10mA.
Increasing the set voltage to the theoretical maximum 35V results in just under 13mA peak current, and this is probably acceptable current limiting performance.
However, looking at the frequency response, the phase margin of the CC system is now around 47 degrees and the crossover frequency is 45kHz.
This is getting a bit too close to potential instability for my taste.
We also typically want the gain crossover slope to be -20dB/decade for stability.
If we want to keep the output stage unchanged, that seems to be with a crossover frequency around 5kHz, which means we don't really have room to increase this bandwidth from the stock configuration and maintain good stability.
To increase the current controller bandwidth and kill the overshoot, it would really be better to introduce a lead compensator - i.e., make the CC controller a proper PID controller.
The Agilent 6632B has a slow CC response time too, much worse than this. It could be argued that this allows for proper operation with DUTs that have
large startup currents - the initial spike is allowed, but if sustained excess current is drawn then it gets clamped.
We'll leave it alone.
(Modifications to Channel 1)
Part | Original value | New value |
---|---|---|
ROM version | 5.23 | 8.07 |
C48 | 6.8nF | 320pF |
R75,R83 | 1k | 220R |
R77 | 20k | 13.5k |
Pros | Cons |
---|---|
|
|
October 2024