ATX Bench PSU


This project was started a long time ago, and has only slowly progressed, but it’s now ready to be documented and shared with the world.

I’m not the first to use an ATX computer supply top power my DIY projects, but I believe the design I have chosen is great for both advanced users and beginners.

One of the aspects that I have chosen to focus on is the look and feel – I wanted to have something that looked and felt like regular bench equipment, to distinguish it from the birds-nest project that it powers.

Features

The finished PSU has a few basic features, not the most advanced, but adequate for most projects:

  • 3.3V regulated output (usually 30A+)
  • 5.0V regulated output (usually 10A+)
  • 12.0V regulated output (usually 5A+)
  • Current measurement for each output
  • Display to show the measurements
  • USB interface to output data and update firmware
  • Buttons with indicators to turn on/off PSU and show/acknowledge alarms

Design

Front cover with binding posts and display

The original idea was to make a 3D printed part, that attached to one side of the ATX power supply (the one where the wires sticks out) that then could house some electronics and not least the output connectors.

I ran into some problems (wrong tool or incorrect use of the tool), and switched over to a CNC milled or laser cut edition using either plywood or acrylic as the material for the case. I’ll look into designing a part for 3D printing. If you are interested in that, let me know in the comments and we can maybe work together on a design.

Lasercutting also opens up for additional decoration via laser engraving, which the current prototype uses. It’s a bit slow to do the engraving, but gives the PSU a nice finish and no need to add information afterwards.

Electronics

Overview of electronics

The electronics are based on the LCD I/O Backpack, with a custom FTDI board for USB interface and 3 separate current measurement boards mounted on the back of the output binding posts.

The choice of electronics are mainly because of accessibility, other boards can also be used, but slight changes in cabinet size might be needed, as it’s a bit crammed already.

Detailed view of the current sensor board mounted on the back of the binding post

The current sensing boards are based on the Allegro ACS712 hall effect based current sensor each having an analog output that is sent to an analog input of the Arduino based LCD I/O Backpack. These sensors are very close to linear and hence very easy to use on the coding side. I have made a few tests with a computer controlled DC load and can confirm this linearity.

USB interface board with FTDI chip on the back

The USB interface is nothing but a stripped down FTDI interface based on the FTDI FT232RL. The major difference from other FTDI boards is the full size USB-B socket that is slightly off axis to compensate for the off axis connectors on the LCD I/O Backpack, so that everything lines up nicely on the outside of the box.

To make the device useful, an optocoupler has been added to turn on/off the ATX power supply, and similarly a few parts have been added to control the backlight on the LCD, to make it look “off” when not running. The control electronics are powered from the “always on” permanent 5V output that the can easily power the LCD I/O Backpack. This setup isn’t ideal, but it’s pretty simple to implement.

The buttons and indicator light are simply connected to some spare I/O with a few resistors in series to keep it running smoothly.

To control the state of the ATX PSU, an optocoupler is added to an output on the LCD I/O Backpack.

Software

The software is currently very basic, I haven’t even converted the raw output from the analog inputs to readable current values, but it should be relatively simple to have both nice readouts, logging output via USB and maybe some alarms (a buzzer would also be interesting here).

The code below is a simple test controller, made for testing the different pieces. It needs a bit of finishing to reach the same polished level as the rest.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
  ATX Bench Power Supply Unit Controller
  -----------------------------------------------------------------
  by Thomas Flummer, hackmeister.dk
 
 */
 
// include the library code:
#include <LiquidCrystal.h>
 
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
 
const int powerPin = 8;
const int powerSwitchPin = A7;
const int alertSwitchPin = A6;
const int powerLEDPin = A5;
const int alertLEDPin = A4;
boolean powerState = false;
boolean alertState = false;
 
void setup() {
  // Power pin setup
  pinMode(powerPin, OUTPUT);
  pinMode(powerLEDPin, OUTPUT);
  pinMode(alertLEDPin, OUTPUT);
  digitalWrite(powerLEDPin, LOW);
  digitalWrite(alertLEDPin, LOW);
 
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("");
}
 
void loop() {
  int powerSwitch = analogRead(powerSwitchPin);
  if(powerSwitch < 100)
  {
    if(powerState)
    {
      digitalWrite(powerPin, LOW);
      digitalWrite(powerLEDPin, LOW);
      powerState = false;
      lcd.setCursor(0, 0);
      lcd.print("                ");
      lcd.setCursor(0, 1);
      lcd.print(" Standby...     ");
    }
    else
    {
      digitalWrite(powerPin, HIGH);
      digitalWrite(powerLEDPin, HIGH);
      powerState = true;
      lcd.setCursor(0, 0);
      lcd.print(" ATX Bench PSU  ");
      lcd.setCursor(0, 1);
      lcd.print(" Booting...     ");
      delay(2000);
    }
    delay(500);
  }
 
  int alertSwitch = analogRead(alertSwitchPin);
  if(alertSwitch < 100)
  {
    if(alertState)
    {
      digitalWrite(alertLEDPin, LOW);
      alertState = false;
    }
    else
    {
      digitalWrite(alertLEDPin, HIGH);
      alertState = true;
    }
    delay(500);
  }
 
  if(powerState)
  {
    /* if turned on */
    lcd.setCursor(0, 0);
    lcd.print("3.3V  5.0V   12V");
 
 
    int current3v3 = analogRead(0);
    int current5v0 = analogRead(1);
    int current12v = analogRead(2);
 
    lcd.setCursor(0, 1);
    lcd.print(" ");
    lcd.print(current3v3);
    lcd.print("   ");
    lcd.print(current5v0);
    lcd.print("   ");
    lcd.print(current12v);
    lcd.print("  ");
  }
  delay(100);
}

