Welcome! Log In Create A New Profile

Advanced

Running heated bed with relay?

Posted by flying freak 
Running heated bed with relay?
January 29, 2013 12:34PM
Has anyone ever run a 24 v heated bed through a relay?

What id like to do is run the ramps 1.4 at 12v everything setup as normal but instead of connecting the ramps directly to the heated bed it would be connected to a relay the relay would controle the power to the bed.

Am I correct in assuming that the heated bed output is a simple on off signal?

Steven
Re: Running heated bed with relay?
January 29, 2013 03:42PM
It should be fine to run the power to a heated bed through a relay designed to interrupt the operating voltage (12 Volts in your case?) and the current. The heated bed "signal" is typically pulse width modulated i.e. the signal has two states....ground (zero volts) and 12 volts...the pulsing taking place at some frequency high enough so that the thermal mass of the bed averages out the achieved temperature. I use a relay in series with the bed heat as a safety measurement driven by an independent circuit that senses overtemperature or open circuit on the sense thermistor. To be clear, the relay is certainly not a practical way to achieve the pulse width modulation (mosFET is the way to go) due to the enormous number and speed of the switching required but is fine to apply or remove power.
Re: Running heated bed with relay?
January 29, 2013 03:54PM
I realized after I posted my response that I was limiting my thinking in terms of something like a PID controlled bed (where you want a close approximation of linear power control) as opposed something like a bang-bang controller. If the switch rate is not extreme, I would think a bang-bang controller (like a room thermostat) with a reasonable on-off hysteresis temp range could be implemented using a relay as the switching element.
Re: Running heated bed with relay?
January 29, 2013 05:25PM
Mars;

I think youve managed to confuse me more.

How does the ramps board work? I was under the impression that it simply cycled on and off every few seconds/ few minutes.

What i was planning to do was to connect the coil side of the relay to D08 on the ramps 1.4. The relay would be set up to be in a NO configuration. When D08output would be ~12V the relay would close connecting the 24v power supply to the heated bed.

Will this work? If not do you have any suggestion how to run a 24V bed without having to mode the ramps board?
Re: Running heated bed with relay?
January 29, 2013 06:31PM
The heated bed has a separate pwr in for the heated bed, you should be able to just run the 24v through the ramps without a relay.
I do the oposite, I run 24V for steppers etc. and 12V for heated bed without relays or problems.
Re: Running heated bed with relay?
January 29, 2013 07:32PM
Gulf:

So I could attach the 24v in to the 11 amp side of the ramps board and not need anything else? The ramps would not need a modified diod or any other changes?

this could be a great solution.
Re: Running heated bed with relay?
January 29, 2013 07:38PM
I believe so, I thought that was one of the benefits to the ramps 1.4.
Re: Running heated bed with relay?
January 29, 2013 07:43PM
Sorry...I can see how I confused you. I didn't read your original question carefully. I *think* I now understand what you are asking. I just checked out the RAMPS 1.4 schematic with the hope I can offer a better discussion.

Your plan hinges on the nature of the heater bed control methodology. I looks like the RAMPS board (the hardware) can support what I called a bang-bang control...heat for some period of time while monitoring the temperature, when it hits the target, turn off the heat, monitor until the temp goes below the low threshold, then turn on and repeat.

Given a reasonable thermal mass and on and off threshold a few degrees apart, the switching would be a fairly low rep rate (multiple seconds between on and off) and then your idea of having the board drive via its on board FET and external relay sounds OK. It is really a function of what firmware is on the board (I think the RAMPS supports a number of different firmware choices...which one are you running?) and that the firmware is capable of and set to this bang-bang control.

If, on the other hand, you want more precise control and the firmware is capable of and is set to PID (Proportional-Integral-Derivative) control, then the FET is being switched at pulse rates that are very probably not supportable by a relay.

I think while PID is the way to go for the extrude heater, it may not be as important for the bed (comments?) where bang-bang may be more than adequate.

You might consider off-boarding an FET circuit to handle the 24 volts to the bed heater and use the 12 volt heater signal to drive the gate of the FET (being careful to pick an FET with proper specs to handle this drive and output voltage and current). Given an appropriate external FET, I would think it would support both bang-bang control (like a relay) and potentially PID as well off of the 24V bed supply.
Re: Running heated bed with relay?
January 29, 2013 08:26PM
mars bonfire Wrote:

> I think while PID is the way to go for the extrude
> heater, it may not be as important for the bed
> (comments?) where bang-bang may be more than
> adequate.

PID for the bed works quite nicely.

>
> You might consider off-boarding an FET circuit to
> handle the 24 volts to the bed heater and use the
> 12 volt heater signal to drive the gate of the FET
> (being careful to pick an FET with proper specs to
> handle this drive and output voltage and current).
> Given an appropriate external FET, I would think
> it would support both bang-bang control (like a
> relay) and potentially PID as well off of the 24V
> bed supply.

