Welcome! Log In Create A New Profile

Advanced

Controlling relays from the mosfet for easier/ safer heating

Posted by Ollie 
Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 02:56PM
Okay, so I've had a couple of mosfets go to electronic heaven recently and I was wondering. How easy would it be to control a relay from a mosfet for heating? Putting less power through the transistors, making them less prone to breaking.

So is it even feasible to change the firmware for say, Marlin on ramps?

Just a thought. Ollie
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 03:09PM
That's an easy one Ollie: It is very simple to control a 12V coil relay using a MOSFET.

It may draw 40mA or so, that is almost nothing compared to 2A of your hotend or around 10A of a heated bed.

Just be careful with the wiring of mains power and you will be ok.

misan
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 03:20PM
I'm not too sure what would need to be changed firmware wise tho, if anything. Or am I just over complicating things to an extent where my brain hurts?
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 03:21PM
I use a relay on one of my Prusa's for powering the heated bed. I have a RAMPS v1.2 which doesn't have the high current fuse. It is incredibly easy to wire up a relay, I just used a piece of proto-board I had laying around and a 10A relay (a higher-amperage relay would have been better, but that's what I had on hand and it's worked great for many hours of printing.) I also used some screw terminals that fit the proto-board. The relay is run off of the MOSFET, and no firmware changes are necessary as long as you aren't using PID control. Otherwise, simply turn off PID control for the heated bed, which isn't really necessary anyway.


Help improve the RepRap wiki!
Just click "Edit" in the top-right corner of the page and start typing.
Anyone can edit the wiki!
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 03:24PM
Oops, I forgot about PID. If you absolutely need PID you can look for a solid state relay, but it may cause you some EMI problems, so better stay away if possible.
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 03:33PM
PID control I have never touched on at all, so hopefully it's not on.... winking smiley
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 03:33PM
misan Wrote:
-------------------------------------------------------
> Oops, I forgot about PID. If you absolutely need
> PID you can look for a solid state relay, but it
> may cause you some EMI problems, so better stay
> away if possible.

The bed has a large enough thermal mass compared to it's heating capability that you shouldn't need PID control at all. My heated bed only varies by 1C using bang-bang control.


Help improve the RepRap wiki!
Just click "Edit" in the top-right corner of the page and start typing.
Anyone can edit the wiki!
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 04:04PM
If your mosfets are dying then they are not properly protected, or are overloaded.

How did your mosfets die?


www.Fablicator.com
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 04:09PM
What about using a Thyristor instead of a relay. i.e. keep it solid state.
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 04:21PM
Hi Andrew,

Yeah, they probably are overloaded, hopefully using a relay could possibly help this, they seem to be dying quicker and quicker, ive had like 3 already this month...

I've never heard of Thyristers Keith, any good?


Ollie
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 04:53PM
Ollie - Google and Wikipedia are your friends see [en.wikipedia.org]
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 04:54PM
I like your thinking Keith ^.^
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 05:10PM
For my heated bed, I used one of these...

[www.rapidonline.com]

It has a 360 ohm coil resistance, so you can wire it directly across the mosfet output and it'll only draw a tiny current.

The spec of the relay says it's capable of switching 277v, but I'm using a 12v psu. So it's over specified, but they're cheap enough.

