I have built myself a 3D printer using RAMPS 1.4 and Arduino. It is powered with a PC power supply. For safety, I have built a small installation with an Arduino Uno board which will independently check the temperature of my 3D printer extruder. This way, if the nozzle gets too hot, it should automatically shutdown the PC power supply and so prevent overheating (and fire) of the 3D printer.
The Arduino Uno board works perfectly. However, I struggle to connect the output of the Arduino Uno to the PC power supply.
I thought that using a relay (SRD-05VDC-SL-C) was the way to go. To make a PC power supply run on its own, I connected the green cable with the ground like is explained here. This works well.
I thought that the relay would simply be in this bridge, and would close the bridge when active, and open it when inactive.
However, this seemed not to work... Either, the power supply kept on running or it did not run at all.
Secondly, I tried to connect the green cable directly to the Arduino Uno digital out (as is described here). Sadly, also that did not work...
Does anybody have experience with controlling a PC power supply with an Arduino? What setup worked with you?
The PC power supply needs a start connection between one of the pins in the connector to the main board and earth. Can't remember which one but it is easily found via Google.
Correct, I had to connect the green wire (called PC_ON#) to the ground (black wire). This allows me to run the power supply without a motherboard.
However, I when I connect a relay in between the PC_ON# wire and the ground wire, to control this connection, it is not working correctly. The relay seems not to be able to connect or disconnect these two wires.
you have a +5v "always on" or "Vstandby" at the purple wire too if you want.
the current to enable the PSU (green wire) is a logic signal and there's no current (few mA). are you sure the relay is correctly driven? do you ear it?
I've already controlled PSU like this without problem.
the PSU is under load when you make the tests? because some of them need a minimum load to work
your arduino board share the same ground as the power supply when you try to control it by the uC port?
It has a red led which shows when it's powered. I didn't yet put it to the test with a lamp or something to really check it works itself. I will do that tomorrow first thing
The PSU is under load, as the RAMPS 1.4/Arduino Mega is connected to it. It already worked fine before. The arduino board does not have the same ground as the power supply (as it is connected through USB).
if you are using the relay the ground is not a problem. It should work. when the red relay led comes on the power supply should start. the green wire is connected to the "NO" and the ground of the PSU to the "C" contacts?
steph2000:
What I did exactly is the following:
Arduino pin 5 - Signal in of relay
Relay out - green wire
Relay ground - black ground wire
the PSU is connected to the relay screw connector (blue in the picture from your link) right?
the relay must be connected to the arduino +5V and arduino ground to work because it includes the transistor. you have connected these signals too?
to be sure, make a litle schematic diagram or a picture
Can you please post a copy of your sketch, using code tags.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png or pdf?
(I have a note page that I cut and paste these lines from, we should have some icon in the editor to do it)
weedpharma:
The PC power supply needs a start connection between one of the pins in the connector to the main board and earth. Can't remember which one but it is easily found via Google.
Search for. pc power supply on off switch
Weedpharma
ground the green cable!! for atx new psu's its 3rd to 4rd if counting only the top layer!
My light will go on and off with a frequency of 10sec.
Now, in the attached Fritzing schematic, you will see the entire setup. In it, I have replaced the light with the ATX Power Supply Green connector and Black connector. As you can see (arrow), the relay now simply should act as a switch to connect or disconnect the green from the black connector.
Normally, to get the ATX Power Supply running on it's own, I would short the green and black connector.
Sadly, also this setup seems not to work. I do not know why it does not work...
because your relay is a solid state one and is only working for 220V AC line
and you can't connect it input directly to the arduino port. it's a "led like" input and need a limiting resistor in serie. datasheet
Genesis92:
because your relay is a solid state one and is only working for 220V AC line
and you can't connect it input directly to the arduino port. it's a "led like" input and need a limiting resistor in serie. datasheet
Indeed! Oh my... Should have known that!
Well, then I can only wait until my new relays arrive to test them out
Hi, you do not need a resistor in series with the input to the SSR.
If SSR-25 DA is the one the that you are using.
Because as stated in the spec and printed on the SSR, 3 to 32Vdc input. It has input circuitry to allow you to use a range of input voltages without a current limit resistor.
What will cause you probems is the power supply pins that you are connecting will be DC, the SSR is for AC, so it may turn ON but may not turn OFF. If the DC current from the supply is low enough it may be okay.
Thanks for all the suggestions and tips! In the end, I went for my original design, and received my new relays (SH-05VDC JQX-3F). These relays work perfectly. I can now effectively control my PC Power supply and cutoff power to my 3D Printer if needed.