what kind of filtering (if any) should a mains connected heater controller have? - Page 1
Forum section: electronics / projects

author: SArepairman
author_rank: Frequent Contributor
timestamp: September 02, 2014, 07:42:02 am
content: I intend to control a heating element by using low frequency high res PWM (~200Hz) into a NMOS transistor.Mains -> fuse -> Rectifier -> Capacitors -> Mosfet -> heater (resistive)Should this setup have some kind of filter prior to the rectifier? Not exactly a switch mode supply.

author: Whales
author_rank: Super Contributor
timestamp: September 02, 2014, 07:50:33 am
content: If you're oscillating the power draw, it's a switch mode supplyie the same problems with noise over the power lines will exist.Is this for personal use? Most modern electronics are very resilient to line noise and you might be fine. YMMV, and you might have legal requirements on noise to meet (esp if you live in a shared building).

author: Phoenix
author_rank: Frequent Contributor
timestamp: September 02, 2014, 08:28:54 am
content: What power level are we talking here, I assume it's considerable if it's a heating element? There may also be better options for topology if the load is non-polar.

author: tszaboo
author_rank: Super Contributor
timestamp: September 02, 2014, 08:52:55 am
content: Why would you rectify mains? Why would you heat with PWM? Just use a triac and a bimetal.

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: September 02, 2014, 09:32:50 am
content: Quote from: SArepairman on September 02, 2014, 07:42:02 amhttp://www.ebay.com/itm/350897868118?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: September 02, 2014, 09:34:07 am
content: Quote from: NANDBlog on September 02, 2014, 08:52:55 am"and"? Can you explain that please?

author: Whales
author_rank: Super Contributor
timestamp: September 02, 2014, 09:47:42 am
content: TRIACS are silicon switches that happily switch AC. You can send the PWM to that and skip the whole rectification stage.Do you need to sync these to the waveforms to be effective, or is that optional?

author: tszaboo
author_rank: Super Contributor
timestamp: September 02, 2014, 10:00:38 am
content: Quote from: Alex Eisenhut on September 02, 2014, 09:34:07 amYes, the sentence could have been "triac or a bimetal". But I prefer not sending high currents through the bimetal. After seeing cheap heaters making scary sparks every few minutes, I prefer solid state mains switching.

author: David Hess
author_rank: Super Contributor
timestamp: September 02, 2014, 12:44:53 pm
content: The off-line heaters I have seen in the past used a triac and optically isolated zero crossing driver with pulse modulation synchronized to the AC line.

author: eneuro
author_rank: Super Contributor
timestamp: September 02, 2014, 01:33:40 pm
content: Full bridge rectifier loses at 10A to get 2.3kW at 230VAC without ideal bridge drivers might require fan to cool things down, but maybe you plan use fan to improove heating anyway, so it will not be a problem.If I wanted lower power loses for some reason in driver circuit I would consider AC mosfets (a few in pararell to lower its series RDSON) switch with current sensor to be able make zero crossing group driving of this heater-mains current sensing and switch on/off in current minimum for a desired number of full 50Hz periods 20ms each.

author: Niklas
author_rank: Frequent Contributor
timestamp: September 02, 2014, 04:21:10 pm
content: Is this a one of or something that will be produced in volume? Heating of for instance water is quite slow even with a 3 kW (13 A @ 230 Vac) element. Is there really a need for that high frequency PWM or can you slow it down? We used a 3 kW heater for a jacuzzi filled with 300 liters of water and had to slow down to approx. 1 switching per minute to comply with the CE standard for flicker. That solution used a BTA25-600B power triac from ST that we bolted to the seating plate of the heating element for cooling purposes. Even with a MOC3063 zero cross detection optocoupler, a 3.3 uF X2 cap was needed between L and N to suppress emission. A snubber network of 100nF X2 cap + 330 ohms resistor was also used.

author: SArepairman
author_rank: Frequent Contributor
timestamp: September 02, 2014, 05:28:47 pm
content: I thought a triac had to switch at zero crossing. I wanted very fine adjust ability of ramp rate on a high voltage heater (400W)Like, 400 watts, 0.1c / 10 min, relatively linearly, small thermal load (no more then a few hundred grams, well insulated)If a triac can manage to heat something from 351 to 351.4 degrees c over a long time then it may be a good choice.I just figured a PWM would be the best way to do it.*i don't care about a set point. I just want it to move up slowly. the idea is a temperature sweep, not a temperature hold.

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: September 02, 2014, 05:43:20 pm
content: Quote from: SArepairman on September 02, 2014, 05:28:47 pmhttp://www.ebay.com/itm/220888955443?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AITDon't know if it can do the ramp up, maybe it can be controlled from outside but just for the temperature display and SSR it's fun.

