Search This Blog

Sunday, April 28, 2013

Power Supply Refactoring - closing the hood

After many hours of work I finally can say it's done. Even though I don't consider it the perfect work, I can definitively consider it a major improvement in respect to the previous version of the PSU:

Before:


After:


And in respect to the inner workings:

Before:


After:


The tests carried so far were quite satisfying. Some optimizations had to be performed, and others are still on the pipe to be performed. For instance, one of the first issues I found was the imbalance of thermal dissipation between the 4 power transistors:


This was fixed by swapping the hottest transistor (which happened to be on the rightmost edge) and putting it in second place (counting from the left). This resulted in 3 of the 4 transistors sharing a relatively homogenous temperature. Only the first (the one closest to the fan) tended to be cooler (by 10ºC from the tests done so far). In the future I may try to swap it by a spare transistor, and see if there are improvements.

As I don't currently have an electronic load or any similar testing device, I had to play with using a manually built load consisting of a piece of nichrome wire wound resistor which we can see here glowing:



Another aspect requiring testing was the ripple. As such, one of the obvious tests was to compare it with the performance of my commercial power supply and see the differences. I didn't expect miracles. Even though the Korad KA3005P can be seen as a low cost PSU, it has a very good construction and well engineered design. They really went to town in minizing noise at the output. The comparison revealed good results in spite of my minimalist design. In average the Korad measured about 14 mVpp, while my PSU measured roughly 33 mVpp:

The test setup:

The result from the oscilloscope:


In yellow is the signal from the Korad, and in blue is the signal from my PSU. In both cases the input is AC coupled, 1x attenuation in the probe, and amplitude set to 10mV per division. No analog or digital filtering was being applied. For the triggering, the AC line trigger was selected in an attempt to sychronize with whatever ammount of stray 50 Hz could exist in the signal. As we can see in the image, there is no obvious dominance of the AC line frequency, just a sort of broadband white noise. When the fan turns on there is a slight disturbance of the signal to be checked.

However I cannot consider these tests absolutely conclusive, as even after shutting down both PSUs, the same noise pattern persisted with similar amplitude. It is not an oscilloscope probe issue because after swapping the probes, the results were still consistent.In a preliminary discussion of the results this would cause me to lean upon differences in (external) line and RF immunity rather than noise intrinsic to the power supplies. I have several switching power supplies operating close to the two PSUs under test, so this could be an issue.

Going back to the construction details, one unforeseen issue was found regarding the two led meters bought from China (panel ammeter and voltmeter): in spite of both being powered by a floating voltage in respect to the measured circuit, there was a low value resistance between the power ground and the signal ground. As such this would prevent the nr. 2 secondary tap from the transformer, from being used to also power these meters. The reason is the relation between the power ground and control electronics ground, which affects the output voltage.

As such, and given the fact that there were no more secondary windings available in the transformer, an extra transformer had to be added. I searched the scrap parts bin, and found a small ac wall transformer that seemed adequate. Opened it up with the dremel tool, and attached it to the chassis:

The AC output (the twisted red and brown wires to the left of the transformer) goes to the main control board where a rectifier bridge, filter capacitors and linear regulator produce the steady 5 Volts used by the meters.

A view of the control board, which includes elements such as the LM723 linear regulator (the core of the power supply voltage and current regulation), a PIC12F683 for controlling the fan based on the temperature, 
and bridge rectifiers, filters and regulators for the different voltages required by the circuit:


Several heatsinks were required, given the large voltage differential between the input and output (16 Volts in the case of the fan power supply). In the case of the fan, only around 100 mA of power are required, but considering this differential, we end up with a total of 1.6 Watts of dissipation in the regulator. Without a heatsink it risks getting damaged.

All in all the result is good and we now have a working power supply with good performance. In the form of improvements/tasks to be accomplished is the following list of items:
  • properly measure the ripple/reduce the injected noise (even though as is it is very good, compared to many stabilized PSUs, as for example the ones found in computers);
  • try to swap the cold transistor with a spare one,  and check if the dissipation is evenly distributed by the transistors;
  • improve the fan control algorithm, by adding some hysteresis for smooth operation (while still ensuring fact action);
  • fix slight voltage drift over time (possibly a potentiometer issue);
  • Add overtemperature indicator LED to the front panel (for not having to burn the fingers on the heatsink);
  • Check slight disturbance (few millivolts) of the output voltage when fan turns on.
In conclusion, the single benefit of this kind of project is the joy associated to the design and step-by-step construction of the PSU, and of course the knowledge that is obtained and/or profounded in the process. Also worth mentioning is the freedom to implement things that could be nice to have in commercial units. Apart from this, considering the cost of comparable commercial lab grade power supplies, and the time spent, it is clear that buying the off the shelf unit is better if the single objective is to have the instrument in the bench ready for use.





Tuesday, April 16, 2013

Power Supply Refactoring - part 5

Prior to assembling the definitive power supply circuit board (i.e. the main electronics featuring the LM723) I took the time to set it up on a breadboard. Before that I finished the board containing only the large components such as the filter capacitors and the high wattage resistors (current shunt used by the regulator chip to sense the current across the power rail, and a bleed resistor for the output capacitor):


The test setup basically looked like this:


As a load I used a manually wound nichrome wire resistor which can be seen on the lower right of the picture attached to the aligator clips.

The initial test consisted of feeding the full circuit (including the bridge rectifier) with a DC current provided by my commercial lab power supply. The current limit was set to 200 mA to avoid an eventual construction mistake from damaging components.



After all the wiring was done and every connection double checked, it was time to fire it up. I prepared myself emotionally to see magic smoke. But to my personal joy it was working. It measured an idle current of 15mA at 0 Volts output, which increased slightly as I increased the voltage knob.

