Wednesday, May 30, 2012

Bench Power Supply - Progress Update

Here's a little video I shot of my power supply in action. I think it is very close to being workable. I have a bunch of placeholder parts, since I'm holding off on placing an order for final parts until I do more testing.

One thing I've been working on recently is the current-limit-mode indicator LED's. It's a little but harder of a problem than I thought it would be. My current limit comes from Q1 in the schematic. As the current flowing through R1 rises, it causes the voltage on the "+" input of the U2 op-amp to eventually exceed the ISET voltage. This drives U2's output high which in effect ties U4's output close to ground. My idea was to connect the "+" side of U4 to a spare input on my IO expander, and sample it's value in code. My initial thoughts were that a low value indicates that the circuit is in "current limit" mode. It turns out there are numerous reasons that this wont work. The face palm moment was realizing a low VSET value will also trigger the current limit logic regardless of the actual current! The other major problem was that I was using a digital input to estimate what is really an analog voltage.

Anyways here's the video:

It's actually working better than I thought it would have, considering how many small details I sort of glossed over in the breadboard build. What you can see is that the red current limit LED illuminates intermittently. Part of this is because the current limit mechanism behaves more like a PWM mechanism than a self correcting analog feedback loop. I have a large 220uF cap on the set pin of my regulator that smooths out the effect. But the current limit op-amp starts to acts long before it's actually in full current limit mode.

So in pure voltage mode, and at the middle to upper range of the volt settings, the supply works beautifully. The measured voltage is very close to the set voltage, and the measured voltage jives with my multimeter. When the voltage setting is high, but in pure current limit mode, things also work well. It's the edge cases, where the voltage settings are low (<1 V) or the current setting is very close to what it would be at a given voltage, that it acts a little weird. More testing.



  1. Wow the video quality is horrendous. It looks much better than that before I uploaded it. I need to look into how to make videos better looking in blogger.

  2. I skimped a little on details on this post too. I connected the output of U2 to the IOExpander. That takes care of the VSET problem, but I found that since the amp activates before in full current limit mode, and that fact that I'm sampling a PWM signal via a slow I2C interface, means that it's still not a great indicator of begin in current limit mode. I think in the end I'll have to resort to software to determine if I'm in current limit mode. The current measuring part of the circuit seems to be suffering from the highest error, making simple "if (Imeasured = Iset) currentLimiting = true" type logic not very reliable.


I welcome you're thoughts. Keep it classy, think of the children.