Welcome! Log In Create A New Profile

Advanced

5V relay activation?

Posted by kd6hq 
5V relay activation?
February 18, 2015 11:30PM
I'm new to the RAMPS 1.4 board and I'm wondering if one of the AUX sets of pins could be used to activate a 5V relay? Currently the 5V relay is used to activate led lights and fans whenever the printer is turned on so they run all the time. I was thinking that it would be nice to only have the motor fans and led's powered on when the printer is printing.

I know it's easier to leave well enough alone, but I'm curious.
Re: 5V relay activation?
February 19, 2015 08:38AM
You'd be pushing the limits. The current required to energize the coil approaches the pin limits to sink/source current. You'd be much better off with a simple mosfet control circuit. They'll operate with less current from the microcontroller while being able to switch much faster if you wanted to use PWM to control brightness or speed. Here is an example but there are other variations available too.
Re: 5V relay activation?
February 19, 2015 12:49PM
I have been running a dual-relay module on my printer for months without problems...

Thingiverse


-David

Find me online at:
Thingiverse
Instructables.com
LinkedIn
Facebook

Check out my FolgerTech Prusa i3 (plexi) at MindRealm.net
Re: 5V relay activation?
February 19, 2015 02:50PM
Quote
MindRealm
I have been running a dual-relay module on my printer for months without problems...

Thingiverse

If you are powering that 5V relay board from the Arduino/RAMPS 5V rail, and relying on the Arduino on-board 5V regulator to produce the 5V supply, then expect the 5V regulator to give up after a while. It will be getting very hot - especially if you ever drive both coils on at the same time - as you will quickly find out if you put your finger on it.

Edited 1 time(s). Last edit at 02/19/2015 02:50PM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: 5V relay activation?
February 19, 2015 04:38PM
From what I understand, the Arduino Mega 2560 max current on the 5v regulator is 500mA.

The relay module shouldn't draw more than 40-50mA, plus a small amount for the LED on the module.

The RAMPS 1.4 uses the Arduino 5v regulator to supply power to the end stops (6 pins), I2C (1 pin), AUX-1 (2 pins), AUX-2 (1 pin), AUX-3/SPI (1 pin), AUX-4 (1 pin) and a selectable output to the SERVOS section (4 pins) when jumpered. I suppose one should consider which of these are going to be utilized before opting to add a 5v relay...

I currently (no pun intended) use the 5v regulator to drive 1 relay coil and one 9g micro servo, both connected to the 5v bus in the SERVOS section, with a jumper on 5V and VCC.

I haven't measured the amperage of these circuits when in use... yet. smiling smiley

Thanks for the info!


-David

Find me online at:
Thingiverse
Instructables.com
LinkedIn
Facebook

Check out my FolgerTech Prusa i3 (plexi) at MindRealm.net
Re: 5V relay activation?
February 19, 2015 06:55PM
Quote
MindRealm
From what I understand, the Arduino Mega 2560 max current on the 5v regulator is 500mA.

The regulator power dissipation is a much more serious limitation than its maximum current. I wouldn't be comfortable dissipating more than about 1W in the regulator, given that the only cooling it has is a fairly small area of PCB. Even at 1W, it will be too hot to touch for more than a few seconds. At 12V input, after allowing for 0.8V drop in the series diode, you will get 1W dissipation at a total load current of 1000/(12 - 5 - 0.8) = 161mA. The Arduino Mega and RAMPS by themselves take just under 90mA, That leaves you about 70mA for LCD displays, relays etc. before the regulator gets too hot.

It is because of the power dissipation in the regulator that the Arduino folks recommend an input of no more than 12V, even though the components are rated to at least 20V. In fact, an Arduino/RAMPS with no other load on the 5V rail will run happily at up to 15V input (no higher, because the capacitors on the RAMPS are often rated at only 16V).



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: 5V relay activation?
February 19, 2015 07:38PM
There doesnt seem to be any link to that relay module, but there are chips on it.. I suspect its opticaly isolated or otherwise protected.

Ie coils are not directly on the IO pin.
Re: 5V relay activation?
February 19, 2015 07:55PM
Quote
Dust
There doesnt seem to be any link to that relay module, but there are chips on it.. I suspect its opticaly isolated or otherwise protected.

Ie coils are not directly on the IO pin.

I'm sure the coils are not directly on the I/O pins; but that's not the issue. The issue is the current taken from the 5V supply to energise the relay coils, and the resulting increase in power dissipation in the voltage regulator.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: 5V relay activation?
February 20, 2015 01:44AM
Turns out I guess someone else thought about it a long time ago.
Look at M355
[reprap.org]

I'm guessing it's for CNC.........

Edited 2 time(s). Last edit at 02/20/2015 02:38AM by kd6hq.
Re: 5V relay activation?
February 20, 2015 10:50AM
Quote
MindRealm
The relay module shouldn't draw more than 40-50mA, plus a small amount for the LED on the module.
The spec sheet for the Songle 5V relay that is most often found on those boards says that the relay coil has a nominal current draw of 89.3 mA which, at 5 volts, comes out to about .45 watts (which is also stated). Now what they state and what it actually draws can be two different things. But your module may not be the same as someone else's module either.
Re: 5V relay activation?
February 20, 2015 04:23PM
Thank you everyone.

All in all it sounds like it is more trouble than it's worth.
Right now I just turn everything on with a switch. Just means that some
of the fans and lights run all the time, no big deal I just figured if it was
possible why not!

thanks again
Re: 5V relay activation?
February 20, 2015 04:57PM
Quote
kd6hq
Thank you everyone.

All in all it sounds like it is more trouble than it's worth.
Right now I just turn everything on with a switch. Just means that some
of the fans and lights run all the time, no big deal I just figured if it was
possible why not!

thanks again

If the fans and lights are powered from the same 12V supply as the rest of the printer, then you don't need a relay. You can use a mosfet instead, which would avoid dissipating extra power in the 5V regulator. Alternatively, use a 12V relay board (with a 5V control signal) instead of a 5V relay board.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: 5V relay activation?
February 20, 2015 07:33PM
Hi dc42

Ok here is what's going on.

Currently I have a Printrbot that has been modified to have a 10" x 10" x 10" print area.
It works great for larger objects but when switching to some small it has a little problem.
The accuracy could be better.
So I'm replacing the Printrboard with the RAMPS 1.4 setup.
Currently the electronics sit in a box at the end of the printer.
This box has the following stuff in it.
1. Cooling fan
1. Printrboard
1. Bread board.
3. Relays, one for the bread board, one for heated bed and one for Printrboard.
2. Switches, one unused.
3. Fuse holders

The breadboard consists of the following:
10 3 pin connectors - used for fans and lights
3 fuses 1) for heated bed, fused at 20A.
1) for 3 pin connectors, fused at 3A.
1) for Printrboard, fused at 10A.

This is all fed by a 12V 70A power supply.
The switch is hot as soon as the power supply is turned on.
The switch activates 2 12V 10A relays, Print board and breadboard.

I just thought it would be fun to turn the fans and lights on only when printing.
For now since it works as is, I think I will leave it for now and continue with replacing the Printrboard, the perhaps later.

When I'm done I will build another, smaller printer setup for small prints.

I see you reference the PanelDue touch-screen, that looks interesting.

thanks
Sorry, only registered users may post in this forum.

Click here to login