Controlling an ATX power supply (PSU) with a transistor

Controlling an ATX power supply (PSU) with a transistor

I have recently built a 3D printer. Yay me!

It is running OctoPrint which allows my 3D printer to be web accessible.

This is great except that as it stands I need to telephone my good lady Wife should I need to print anything while I am out – which surprisingly happens quite frequently – so she can turn on the PSU to allow me to print.

I use a standard ATX power supply to run my printer and wondered if I could use my printer’s control board (a sanguinololu) and a spare pin to turn on the PSU. It turns out that I can.
Example: M42 P7 S255
M42 switches a general purpose I/O pin. Use M42 Px Sy to set pin x to value y, when omitting Px the LEDPIN will be used.

I have connected the control wire to pin A1 on the sanguinololu board, so to turn on and off the PSU I send:
To turn on:

M42 S255 P30
To turn off:

M42 S0 P30
The circuit I am using to turn the PSU on is as follows:
BC184L NPN Transistor

1 2 3
1 Emitter
2 Collector
3 Base
Connect Emitter (Pin 1) to Ground
Connect Collector (pin 2) to PS_ON (Green wire on ATX PSU)
Connect Base (Pin 3) to the pin you will be using on your control board via a 1KOhm resistor
I have colour coded the wires on my version to make identification easier:
Data pin: Blue wire
Emitter: Black wire
Collector: Green wire

Once you have soldered up your transistor and heatshrinked the legs for protection you can test the circuit just using the PSU by connecting the green and black wires as normal and using the 5VSB (purple) line to emulate the data line.
Connect the blue wire to the purple wire and the PSU should power up. Remove the blue wire and the PSU should power down.

Some PSUs require a load on the 5V line before they will power up, just connect a CD-ROM or (my preferred method) rewire a 12 volt fan so it is connected to the 5v line instead of the 12v line and plug that in.

Related posts

Leave a Comment