First, watch this.

You want to avoid a relay if you ever intend to use PID - a PID signal will destroy a mechanical relay pretty quickly.

So you need a MOSFET... Can you read a circuit schematic?


- akhlut

Just remember - Iterate, Iterate, Iterate!

[myhomelessmind.blogspot.com]
Re: Running heated bed with relay?
January 29, 2013 09:35PM
Il have to review all of these options. Seems like my original thought of simply using a relay wont work. To be honest Im not familair with electrical diagrams.

But by the sound of it if i can simply wire the 24v directly into the 11Amp in and not have to modify anything id love that. It would be simple.
Re: Running heated bed with relay?
January 30, 2013 01:55AM
You're transistor tutorial video link was very helpful.

So this set up will have One 12v Power supply, one 24v Power supply.

The 12V will power the Ramps 1.4, and from the ramps the D8 positive power wire that would normally go to the heated bed, will now work as a signal wire going to the transistor's "Gate".

The power coming from the 24v will send positive to the + side of the heated bed, and from the - side the wire will go to the transistors "Drain" pin. Then from the "Source" Pin on the transistor run a wire back to the ground(-) on the 24v Power supply.

Does this sound right?

Where would the (-) cable from terminal D8 go to in this setup?
And what sort of Wire/transistor size combination would be sufficient to handle the 24V power supplies current flowing to the heated bed?



akhlut Wrote:
-------------------------------------------------------
> mars bonfire Wrote:
>
> > I think while PID is the way to go for the
> extrude
> > heater, it may not be as important for the bed
> > (comments?) where bang-bang may be more than
> > adequate.
>
> PID for the bed works quite nicely.
>
> >
> > You might consider off-boarding an FET circuit
> to
> > handle the 24 volts to the bed heater and use
> the
> > 12 volt heater signal to drive the gate of the
> FET
> > (being careful to pick an FET with proper specs
> to
> > handle this drive and output voltage and
> current).
> > Given an appropriate external FET, I would
> think
> > it would support both bang-bang control (like a
> > relay) and potentially PID as well off of the
> 24V
> > bed supply.
>
> First, watch this.
>
> You want to avoid a relay if you ever intend to
> use PID - a PID signal will destroy a mechanical
> relay pretty quickly.
>
> So you need a MOSFET... Can you read a circuit
> schematic?
Re: Running heated bed with relay?
January 30, 2013 05:57AM
Just to confuse you guys more: it's possible to do PID with Bang Bang.

PID is a method to react to temperature deviations.

Bang Bang is a method to run a device, to turn it either full on or full off. Bang Bang competes with PWM, not PID.

PWM turns on a device on and off repidly, like 100 or 1000 times a second to achieve something like a 20% or 50% on state. PWM is incompatible with slow switches.

If you want to run the bed on a different voltage than the extruder heater, you can use a fast external switch, driven directly by some spare pin on the RAMPS. Like the SevenSwitch or something similar. Sorry for the self-advertising, currently I don't know other external switches in the RepRap area.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Running heated bed with relay?
January 30, 2013 01:00PM
A couple of comments. If you off board a FET using the existing on board FET as a driver, take care about inversion of the signal. This can be handled in the off board driver circuit or by hacking the firmware. Or, as pointed out, drive the off-board using one of the unused pins on the Arduino (good idea, IMHO).

At least in this neck of the woods (and based on a brief search of the web), bang bang is considered a control method as is PID. And, at least in my experience, PWM is a method to approximate continuous varability of a current or voltage as is full linear "class A" amplifier design (suffers from inefficiency) and other "classes" of power control.

[www.pc-control.co.uk]
Re: Running heated bed with relay?
January 30, 2013 03:35PM
Use a solid state relay. That's what I am using. It can handle many quick on/off cycles with no issues at all.
Re: Running heated bed with relay?
January 31, 2013 12:04AM
tmorris9 Wrote:
-------------------------------------------------------
> Use a solid state relay. That's what I am using.
> It can handle many quick on/off cycles with no
> issues at all.


That seems like it might work iv seen it in mentioned in the heated beds wiki and just found this thread : [forums.reprap.org]


We will probably try the solid stat relay first - Did you modify anything in the firmware?
Re: Running heated bed with relay?
January 31, 2013 06:01AM
Quote

Use a solid state relay. That's what I am using. It can handle many quick on/off cycles with no issues at all.

