Friday, 24 April 2015

Lab Power Supply - Voltage Regulator Test

Well it seems to work!

Since the last update a few things have happened - I got a new toy! I bought a refurbished Agilent (Ahem Keysight) MSO-X-2024 oscilloscope, I got some parts and have successfully tested part of the voltage regulator circuit.

New Scope

First things first - the scope just a bit good for my current level of ability. I got the unit quite cheaply as it was a demo model that had been sent back for re-calibration. It comes with warranty like a new scope and has all the original packaging and other things like a new scope. For all intents and purposes it is a new scope.

My original plan was to get the lowest 4 channel scope in this range as they are software upgradeable (even the bandwidth). This unit is actually the highest in this range but was around the price I intended to pay!

The unit is 200MHz, has digital phosphor display so it mimics an analog scope and averages multiple waveforms together. From the first time I started playing with it I was really impressed with the clarity compared with my old Siglent. The screen is big and bright and the waveforms are sharp. It is lightning quick so turning the time base knob has an instant effect. The scope can capture a staggering 50,000 waveforms per second.

The scope has 4 channels. I originally thought I'd never use them all but actually they've been pretty useful. Also, if you are only using two channels and you use channels 1 and 3 you get the full 2Gs/s speed whereas using both channels on a two channel scope halves the speed.

I splurged and also got the I2C and SPI decoding option and the 1MB memory option. I tested the SPI decoding using my dummy load tool and decoded the signals going to the DAC. It took me ages to figure out why the writes appeared twice but sometimes the second write was slightly different. Turns out there was a bug in the code! I had left some test code in I used during calibration but as the second write was the one that set the correct current it worked! Here it is decoding a signal from my signal generator.

I find the thing shows much more of the noise than the Siglent unit as the Siglent was averaging it all out (since its sample rate was so low).

Lab Power Supply Tests

So I have made some progress on the lab power supply. I wired an IEC mains socket to the primary side of the transformer with an in-line switch and fuse. The switch connects both active and neutral at once for safety. My house has an earth leakage unit as well as regular fuses and I run the transformer on an extension lead so I can turn it off without reaching over (by stepping back from it).

The trouble with the transformer is of course it can supply a lot of current so when you make a mistake things explode. While mucking around with the voltage doubler I destroyed a couple of capacitors which erupted like firecrackers and a 1N4148 diode that blinked briefly and fell in two pieces!

I was originally using my Jaycar lab power supply to set the output voltage. This is tricky as you have to sequence the power up correctly or else you end up killing the opamp. I did kill one opamp package this way unfortunately and these LT devices aren't cheap! I added a diode to pass the input voltage to VCC and this seemed to help. In the end I just added a 25V zener with a resistor across the bias voltage output and used this to set the voltage output. This is much better.

While testing the bridge rectifier/double I also managed to overheat my dummy load which destroyed the MOSFET. Worse - when the MOSFET failed it went short and burned out my precision 1 ohm resistor. I really need to implement some sort of temperature limiter on that!

I am testing the power supply in sections and so far I have the bridge rectifier, smoothing capacitors, voltage doubler, voltage regulator and output voltage differential amplifier running.

When Ground is not Ground

I don't think I would bread-board this type of circuit in the future. I plan to rebuild the high-current parts of the circuit on proto-board and just leave the low current control circuits on bread-boards.


I had a lot of problems to begin with and I thought the problem was the voltage doubler. The transistor regulator using a zener diode really didn't work very well. The voltage fluctuated a lot and there were these odd voltage spikes that I still don't understand.

I figured out I could run the supply with the gate bias at 36V which is just inside the limit of an LM317. There is an LM317HT that I might use for the final design that can go to 57V.

Even after adding this regulator I was finding the bias supply fluctuated a lot. With no load it was only a few mV but with 1A load it was 50mV which is way above what I wanted. 

I tried everything but the fluctuations remained. I had a thought and powered the regulator from the bulk smoothing capacitor (via the LM317) but this still made no difference. I tried powering it via my Jaycar lab supply and that also made no difference - this left me scratching my head as I couldn't see why it would be the same. The fluctuations were roughly in sync with the charging of the bulk capacitor - which made even less sense as the output went down when the capacitor voltage went up.

Then the penny dropped. When the capacitor charges it pulls a lot of current. I had the capacitor at the other end of the breadboard from the bridge rectifier. There was 50mV of voltage difference between the where my scope probe ground was and where the ground used by the opamp was.

I re-arranged the board so most of the high-current stuff was close together. The leads I soldered onto the MOSFET where too short however so it stayed where it was. This fixed most of the issued with the output.

I decided it was time to add the differential amplifier to sense the voltage at the output and this fixed up most of the remaining strangeness. The MOSFET is still pulling current through the whole breadboard but it doesn't matter as much now as the sense is happening at the MOSFET terminals.

Regulator Performance

Overall the regulator performance is not too shabby and actually close to predicted. The output trace is in green below and the load is yellow (1V per amp so it is switching from 1A to zero and back again).


There is a little offset between the high and low load voltage - not sure where this is coming from but I think it is a ground resistance issue to do with where the scope ground was placed.

The two blips before and after the load I think are from the dummy load - not sure exactly but these happen with the power supply circuit turned off.

It seems to react in about 10uS and the overshoot is around 200mV. Not bad!

The trace when the load increases is similarly quick but slightly bigger magnitude.


For comparison this is how the Jaycar power supply behaves when loaded


The overshoots are actually just as big but it doesn't manage to get back within the period of the pulse signal! Seriously! 


If I set the load for 50Hz you can see it does get closer but it takes a long time! This is with the scope probes *right* on the front terminals.

Next

I might experiment with reducing the noise but I think it is no worse than the Jaycar supply. Otherwise I will start looking at the pre-regulator next.


No comments:

Post a Comment