If you have ideas or want to help, you are very welcome to let me know in the comments.

Download

Creative Commons LicenseThere is a bunch of different parts to this projects, both mechanical parts for the case and electronics boards. Schematic and the board files are in Cad Soft Eagle format, mechanical parts in Adobe Illustrator EPS and PDF. The hardware design is released under Creative Commons BY-SA.

14 thoughts on “ATX Bench PSU”

  1. Jakob says:

    Hi Thomas
    Nice work. I like the way you extend the original cabinet :)
    I use a simple ATX PSU myself. Have you added any kind of short circuit protection for the PSU?
    If I short circuit my ATX PSU, it will kill it, and I have to turn the mains off, and on again, to make the PSU work again. I would like to get around this somehow.

    // Jakob

  2. Hi Jakob,

    Thanks!

    Regarding short circuit protection, there isn’t really any… in that regard this design is pretty simple. I have thought about having some FETs or a relay on each output, but I haven’t gotten into testing it out yet.

    /Thomas

  3. Dunk says:

    Hi,how have you limited the voltage on the 12v line for the current sensor and made the power on the 3v line high enough to power the current sensor,as they are 5v working voltage,can you try explain,ime a beginer to electronics,great design by the way.

  4. Dunk says:

    Aww i see they are all powered from 5v,i thought they took the power from each rail, dumb me,they all have separate power lines to 5v.sorry for the dumb question.

  5. Yes, you are correct, they are all powered from the 5 V rail. The current sensing chips have the sense circuit isolated internally from the power and output.

    /Thomas

  6. Dunk says:

    Hi thanks for reply,another question for you,
    You say your adding an optocoupler?
    To switch on the psu from microcontroller i gather,just like a relay or a transistor,but isnt it a opto-isolater that you need,as an optocoupler sends signal from high voltage to Microcontroller,and in this case you would need it the other way round,Microcontroller signal to high voltage,am i right?
    I only ask so i buy the right part,also i have added to the code so lcd light goes off when on standby,like you wanted,but without any extra componants,But having said that ime using a different setup so ive probly got more freedom to add and change things,ime not using the LCD I/O Backpack, ime using separate lcd and arduino mini pro,its alot better i think as it gives you more room,ile make a different case,but yours is out of this world,verry skilled are you.
    Ime verry much looking forward to you sorting the raw output from the analog inputs,i think thats all thats left to complete the code so that its in a fully working state.
    I know you mentioned adding other things to the code too,but for me sorting the raw output out is all i need to finish mine,i may add the usb part in future.
    Also i learned quite alot from working with your code,ime new to all this and learning by the day,so thanks

  7. Dunk says:

    Oh i forgot to ask,so the Microcontroller and current sensing chips are powered from the 5v standby rail should be purple wire,thats on when the power supply is off-fan off state etc.

  8. Dunk says:

    Also what is the alert Switch Pin and alert led for? what does it do?

  9. For switching the PSU on/off I used an optocoupler/optoisolator mostly because I had it laying around, I could probably also have used a transistor instead. I actually think it’s 5 V logic on both sides and is also common ground.

    It should just be a matter of doing a bit of math with the raw values, then you should have current readings in Amps, but it needs to be a bit different if you use different ratings for the Allegro chips.

    It sounds right about the purple wire for the logic.

    The Alert button and LED is just there for future use, maybe something like lighting the LED if the current goes over a threshold and resetting it with the button.

    I’d love to see a picture of your completed PSU when it’s done!

    /Thomas

  10. Dunk says:

    Hi,thanks for clearing that up for me,yes ile post a picture of the finished psu,it may be a while as ive not designed it yet,and ive still to buy the bits and bobs,ive a brand new 550 watt psu though, it will come together soon enough.
    Will this transistor be ok to switch the power supply on = TIP42C its just that i all ready have one lying around.

  11. Dunk says:

    Hi,ive done it without transister or optocoupler,ive just used the power pin to ground the power ok lead as its common ground,he he

  12. Dunk says:

    So how do i figure out how to set the amp scale properly ive no idea,and also i dont know the code to enter it eather,so when you get round to it please let me know,ive still got to order the sensors any how,what amp sensors have you got,is it the 10amp?

  13. Dunk says:

    Ive read that we may need an op amp to make the resalution higher to read smaller measurements,or something to that effect,you will probly make more sense of it when your doing the conversion math.

  14. Dunk says:

    Hi ile be using 20a current sensors,so if do get round to sussing out the raw data could you have a go with 20A converion too,thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>