Programmable Dual Channel DC Power Supply

This project involved the design and construction of a programmable, dual-channel DC power supply. Each channel is independently capable of being set from 0.00 to 30.00V with a resolution of 1.25mV. Current limiting may be set from 0.000 to 5.000A with a high-side measurement resolution of 0.15mA. Display resolution via the LCD is 10mV and 1mA. Full floating-point precision is available via a remote PC connection.

Specification overview:

  • Number of channels: 2 (optional expansion up to 4 with larger LCD)
  • Voltage range : 0.00 - 30.00V
  • Voltage set resolution: 10mV
  • Voltage measurement resolution: 1.25mV
  • Current limit: 0.000 - 5.000A
  • Current set resolution: 1mA
  • Current measurement resolution: 0.15mA
  • Noise: Measured 8mVpp at 5V no load and 120mVpp when sourcing 3 Amps.

The design is modular featuring a COTS AC-DC converter for efficiency with a dedicated micro-controller PCB and separate power supply PCBs for each channel. This minimizes noise between channels as well as improving reliability and maintainability. Each board is wired using a star-ground methodology.

Right-click to open larger images.


Micro-controller board

PIC 18F4550 with interfaces for 16x2 LCD, 6 switch keypad, rotary encoder, I2C DAC, I2C current/voltage monitor, PC UART & USB, PWM buzzer, internal EEPROM, ICP.

Power supply module

LM2596 switching regulator with low pass filter. Separate low-noise linear 5V regulator for MCP4725 DAC and INA226 high side power monitor. This module interfaces with the micro-controller board via I2C. Two of these boards are used with different I2C address configurations.

Keypad

A simple keypad that allows the user to control various settings. Interfaces directly to the micro-controller board via GPIO pins. Standard through-hole 6x6 tactile switches are used with push-on plastic knobs.

Rotary encoder

A simple rotary encoder allows the voltage and current settings to be adjusted up and down. The rate of change varies depending on the cursor position with steps ranging from 10mV/1mA to 10V/1A per step. Pressing and holding the encoder button locks all keys preventing inadvertent adjustment.

Software features

  • Instantaneous display of both voltage and current for each channel.
  • Over-current alarm indicated on LCD plus audible buzzer sound.
  • Save settings in EEPROM which will be restored at power on.
  • Enable/disable outputs without turning the entire unit off.
  • Locate cursor on any digit allowing convenient adjustment of settings.
  • Lock the rotary encoder and keypad so adjustments cannot be made inadvertently.
  • Remote control via USB port on PC. This allows for programmable voltage waveforms in addition to real-time logging of both voltage and current.

These screenshots shows how a remote PC connection can be used to generate programmable voltages and demonstrates a typical example of logging voltage and current to a file.


PC serial protocol: 19200, N81
To enable/disable real-time logging of all parameters, send 'L'.

To set voltage or current parameters, each command from the PC must comprise of 6 characters:
channel mode value1 value2 value3 value4
channel must be either A or B
mode must be either V or I
value is a decimal representing the actual voltage or current
Range of voltage values is 0000 to 3000 (30.00V)
Range of current values is 0000 to 5000 (5.000A)
eg:
AV1234 - sets channel A voltage to 12.34V
AI2345 - sets channel A current to 2.345A
BV0200 - sets channel B voltage to 2.00V
BI1234 - sets channel B current to 1.234A

Construction

Internal view from the front
Internal view from the rear
Proof of concept prototype - top
Proof of concept prototype - bottom
Milling the front panel on my homemade CNC mill
Turning the LCD and keypad standoffs on my lathe

Last update: 30 June 2018
© Steven J. Merrifield