author: SArepairman
author_rank: Frequent Contributor
timestamp: September 02, 2014, 05:49:35 pm
content: Quote from: Alex Eisenhut on September 02, 2014, 05:43:20 pmno ebay solution please, its part of a system

author: IuriC
author_rank: Contributor
timestamp: September 02, 2014, 05:58:03 pm
content: I have an air heating system using a TRIAC and opto isolator, I can set temperature with at least 1ºC step.Maybe it can be done too. It will rely on your feedback sensor and control algorithm.

author: ajb
author_rank: Super Contributor
timestamp: September 02, 2014, 06:24:36 pm
content: Quote from: SArepairman on September 02, 2014, 05:28:47 pmOnce switched on, the triac will continue to conduct until the current falls to zero, so with a resistive load it always switchesoffat zero crossing. You can switch it on wherever you like in the waveform, with the caveat that switching on near peak voltage with a resistive load will lead to large inrush currents and possibly significant acoustic/electrical noise. A large choke in series with the load would likely be in order if you need the ability to switch anywhere in the waveform.

author: SeanB
author_rank: Super Contributor
timestamp: September 02, 2014, 06:33:53 pm
content: Would not bother smoothing it, just use a mains filter and rectifier, then control the unsmoothed DC with the switch of choice. If the heater is 400W and your load is 100g then you probably will need to use PWM and PID as well, as you will definitely have overshoot with a low mass system and such a high power input. Using a SCR probably would lead to overshoot, so use a high voltage MOSFET and PWM to do the control, trating the incoming as if it is DC. You probably would want a 4u7 400VAC class X capacitor in the input filter as well before the bridge rectifier to handle the noise.

author: David Hess
author_rank: Super Contributor
timestamp: September 02, 2014, 06:48:24 pm
content: Quote from: SeanB on September 02, 2014, 06:33:53 pmHow much overshoot can you possibly get in a large heater using an SCR or TRIAC when it will shutoff in a maximum of 1/50th or 1/60th of a second? Or half of that time if you allow half cycles.

author: SArepairman
author_rank: Frequent Contributor
timestamp: September 02, 2014, 06:57:43 pm
content: Yea, I guess the filter cap is kinda silly with a resistive heater.So mains -> fuse -> filter -> rectifier -> 16 bit pwm mos @ 200Hz -> heateragain, I would like 0.1C rise over the passing of minutes.I wanted it to rise much slower then last digit of my thermometer can measure, which is 0.01Cso, this filter, 4.7uF? Common mode choke too?

author: SeanB
author_rank: Super Contributor
timestamp: September 02, 2014, 07:02:58 pm
content: Quote from: David Hess on September 02, 2014, 06:48:24 pmDepends on thermal lag, and just what degree of control you want. For 5C variation it does not matter, but if you want like the OP a 0.1c max variation then you really do want to control the amount of energy you put in to a very fine level.

author: SArepairman
author_rank: Frequent Contributor
timestamp: September 02, 2014, 07:04:28 pm
content: how about 0.001c overshoot. 0.1c is butcheryagain, super slow thermal sweep .I need a slow sweep so the thing I am measuring will equalize in temperature with a thermometer.chokes? y capacitors too?

author: SeanB
author_rank: Super Contributor
timestamp: September 02, 2014, 07:18:50 pm
content: The whole enchilada of input filter before the bridge, and preferably a large common mode choke and even a line reactor as well to control the impedance of the supply. You will be making a lot of mains noise down the line and preferably you want to reduce it a little.Though if you are wanting high resolution you probably will have to use a linear amplifier to drive the heater, or use a 1kHz or higher PWM on the drive side.

author: SArepairman
author_rank: Frequent Contributor
timestamp: September 02, 2014, 07:32:00 pm
content: why the need for a higher frequency PWM?

