Welcome! Log In Create A New Profile

Advanced

RAMPS Switch ON/OFF PSU with a relay on PS_ON

Posted by Amachete 
RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 08, 2015 05:36AM
Hello

I am new on this forum, and I would appreciate some help with this mod I would like to put in my Printer.

I have read everything I have been able to find on internet but I can not get it work.

My problem is the following:

I want to use relay to switch on/off my PSU as in this topic explains :http://reprap.org/wiki/Power_Supply#Controlling_the_PSU

I bought the following relay:http://es.aliexpress.com/item/C18-Newest-2014-Level-Triger-Optocoupler-Relay-1-Channel-H-LModule-for-Arduino-5V-Free-Shipping/32224788335.html?recommendVersion=1

My ramps is a 1.4Version.

I have tested the M80/M81 gcodesand they work, because I can measure with the multimeter, a variation voltage. measuring betweeen VCC and PS_ON on those three pins.

If M80 I get -5V
If M81 I get 0V

I do not know what else to check or maybe can someone tell me if this relay is not right one?

Thank you for your support.

Edited 1 time(s). Last edit at 03/08/2015 05:37AM by Amachete.
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 08, 2015 10:11AM
On your ali-express link the "wiring diagram" is wrong: it says for VCC "Connect to 5V negative" and for GND "Connect to 5V positive" - it should be the other way around!
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 08, 2015 11:01AM
Ok thanks.

Your are right, that is wrong on that diagram, but I am connecting right that bit,

5V Power supply, I connect to Vcc to 5V and Ground to Ground. The relay power led, switches on., If I put them wrong It should not light up, doesn´t It?

The problem comes from the IN pin, I guess...

Other ideas?
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 08, 2015 12:06PM
Do you have the jumper installed that connects AGND to DGND, as on the picture? (If not the ground is only for the LED.)
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 08, 2015 12:34PM
Yes It Is.

There is a jumper on.

The power led brights quite well,

But the other is always on, a bit dim, not full power, Even though I send M80 and M81, The light is still on.

I made a test with the V5sb, and the PS_ON cable "crossing" them, and the led brighted as hell, and the main PSU switched on....

I do not know If this helps,

If you need any other thing to do...I think I have already tried everything.

Thank you for helping me out...
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 08, 2015 01:05PM
Hiii sir i read your post i'm building my reprap 3d printer but i'm using my powersupply from my old pc so i referred this link [github.com].
But when i connect the power supply to the RAMPS 1.4 board its is working but when i connect my usb cable to the laptop the power stops
Plz help me Out
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 08, 2015 02:38PM
@Amachete: Can you post a photo of your setup and wiring?

Edited 1 time(s). Last edit at 03/08/2015 02:39PM by enif.
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 08, 2015 05:14PM
I hope you can see my setup. If you need more picture, let me know.

I unplugged other wires and Ispread the mess of wires in order to see something, I hope it helps...

thank you
Attachments:
open | download - DETAIL_0.JPG (82.8 KB)
open | download - DETAIL_1.jpg (375.8 KB)
open | download - DETAIL_2.jpg (336.3 KB)
open | download - DETAIL_3.jpg (375.7 KB)
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 09, 2015 02:56AM
How does the ground from your 5V adapter get to the Arduino? Isn't there the black wire missing that brings the ground from the splitter to the Arduino in parallel with the red 5V?
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 09, 2015 04:16AM
Yes, there is not a black wire(ground) attached to RAMPS as they are part of other circuit apart of the main PSU(12V), I guess it is necessary....

I thought of it but as this wire does not appear on any of pictures or graphics, I have looked at,...I did not put it in.



the main thing is I do not know where to plug it, and close the circuit!!!

But in my opinion, this V5(Stand by) is not necessary) but It might be useful.....other thing would be if the 5V psu is enough to power up the ARDUINO and LCD, in order to make and independent machine. and what about an auxiliar psu which provides 9V and 5V?

