Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
Doug Domke
Published © GPL3+

"The Beast" Bench Power Supply

Only bench power supply you will ever need. Two 10 amp 1 - 30 volt outputs, with 20 watt Pos/Neg Dual Supply 3-30 volts.

IntermediateFull instructions provided8 hours1,611

Things used in this project

Hardware components

10 Amp 24 Volt Transformer
×1
Full Wave Bridge Rectifier
×1
2200uF 50V Electrolytic Capacitor
×4
300W Buck Converter Module
×2
Boost Buck Positive Negative 20 Watt Converter
×1
100K Precision Potentiometer
×2
50K Precision Potentiometer
×1
16x2 I2C LDC Display
×3
Arduino Nano R3
Arduino Nano R3
×1
50 watt 0.5 Ohm Resistor
×2
LM2596 Buck Converter
×2
Binding Posts
×7
100K Resistor
×6
20K Resistor
×3
10K Resistor
×2
0.01 Mfd Capacitor
×5
3/8 Inch Plywood 10 Inch x 6 Inch
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

3D Printer File for face of power supply

STL Object File - Needs to be sliced

Schematics

Schematic for Power Supply

Code

Code for Power Supply

Arduino
For Arduino Nano
// This program reads voltage from 3 different power supplies and displays those
// voltages on three different 16x2 LCD screens.  It also reads the current from
// the first two supplies and displays current and wattage on the displays as well. 

#include <LCD_I2C.h>

LCD_I2C lcd1(0x26, 16, 2);
LCD_I2C lcd2(0x25, 16, 2);
LCD_I2C lcd3(0x27, 16, 2);

void setup()
{
  lcd1.begin();
  lcd2.begin();
  lcd3.begin();   // this one calls Wire.begin()
  lcd1.backlight();
  lcd2.backlight();
  lcd3.backlight();
}

void loop()
{
  unsigned int adc1=0; // voltage 1
  unsigned int adc2=0; // voltage 2
  unsigned int adc3=0; // voltage 3
  unsigned int adc6=0; // current 1
  unsigned int adc7=0; // current 2
  
  // get 32 readings from the ADCs
  // taking many reading to filter out any noise - especially noticable at low or 0 current.
  for (int j=0; j<32; j++) {
    adc1 += analogRead(A1);
    adc2 += analogRead(A2);
    adc3 += analogRead(A3);
    adc6 += analogRead(A6);
    adc7 += analogRead(A7);
    delay(5);
  }
  //take their average
  adc1 = adc1/32; 
  adc2 = adc2/32;
  adc3 = adc3/32;
  adc6 = adc6/32;
  adc7 = adc7/32;
  
  // calculate currents - max ADC would be 10 amps
  float correction1 = 1; // adj if necessary to correct error
  float correction2 = 1;
  float current1 = correction1*adc6*10/1024.0f;
  float current2 = correction2*adc7*10/1024.0f;
  
  // calculate voltages - max ADC would be 30 volts
  // ADC measures voltage from ground, so subtract voltage drop across 0.5 ohm current sensor
  float correction3 = 1; // adj if necessary to correct error
  float correction4 = 1;
  float correction5 = 1;
  float voltage1 = correction3*adc1*30/1024.0f - adc6*5/1024.0f;
  float voltage2 = correction4*adc2*30/1024.0f - adc7*5/1024.0f;
  float voltage3 = correction5*adc3*30/1024.0f;  // no current sensor here
  
  // display measurements on top display
  lcd1.setCursor(0, 0);
  lcd1.print(voltage1,2);
  lcd1.setCursor(6, 0);
  lcd1.print("V  ");
  lcd1.print(current1,3);
  lcd1.setCursor(15, 0);
  lcd1.print("A");
  lcd1.setCursor(5, 1);
  lcd1.print(voltage1*current1,1);
  lcd1.setCursor(10, 1);
  lcd1.print("W");
  
  // display measurements on mddle display
  lcd2.setCursor(0, 0);
  lcd2.print(voltage2,2);
  lcd2.setCursor(6, 0);
  lcd2.print("V  ");
  lcd2.print(current2,3);
  lcd2.setCursor(15, 0);
  lcd2.print("A");
  lcd2.setCursor(5, 1);
  lcd2.print(voltage2*current2,1);
  lcd2.setCursor(10, 1);
  lcd2.print("W");
  
  // display measurements on bottom display
  lcd3.setCursor(0, 0);
  lcd3.print(voltage3,2);
  lcd3.setCursor(6, 0);
  lcd3.print("V  ");
  lcd3.setCursor(5, 1);
  lcd3.print("Pos/Neg");
}

Credits

Doug Domke

Doug Domke

39 projects • 105 followers

Comments