author: SArepairman
author_rank: Frequent Contributor
timestamp: September 02, 2014, 08:40:28 pm
content: oh, do you think a sag of temperature will happen in the down time of 200Hz cycle?Can anyone help me do basic thermodynamic calculations to figure out how many bits of resolution I need for PWM control to maintain a certain temperature? Point me in the right direction?Like, a 16 bit PWM @ 1KHz would require external PWM hardware. I figure a double 16bit MDAC, one to generate a triangle wave and one to generate a DC output, fed into a comparator to make a variable duty cycle wave ?this way 1 reference and common IC, so there should be no drift of duty cycle with temperature.At low frequencies or less bits I can use the PWM feature of a dspic.

author: ajb
author_rank: Super Contributor
timestamp: September 03, 2014, 01:32:43 am
content: To at least get in the ballpark, you should look for thermal resistivity figures for the materials your setup will be fabricated from. Thermal resistivity combined with the geometry should give you a thermal resistance (just like electrical resistivity+geometry=electrical resistance). The complexity of the resistivity to resistance conversions will depend on the geometry of your parts and how accurate you want to be. Once you have thermal resistance values you can roughly calculate the rate of heat flow through your insulation--in other words, how quickly you lose energy. This is directly equal to the amount of energy you'll have to put into the system to maintain a given temperature. If you find the specific heat for the various parts of your system, you should be able to figure out roughly how much energy is stored in the system at a given temperature. Combine that with your aggregate thermal resistance and you've got the thermal equivalent of an RC circuit, and should be able to figure the temperature decline with no heat input as you would plot the discharge of a capacitor. You can also calculate how the temperature will change as you put more or less energy into the system.Of course the devil is in the details, and the validity of any modelling you do will depend on how well you capture those details. Things like convection in any air spaces in the setup can have substantial effects, for instance. The simpler solution may be to get someone to model it in SolidWorks for you.

author: SArepairman
author_rank: Frequent Contributor
timestamp: September 03, 2014, 01:53:05 am
content: I have access to the full version of solidworks but I have never played with it much. maybe its time.

author: Phoenix
author_rank: Frequent Contributor
timestamp: September 03, 2014, 02:11:57 am
content: Do you really need 16bit PWM? For a 340Vdc input (approximate rectified mains) that's a resolution of 5mV (340/65536). The incoming mains or your rectified DC is going to fluctuate far more than that over one period.

author: qno
author_rank: Frequent Contributor
timestamp: September 03, 2014, 09:08:25 am
content: You want to control the energy the heater is making.Energy is Power x TimeYou can either control time or power.If you want to control the power you need a lot of hardware.If you want to control time you need an on off switch.To heat 1 qubic meter of air on degree Kelvin or Celcius you need 710 J.

author: SArepairman
author_rank: Frequent Contributor
timestamp: September 03, 2014, 09:37:26 pm
content: so how should I go about designing this filter, if I need the whole enchilada?

author: qno
author_rank: Frequent Contributor
timestamp: September 04, 2014, 06:55:35 am
content: Usually a fliter for switching on ohmic loads is not required.There are no inductive spikes to filter on a pure resistive load.If you use a relais for control you might need a small capacitor to filter sparks.If your controller switches on or off every few seconds a small spike is allowed.

author: Niklas
author_rank: Frequent Contributor
timestamp: September 04, 2014, 07:10:27 am
content: Switching a few times per second or minute is probably seen as a repetitive action. Compare to a thermostat with a more random switching. Flicker rules might apply, both time and current counts. Also consider the rectified current waveform. Typically not sinusoidal and with peaks

author: salbayeng
author_rank: Frequent Contributor
timestamp: September 04, 2014, 08:17:44 am
content: I'm not 100% convinced you have a good grasp of the physics of thermal time delays, for example a 400w lightbulb has the smallest thermal inertia I can think of , and a bulb this big has negligible 100Hz flicker when operated on mains AC.Thermal diffusivityhttp://en.wikipedia.org/wiki/Thermal_diffusivityis what smooths out temperature variations as a thermal pulse propagates through a medium.If you put your hand in at one end of a half-full bath, while someone else turns a hot tap on and off at the other end, all you feel is a gradual increase in temperature , there is no "negative slope" .The 100Hz pulsations of the mains would still come through and dominate over any 400Hz pulsations.Realistic reasons to use PWM on a (large) heater would be to reduce thermal fatigue or minimise buzzing noise (due to Lorentz forces) , and typically 1kHz would be used.Getting back to your original filter anyway, I would just use an off the shelf 6A 250v mains filter.If you really wanted to build your own , then something with typically 1mH to 5mH inductors on each phase and maybe 1uF X class cap across the line on input and output, and maybe 1000pF Y class to gnd on both input lines, It would cost more to procure these parts than buying an off the shelf filter.