Reading the documentation of the relay I found out that the IN pin needs at least 40mA, I do not know If RAMPS is able to provide these amount of source through this pin.....

I was able to find the atttached document....I might help....


Thank you for your efforts....

It is strange that nobody has tried this setup before, I am afraid It is not well documented.......

Edited 2 time(s). Last edit at 03/09/2015 05:06AM by Amachete.
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 09, 2015 05:33AM
Looking at your last picture, I think that your red 5V wire going to the RAMPS doesn't do anything, it just goes to the servo headers. But I guess that this
is better, since the Arduino also provides 5V, so if you connect the 5V from the 5V adapter to the RAMPS VCC (not the "5V" pin, but the "VCC" besides it), make sure to put a (Schottky) diode in series with the wire (stripe towards RAMPS) to avoid conflicts between the two 5V sources.

So I recommend as next you remove the red 5V wire and just put a ground wire from the 5V adapter (resp. splitter) to any of the ground ping of the RAMPS, i.e one of the "-" pins of the servo headers.

(If the relay IN signal really draws 40mA --which remains to be seen-- then you could always use the mosfet output of the second extruder. But this would need some special wiring, since the mosfet switches the ground level.)
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 09, 2015 10:33AM
It worked!!!

I just put the PS_ON, and V5 on the Vcc(without Diode) and the ground wire on one pin of the servos areas(USB connected) and IT WORKED!!!

I was able to send comands M80 and M81 through Pronterface.

But It is neccesary to change in configuration.h the type of PSU, from ATX to X-BOX, because the logic Is not right as you can see:

// Power Signal Control Definitions
// By default use ATX definition
#ifndef POWER_SUPPLY
  #define POWER_SUPPLY 1
#endif
// 1 = ATX
#if (POWER_SUPPLY == 1)
  #define PS_ON_AWAKE  LOW
  #define PS_ON_ASLEEP HIGH
#endif
// 2 = X-Box 360 203W
#if (POWER_SUPPLY == 2)
  #define PS_ON_AWAKE  HIGH
  #define PS_ON_ASLEEP LOW
#endif

About the LCD with the previous setup:

With USB cable the LCD screen, works but with extranges symbols....although It looks to correct itself at some point, but not completely.
Without USB cable on,..It works flawlessly!!! At least in some test I have just done.

I need to try the diode schooty that you suggested,

Could you tell me which direction it should have?

5Vpsu ->| ramps

5Vpsu |<- ramps

Thank you very much for your help.

I think I will add some note on the reprap wiki about this thing.

Thanks a lot
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 09, 2015 10:54AM
I'm glad it worked! smiling smiley smiling smiley

Schottky diode should be 5Vpsu ->| ramps.
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 10, 2015 05:42AM
Hello Enif.

I just want to tell you that the Diode Schotty works as a charm, no problems with the LCD.

Thank you very much for your help.
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 10, 2015 08:51AM
You are welcome! smiling smiley smiling smiley smiling smiley
kr_
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 11, 2015 08:19PM
Quote
Amachete
But It is neccesary to change in configuration.h the type of PSU, from ATX to X-BOX

I did the same way than you. I also uncommented #define PS_DEFAULT_OFF so my printer's power supply doesn't switch on alone after a power shortage. (my 5V comes through the USB port from a Raspberry Pi, I removed the D1 diode on my Ramps)

I'll add M80 at the beginning of my GCodes and M81 at the end.
Re: RAMPS Switch ON/OFF PSU with a relay on PS_ON
March 12, 2015 05:40PM
Hello

As a 5V psu, I used a old phone charger, which supplys 5v 500mA. I did not removed the d1 diode.

As soon as I can I will update the Reprap wiki with some graphics...currently I am trying to create a pcb Fritzing RAMPS, that It does not exist yet.

I will pst when I finish it.
Sorry, only registered users may post in this forum.

Click here to login