I soldered the relay onto a bit of stripboard - remember to cut the track that lines up with the two coil pins. (actually, if you stuff it into the stripboard forcefully at an angle then you don't need to cut any tracks, but this is bad style and only advisable if you're incredibly lazy and can't find your strip cutter)

Then I connected the 12v direct from the PSU to one side of of the relay switch, the other side of the relay switch to the heated bed, then t'other side of the heated bed directly to PSU ground.

The relay activates with a satisfyingly audible "ting", and when the bed gets to temperature it might get switched rather a lot (sounds kinda like a geiger counter, which is cool) but it's unlikely to last a massive amount of time switching like this. I initially (badly) hacked sprinter to switch the heated bed less often. When I moved to Marlin I didn't bother and just set a wider temperature band, it can flip a bit excessively but tends to settle down once everything has stabilised. It has run for a few months without issues.

I also have some LEDs with current limiting resistors soldered to one leg - I put these across the mosfet outputs so I have some visible indication of what is switching and when.

Cheers,

Doug.
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 05:22PM
Relays and Thyristors are not good for rapid switching. If rapid switching is required then you are better off with a MOSFET device.

See [en.wikipedia.org]

and

[en.wikipedia.org]

Not sure how much these things cost though.

Edited 1 time(s). Last edit at 02/15/2012 05:32PM by KeithSloan.
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 06:01PM
That was a very interesting read Doug, surely rapid switching isnt that necessary? and how wide did you make your temp band? Soldering LEDs to the mosfet outputs is actually a pretty good idea, although my soldering skills in small spaces leaves alot to be desired...

I dunno Keith, I've only tried mosfets in fairness, but its worth a try winking smiley

Ollie

Edited 1 time(s). Last edit at 02/15/2012 06:10PM by Ollie.
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 06:16PM
If your mosfet is overheating, get one with a lower rds on. I have used this one and it stays cool up to 30A without any heat-sink. Relays are a hack in this situation, and there is a legit solution which is less complicated and probably less expensive.

[search.digikey.com]〈=en&site=us&KeyWords=irlb3813

IRLB3813 if you want to find it from a different vendor. The only time it has ever died on me is if I short it out (and doing that with a relay will have similar results)

If you are going to use a relay anyway, you really should use a snubber diode across the coil of the relay. Otherwise you will just blow out the mosfets again from the high voltage spikes when the coil shuts off, even with the relatively low current.

Edited 1 time(s). Last edit at 02/15/2012 06:20PM by Andrew Diehl.


www.Fablicator.com
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 06:18PM
I don't think you need rapid switching for a heated bed - the temperature should be fairly stable particularly with a sheet of glass on top. I've set a tolerance of +/- 2 degrees in firmware.

I'd imagine it much more important to keep the hot end temperature stable.

I guess we're looking at the wrong issue here. The real issue is why the correct device (a mosfet) is failing when it is supposed to be operating well within it's capacity - certainly you shouldn't be seeing the one controlling the hot end failing.

Sticking a relay in there is a brute force and ignorance solution i.e it makes the problem go away rather than solving it.

Hmm, have you got really long wires or something? Get some clip on heat sinks? Stick one of those ferrite cores on it?

Cheers,

Doug.
Re: Controlling relays from the mosfet for easier/ safer heating
February 15, 2012 07:17PM
You should be using a protected MOSFET. A naked MSOFET is very easy to damage with a loose connection, ESD or a short. They are fine in an onboard circuit but not driving external connections without a TVS diode at the very least.

When I remove parts from my bed it often causes a static spark. That could easily destroy a MOSFET. I use a protected one and not had any problems. It is a bit light on current rating so I use a heatsink and I boost the gate drive to 12V to get the lowest RDSon.


[www.hydraraptor.blogspot.com]
rcs
Re: Controlling relays from the mosfet for easier/ safer heating
February 16, 2012 04:37AM
The reason I use a relay (auto 12V 30A with diode) is only to avoid putting the bed current through the tracks on the pc board ramps 1.2.

I don't use any heat sinks then on the MOSFET. Rapid switching in not neaded for the heated bed.
Re: Controlling relays from the mosfet for easier/ safer heating
February 16, 2012 08:23AM
Hmm, okay, so i need a protected mosfet, would one of these do?

http://www.rapidonline.com/Electronic-Components/STP75NF75-Mosfet-T0220-80A-75V-47-5622

http://www.rapidonline.com/Electronic-Components/VNP49N04-Protected-Mosfet-42V-49A-47-0400

If anything, my current setup uses shorter wires than the regular mendel, ill try and find my stash of diodes round here for now though...
Re: Controlling relays from the mosfet for easier/ safer heating
February 16, 2012 08:39AM
The first one isn't protected and the datasheet is incomplete. I think the gate threshold is probably too high for logic drive.

The second one looks good.


[www.hydraraptor.blogspot.com]
Re: Controlling relays from the mosfet for easier/ safer heating
February 16, 2012 08:58AM
ill order the second one then, in surplus, hopefully ill get them tomorrow to get this thing working ^.^
Re: Controlling relays from the mosfet for easier/ safer heating
February 16, 2012 10:34AM
If it's still getting hot, you can always stack them in parallel, too.


www.Fablicator.com
Re: Controlling relays from the mosfet for easier/ safer heating
February 16, 2012 12:30PM
Will do! I ordered a bunch tongue sticking out smiley
Sorry, only registered users may post in this forum.

Click here to login