Depends on what you consider to be "quick". Solid state relays can switch only as fast as the mains frequency (50/60 Hz). ATmega's PWM starts at 61 Hz and goes up to 65 kHz (on 16 MHz electronics, faster on 20 MHz ones).


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Running heated bed with relay?
January 31, 2013 09:48AM
On my system (roll my own electronics with an Arduino Mega 2560 core), I worried about the drive capability of the Arduino being up to the task of switching the power FET to the point where I decided to spend a few bucks and design in a low end driver chip (microChip part...can't remember the part number off hand...1.5 amps gate drive) to make sure I switched the FET in a snappy fashion to minimize power dissipation on the FET. Probably not needed but I didn't want to think about it any more.

I also would be concerned about using a solid state relay in terms of swtiching speed in a PWM system...my impression is that they are not designed to switch fast enough for typical PWM rates...checking a data sheet would tell the story.
Re: Running heated bed with relay?
January 31, 2013 11:43AM
Am I correct in assuming that the heated bed output is a simple on off signal?

It's not a "simple" on/off signal unless bang-bang is chosen.

If PID, the method uses PWM to simulate a continuous function. (PWM essentially converts a time-domain signal into an amplitude-domain signal via either engineered or parasitic circuit capacitance and inductance.

For bang bang, almost any relay can be used, as long as characteristics (voltage and current) are sufficient for the task.

For PID via PWM, it needs to be able to switch very fast, well above that of the PWM signal, since losses (and thus heat generation in the relay) are generally associated with the transitional state.

Has anyone ever run a 24 v heated bed through a relay?

Yes. although not specifically at 24VDC, I have, and I have used SSRs for other PID loads as well, including hot wire ignitors, solenoids, and hydraulic servos
Re: Running heated bed with relay?
January 31, 2013 01:11PM
Imo, use of relays is for isolation of the two circuits, e.g. run the bed from a different source with different ground, including AC current, for ssr example with minimal switch noise via zero crossing detection.

If you want the isolation, then you have to use some relay. Otherwise if you use same psu for both, i dont see the point to do it: you just loose pwm capability versus no benefit but a higher cost (ssr) or lesser reliability (e-mag relay). What would be the gain?
Re: Running heated bed with relay?
January 31, 2013 03:40PM
In a word, no. Isolation is only one of many reasons one might employ a relay, but it is neither "the" reason, nor is using a relay a guarantor that isolation will be achieved. Nor is the use of a relay a guarantor that "you lose PWM capability".
Re: Running heated bed with relay?
January 31, 2013 04:20PM
>>> Did you modify anything in the firmware?

Since I am currently running a Gen 6 board it's not capable of running the heated bed so I am using a $35 separate PID controller off ebay.
Re: Running heated bed with relay?
January 31, 2013 04:22PM
Traumflug Wrote:
-------------------------------------------------------
> Use a solid state relay. That's what I am using.
> It can handle many quick on/off cycles with no
> issues at all.
>
> Depends on what you consider to be "quick". Solid
> state relays can switch only as fast as the mains
> frequency (50/60 Hz). ATmega's PWM starts at 61 Hz
> and goes up to 65 kHz (on 16 MHz electronics,
> faster on 20 MHz ones).

Very true, in my situation, very quick is a few times a second. Mine is actually set up so it only changes up to every 1 seconds. It have been keeping the bed within +/- 2c for me ever since and that's good enough for me. This is what Xiando is calling Bang Bang. I say it's on off.

I use to control large electric ovens this way and they worked fine for many years. I have done this with inexpensive PID controllers several times. It's quick, easy and not very expensive but it's not connected to the board so no computer control.

Edited 1 time(s). Last edit at 01/31/2013 04:27PM by tmorris9.
Re: Running heated bed with relay?
January 31, 2013 05:18PM
Correct. on/off IS "bang-bang".

It simply checks the threshold periodically. on each iteration, it checks the sense value. If the sense value is lower than lower threshold, it turns on the source. if it is above the upper threshold, it turns it back off. Pretty much the simplest form of control. And probably more than sufficient for the heated bed in most cases.

I would not be inclined to use it for the extrusion heater though, due to losses to the extruded material, unless the head is of sufficient thermal mass, and even then I'd personally be hard pressed to use bang bang, since the control loop speed for bang bang is *usually far too slow for effective control of more "delicate" processes.

Edited 1 time(s). Last edit at 01/31/2013 05:21PM by xiando.
Re: Running heated bed with relay?
January 31, 2013 05:37PM
I use a 12V Bosch automotive relay between my Azteeg X3, a 12V30A powersupply and 2 pcb styled 8x12in heated build plates.
I have a 22x18inch glass plate under them and a slightly smaller glass plate on top of the HBPs.
works like a charm.
doesn't flicker the relay, just switches it on or off, as needed. once every 10 or so minutes after reaching temp.

My build plate sandwich maintains temp well, so it doesn't cycle quickly. I drape shop towels on top to keep the heat
because of my cold garage.

I am using the Marlin firmware, no mods to the PID, and an Epcos 100k thermister.

Edit: that part is 346mm long and measured 0.6% (2mm short).

Dave

Edited 1 time(s). Last edit at 01/31/2013 11:35PM by davew_tx.
Attachments:
open | download - hbp.jpg (168.8 KB)
Re: Running heated bed with relay?
February 01, 2013 05:37AM
xiando Wrote:
-------------------------------------------------------
> In a word, no. Isolation is only one of many
> reasons one might employ a relay, but it is
> neither "the" reason, nor is using a relay a
> guarantor that isolation will be achieved. Nor is
> the use of a relay a guarantor that "you lose PWM
> capability".

Lets think it through together with more than just a single word. I take isolation in electronics as galvanic isolation, an abstract concept. Not like isolation in electrical sense. For example i know circuit isolation in AC being done with a isolation transformer and for DC with a relay. I am pretty sure that both SSR and electromagnetic relay do in fact provide circuit isolation. No debate about this. SSR is an optocoupler with a switching semiconductor device. Electromechanical relays isolate coz their action passes through em field. If you pass information from one circuit to another, one relay will pass it as em field, the other will pass information as light. Whatever else you want to construct probably will end up like one or the other.

Electricity can interact with environment and back, through what it can produce easily: light, em field, and heat. So one could construct a relay based on heat transfer, like a power resistor with a thermocouple, and it would be galvanic isolated, but not really dependable device - so we dont get integrated devices like that "heat relays". The big question is, how else can you make two DC circuits to be 100% isolated and still working together? Without em and light or heat? Coz if you cant get any other than it means relays both are "the" reason and the way to go for DC galvanic isolation and vice versa.

About pwm, that capability drops from potentially 60kHz to 60Hz, thats 1000 times loss. And the note is that 60Khz is the limit in our case, only coz thats what our arduinos can put up. A good smps IC nowadays switches its fet in range of 500kHz and very good ones at 1-2Mhz (they go high frecv to require lower caps). And fets can go way more than that coz they get limited only by speed of light and the capability to disipate its losses - dissipating its heat. Actually as i type this, in the computer processor are some few billion fets which switch in domain of Gigahertz. And manufacturers would make processors in Terahertz range only if their heat could be dissipated at that level, thats their issue. Besides this big picture, in our little context yes perhaps one can still pwm their relay at 60Hz, i admit i should of phrased it from fets to relay we "loose 99.(9)% of pwm capability", but well thats just being picky. The only way to not have a significant loss in terms of pwm capability is to construct yourself a ssr with an optocuplor IC that is for data transfer purposes and can transfer at like 1Mhz, and use it to engage a semiconductor with it, basically a customized ssr, for high freq and dc only.

Edited 2 time(s). Last edit at 02/01/2013 06:00AM by NoobMan.
VDX
Re: Running heated bed with relay?
February 01, 2013 06:02AM
... have an 'acoustic relay' modulating the laser-energy (->AOM) - essentially a glass block with PZT-actuators injecting sonic waves that change the refraction properties of the glass with up to 40 MHz bandwith winking smiley

The biggest problem with mechanical relays and higher currrents is the short lifetime (or cycles counts) of the switching connectors - most common they will fuse permanently sometimes, so even when you switch off the controlling current, the power to the device won't be cut ... this is often the case in older ovens, so better ones have separate powerline-cuttoffs activated by overheating ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Running heated bed with relay?
February 01, 2013 06:19AM
Wow now thats quite interesting device which i didnt knew before. Thanks for that, cheers smileys with beer
I think its this one? What is it used for &in?

Edited 1 time(s). Last edit at 02/01/2013 06:23AM by NoobMan.
Re: Running heated bed with relay?
February 01, 2013 06:57AM
One application was in wide band receivers for electronic warfare.
VDX
Re: Running heated bed with relay?
February 01, 2013 07:29AM
... for multispectral show-lasers AOM's are used to define the actual colour, as only this is deflected to the emitter.

I'm using this for modulating a 50Watts-IR-laser - with the AOM OFF the beam passes the glass block straight and is absorbed by a cooler, when ON, the beam is deflected by a small angle and 'escapes' to the application grinning smiley


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Running heated bed with relay?
February 01, 2013 05:54PM
You guys took "going off on a tangent" to a whole new level :p

So an SSR would do it?

Other than that, the transistor/MOSFET idea wouldn't work better for a pwn signal or a rapid on/off?

All this stuff is new to me for my first printer, just wish there were some A-Z guides to run all 24v, or 12v for ramps and steppers and a 24v for the heated bed only.
Sorry, only registered users may post in this forum.

Click here to login