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

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

6502 compatible TTL computer

So, this is the project I've been working on for the past 10 months, a 6502 compatible (but for timing and decimal mode) TTL CPU and accompanying computer. I'm slowly working my way through Learning the Art of Electronics, and the digital part of the course requires quite a lot of specialized material. To make up for the practical sessions, I decided to build a CPU from 74XX ICs. The original idea was to make something like this project  , but then I found out about the 6502 and things went a bit out of hand. I started designing the CPU in Logisim, using Python to write microcode and the ALU ROMs contents. After several versions and a lot of debugging, it finally executed Klauss Dorman's 6502 test suite, taking an entire week to do so in the slow Logisim simulation. Most schematics were laid out and the entire CPU was built in little more than two weeks, on "holidays" between university semesters.  Quite some productive time I must say. Lots of debugging and modif