author: SArepairman
author_rank: Frequent Contributor
timestamp: September 04, 2014, 05:33:00 pm
content: I got plenty of those filters around. But I did notice there are like 50 varieties of mains filters to choose from.What do you suggest? Also, the PIC I am going to use can do 16 bit PWM @ 1KHz by default.I figured if its only a 100 grams of metal @ 400 degrees C it might cool a bit, but I don't know, I guess I would need to do the drain gain calculation but I am not sure how.And a light bulb element is in a vacuum, I am not sure how that effects the rate of heat loss. I have a bare light bulb, it's too bright for me to notice any flicker. Maybe I will try with a welders mask, but I know that if its visible then it has to be changing by quite a bit (after all going from white to red hot is not a fine line) I wonder if I can measure it by connecting a photodiode/resistor to a oscilloscope, the change in temperature of a light bulb should be determinable from some equations

author: eneuro
author_rank: Super Contributor
timestamp: September 04, 2014, 06:17:17 pm
content: Quote from: SArepairman on September 02, 2014, 05:28:47 pmResistive 400W @ 230VAC means about 1.7A < 2A current, so easy task for triac or... AC mosfets switch with mains current & voltage sensing.Why AC mosfets switch not triac... because of AC mosfets switch can be turned ON/OFF when I want, while triac or thyristor when current drops to some level.So It looks like very easy task to limit this output power to very low levels when you have mains current & voltage sensing while you can estimate in MCU power consumed for heating and you are able to triger switching ON this AC mosfets switch at the end of 10ms half perdiod in the case of 50Hz 230VAC mains, so I do not think that any PWM is needed to controll this heater, but simply monitor mains current & voltage and input only required amount of power by adjusting phase when in each 10ms period AC mosfets switch is turned ON/OFF.I sucessfully used before custom light dimmer (but classic with diac only higher current rating of used BTA triac) to limit heat power of 2kW 230VAC 50Hz oil heater, but in recent spot welder project I will test also this AC mosfets switch with mains monitoring aproach too, while it does not require any rectifiers and by putting many mosfets in pararell I can get better RDSON than with triac I hope.I think you could simply use:mains-fuse-filter-current&volatge_sensor-ac_switch-rectifier-capacitors-heater-temperature_sensor.Whatever you do still PID controll paremeters or other fancy methods including determined heat transfers models might be needed fro such precise temperature control, but it looks like PWM after rectifieed DC is not needed, while we can use AC phase shifting and predict/set needed amount of input power to heater simply by adjusting delays time.The main problem might be to know how much energy is needed to do not overheat this thing in changing ambient temperature, I guess

author: Richard Crowley
author_rank: Super Contributor
timestamp: September 04, 2014, 06:50:14 pm
content: How much thermal mass are you talking about here? Unless you are trying to control the temperature of something the size/mass of a match-head to within 0.01 degrees, using PWM, at high frequencies just seems like gross overkill, not to mention the additional risk of failure from all those extra components. We typically see simple SCR/Triac switching of the direct mains current/frequency with zero-cross switching. The thermal mass of the "load" performs all the final "filtering".

author: SArepairman
author_rank: Frequent Contributor
timestamp: September 04, 2014, 10:30:50 pm
content: Quote from: Richard Crowley on September 04, 2014, 06:50:14 pm100-200 grams, probably some kind of copper alloy, fine control to 450C.does the max temperature change peoples opinions of PWM being unnecessary? I know at elevated temp it will lose heat alot quicker.

author: Richard Crowley
author_rank: Super Contributor
timestamp: September 05, 2014, 12:15:19 am
content: Clearly, you would need to scale the capacity of the heating element to the mass of the "load". A heater of insufficient power will not be able to keep up with whatever losses from the mass, and one that is too large will possibly overheat even with short pulses, and will create an uneven temperature over time. I still don't see why ordinary mains-frequency, zero-crossing switching wouldn't work. Not at all clear why PWM or HF would be necessary here? The thermal mass itself if a fine integrator.