Skip to main content

Linear lab power supply

This is a dual channel linear lab power supply I have spent recent months building, much thanks to the help received in this EEVBlog thread. All design files are available in this GitHub repository.
I will attempt to go over the general progress of the project, but please refer to the said thread for more information.

Design requirements:

  • Dual isolated channels.
  • Adjustable voltage and current  30 V , 500 mA per channel.
  • Digital voltage and current displays.

Build stages:
First, the case was made out of a wooden board and 3d printed front and back panels. Heatsinks were taken from old computers. One side of a 2x 10Vac and a 15 Vac transformer power each channel, plus a 12 Vac smaller transformer for the displays, fan and microcontroller. Ac voltages are rectified and filtered on a separate board.

Here are some photos of the early development, initial circuit was based on the one found here.
Then came perfboard prototypes, testing and throubleshooting:

PCBs were designed using Eagle. This is my first computer-designed PCB, and it has been an interesting process going through several versions and then getting them manufactured.

Then came PCB testing:

And final assembly:

Front panel overlay was designed on Inkscape, printed on photographic paper, and glued on:

User interface:
It is simple enough: each channel has three push buttons, set V, set I, and ON/OFF. Pressing one of the set buttons lights the appropriate led up and lets the user adjust the value by means of the knob. When the leds are lit, the display shows the set value, when they are not, the measured one. After a couple of seconds of inactivity, leds switch off. Voltage is shown in volts, current in mA.
The led next to the ON/OFF switch does what it is supposed to do. When in CC mode, all decimal points on the current display are on.

There is a "menu" key under the knob. At the moment, pressing it shows temperature and output power on the displays.

The firmware has several main tasks:
  • Interface with the analog circuitry:
    • Handle PWM to generate analog voltages that set voltage out and current limit.
    • Measure output voltage and current.
    • Detect CC mode.
    • Measure temperature, and drive the fan accordingly.
    • Calibration constants are hard-coded and should be adjusted before using the unit. I may write a calibration procedure that does this automatically and stores values on EEPROM.
  • Handle user interface:
    • Displays are driven using the required library, and data is given the appropriate format.
    • Keys are read and leds are driven. Note that a single pin handles a button and a led, so keys are sampled periodically, making the pin and input and then back to an output. See schematics.
    • Encoder is read by using interrupts.
  • Handle serial communication:
    • This power supply has two isolated channels, that communicate via opto-isolated serial.
    • Channel 2 is the master and channel 1 is the slave. This means that channel 2 handles the encoder and the "menu" key, and it gets asked for its position by channel 1. Serial commands begin by '<' and end by '>'. Channel 2 also tells channel 1 to show temperature and power when the "menu" key is pressed.
  • Handle error conditions: Shows an error code on the displays for the following conditions:
    • E1: measured current greater than set current.
    • E2: measured voltage greater than programmed voltage.
    • E3: max temperature exceeded.
    • E4: min temperature exceeded, that is, the thermistor is not connected.

So that is a brief summary. For more details, please refer to the mentioned EEVBlog thread. Again, all design files are available in this GitHub repository.


Popular posts from this blog

A4 Pen Plotter

This is a pen plotter capable of printing on A4 paper sheets. It is intended to be similar to the Aritma Amagraph pen plotter, be as compact and robust as posible as well as reliable. It is controlled by means of an arduino with a grbl shield, wich drives the x and y motors, and the solenoid used for lifting-lowering the pen in response to g-code generated in inkscape and sent through grbl controller.  Here is a video of it working: More info & files here:

Arduino Based Electronic Load

I have had some problems with my "lab power supply" and I wanted to build another one, so I thought a DC load may be handy to have around. The design is based around Dave Jone's design shown in this video , but with a couple more features, including:     -Arduino controlled.     -Voltage, current, power and temperature monitoring.     -CC and external in hardware modes and CP, Cr software modes.     -Over temperature, over power and over current protection (software) It can handle around 4 amps and 24 volts, limited by the mosfet. It's divided in two main boards. * UI Board: houses the 7 segment displays (I know one is bigger that the others, just what I had aroud...) and the keyboard. The display is multiplexed using a shift register. In addition, the four buttons are read taking advantage of the transistors switching the comon anodes, requiring only one additional pin. Only the first digit had decimal point, so one led was added for the second dig

1:120 S-80 RC Submarine

This is my third attempt at building an RC submarine, a difficult endeavour as those who have had a go at it will know. After a German WWII U-Boot (undergoing repairs), and a Russian Akula (decommissioned two years ago), now it was time for a Spanish one. The S-80 class submarines, still under construction, have been elongated due to technical problems. This model, at 1:120 scale, is of the original project. The hull was modelled in Fusion 360 using photographs found online and some rather vague lateral and top views found on related publications. Then, it was 3d printed in grey ABS and acetone-welded together.  The WTC, housing all the control electronics, servos, pumps, and propulsion motor is made out off a convenient water bottle I found at a local shop. Anyone wishing to replicate this project will have to find a suitable container. All movements are magnetically coupled to the exterior, and two tubes go out through the end cap, one housing the antenna and a