The test allowed me to verify that the control potentiometers needed some changes. The fine adjustment pots in series with the cursor pin of the coarse adjustment pots was not the correct setup. Also, these fine adjustment pots had the connection inverted. These issues were fixed (the first, by putting the two pots in series but in a different configuration which will be shown in a revised schematic, and the second by simply putting the shut between the opposite pin of the potentiometer and the cursor pin).

With normal operation validated I decided to power the entire circuit from the power supply transformer (in the initial circuit the independent power for the regulator was already being supplied by the transformer). Everything worked as expected. As calculated the maximum attainable voltage was of 28 Volts. Without trying to push the power supply to the maximum for now, I managed to obtain 4 Amps of constant current without problems. I noticed a certain assimetry in the heating of the power transistors, with one of the 4 becoming about 7ºC hotter. This may be due to small differences in the transistors or in the 0.18 Ohm 5 Watt resistors which are in series with these BJT's. It is something that may require some tweaking in the resistors (if it is worth).

Yesterday the Voltmeter and Ammeter have arrived. I found that both are based around the popular ICL7107 ADC chip (which can be found in cheap multimeters for example). I also found that the ammeter only works correctly with a floating power supply in respect to the measured current. The voltmeter works well if I use the power ground instead of the signal ground to take measurements. For the ammeter there is about 0.20 Ohms of resistance between the signal ground and the power ground. This is not directly applicable for the power supply, as in spite of there being separate voltage sources, the have the grounds related by a network of resistors. The small resistance between the grounds of the ammeter would  prevent correct operation of the power supply (in this setup the LM723 depends on the difference between the power ground and control circuit ground).

Today I took some time to cut the front panel and install the meters. With everything in place I finally have a view of the external look of the power supply:


It is not exactly the most beautiful piece of equipment, but in my view it passes a little bit the impression of being rugged an sturdy like military equipment from the 2nd world war. It is my expectation that it will in fact be as reliable as this type of equipment is expected to be :)






Sunday, April 7, 2013

Power Supply Refactoring - part 4

Another weekend have passed, and along with it a few more results as I slowly but steadily walk towards completion of the project. The digital voltmeter/ammeter displays have still not arrived from China. This is the last piece of hardware missing. Adding time to the equation and all the elements necessary to complete the project are available.

This time I focused on the power handling parts. This meant populating the heatsink with transistors and the bridge rectifier and prepare all the connections between the components in this module. I had two problems: where to put the majority of power resistors used in the PSU, and how to keep the connections from the heatsink components simple.In the heatsink there would have to be quite a few components: the four 2N3055 power transistors, the KSA940 driver transistor, the bridger rectifier, the LM35 temperature sensor and the fan. Connecting all these things to the main board would mean a lot of wires crossing the enclosure. Also, it could be hard to avoid the proximity between power resistors and components that degrade with heat, such as the electrolytic capacitors.

As such I decided to build a support PCB, designed to convey the connections from the power transistors, and to hold some components such as the four 5 Watts resistors which are placed in series with the output of each transistor. The bleed resistor of the main filter caps will also be soldered in this PCB.



Through this approach, the only components using the main power rail be the filter capacitors (the two big 10 000uF ones). This simplifies the construction of the main board, and avoids potential problems and extra effort to ensure high current handling in a perforated veroboard.



The heatsink block was completed with the attachment of all the semiconductors: the four 2N3055 transistors in the front, and the bridge rectifier and driver transistor (KSA940) in the back:




The next step will be to finish this support PCB with the bleed resistor, add some connectors, and start working on the main board. For this I expect to start by placing the main board components in a breadboard and perform some tests first with the input being supplied by a current limited power supply. After satisfactory results are obtained, I will then start assembling the main board.

Friday, April 5, 2013

Power Supply Refactoring - part 3

Bit by bit the work is advancing. I have finally defined the schematic diagram from the entire power supply circuit. It includes also the PIC based fan control.



The AC input wiring have also been completed, with the front panel dual pole switch connected:






All the pots and buttons are now available on the front panel:


Also drilled the heatsink to support the power transistors and bridge rectifier:

 
Also finished the back panel with the power connector and fuse holder:


The next step is to layout the circuit in breadboard and test its main elements against a DC input. At the end I should be able to check if the expected results are obtained.


Monday, April 1, 2013

Power Supply Refactoring - part 2

The parts from Mouser have arrived (was pretty quick..wouldn't the shipment have been taken care of by FedEx):



I couldn't resist at least grabbing some of the panel parts to get a partial preview on how the front panel will look like:



I had do to some minor trimming of the width of the power switch slot. I also added a 3 mm hole for each of the pots holes, to fit the tiny poles in each potentiometer, used to prevent rotation of the pot body:



This work still has to be done for the remaining pots.

The bulky 2N3055 NPN power transistors, four of which will be used on the power supply:



And also the two large 10 000 uF 63 V capacitors which will compose the main DC filtering before the regulator section:



Another thing I started working on during the weekend was the control circuit for the fan. The idea is to vary the speed of the fan depending on the temperature of the heatsink near the power transistors, and to totally stop it below a certain temperature (i.e. 35 degrees C). As I wanted to vary the speed efficiently, I thought of using PWM. As I had some PIC12F683's lying around, I thought of programming the intentend behaviour into its firmware. In the breadboard the result was successfull, and I will add it to the main power supply circuit schematic:


For probing the temperature I have used a LM35 (shown attached to the 3 wire cable), which is a temperature sensor that delivers a analog voltage proportional to the temperature (10 mV per ºC). For the final circuit I will instead use the TO-220 package version of this sensor chip as it's easier to couple with the heatsink because of its metal plate.

Once completely drawn, I expect to post a full schematic of the power supply.