I'm new to Arduino, but have worked with Basic Stamps and some MikroBasic programs. I'm looking forward to sitting down and learning everything. I just don't have time for this one...
I've just ordered a Uno and LCD/button shield from adafruit for a project I need finished right away...
The task is to heat a big tub of solidified oil to get it to melt slowly for further packaging. If it is heated too fast, the product around the heater element burns and spoils the whole batch.
I'm basing this on the Sous-vide project, it seems like it has everything I need (almost)
The only problem is that it looks like it will bring it up to the setpoint temperature, but with no regard on how fast it does this.
Can someone advise how you would limit the intensity of the heater in this sketch?
In a perfect world I'd like to have a pot that would increase/decrease the duty cycle inside the PID loop - thus slowing the heating cycle.
I will be using an SSR and not a mechanical relay if that helps/matters.
Are you sure? The PID (proportional, integral, differential) algorithm is designed to manage the rate of change. With correct tuning you should be able to get it to go to your set point with a controlled rate of change. I would test on small quantities first, of course (eg. no oil at all).
You can either design your controller to limit the rate-of-change of temperature it can achieve by limiting its control authority, or (IMO better) have the PID algorithm control to a target value which you adjust over time to define whatever temperature profiles you want. This is perfectly normal use of a PID.
The PID controller should have it's normal optimum tuning for fastest response with the smallest overshoot as classic control would have. How you manage the slow rise in temperature is to use setpoint management such that you have the program slowly ramp up the setpoint value from the starting temperature to the end desired temperature over the desired time frame involved. In other words the PID turning is independent of how fast you have your program ramp up the temperature by small increments of the setpoint value. This much how annealing furnaces work, not by playing with the PID controller but rather by timed changes to the setpoint per the heating curve you wish to create.
You could just limit the strength of the heating element. Or keep your temperature probe in close proximity to the heating element to ensure you don't go over temperature.
I'm new to Arduino, but have worked with Basic Stamps and some MikroBasic programs. I'm looking forward to sitting down and learning everything. I just don't have time for this one...
I've just ordered a Uno and LCD/button shield from adafruit for a project I need finished right away...
The task is to heat a big tub of solidified oil to get it to melt slowly for further packaging. If it is heated too fast, the product around the heater element burns and spoils the whole batch.
The only problem is that it looks like it will bring it up to the setpoint temperature, but with no regard on how fast it does this.
Can someone advise how you would limit the intensity of the heater in this sketch?
In a perfect world I'd like to have a pot that would increase/decrease the duty cycle inside the PID loop - thus slowing the heating cycle.
I will be using an SSR and not a mechanical relay if that helps/matters.
You do not need to use a PID when you are talking about volumes such as this. However as you say you do not want to heat too fast to ensure there is no burning.
Basically you want to get a Solid State Relay with Zero Crossing support built in. What size element do you have ?
What you want to do it turn the element on and off many times per second to essentially lessen the power that it is outputting. You will have to experiment with this to find the appropriate numbers.
You do not need to use PWM (but could if you wish), just having a fairly tight loop and cycling the element repeatedly will give you the desired outcome.
With a Zero Crossing SSR you will be limited by how quickly you can cycle based on your mains frequency (but it will be more than fast enough for what you want to achieve)
craigcurtin:
You do not need to use a PID when you are talking about volumes such as this...
...Solid State Relay with Zero Crossing support built in. What size element do you have ?
Thanks all for the advice, I'll get it wired up today...
I do have Zero Crossing SSR's coming - I figured they couldn't hurt... The element is 4500 watts, It's big, and I could use something smaller to get the oil to warm more slowly, but at the end of the cycle I need all 4500 watts to get it super hot.
I agree that the large mass (~100 liters) may not even require PID.
The element is 4500 watts, It's big, and I could use something smaller to get the oil to warm more slowly, but at the end of the cycle I need all 4500 watts to get it super hot.
Have you considered two elements?
It would seem to me the critical point at which burning might occur is when the oil is solid. At that stage it will not be the oil temperature that is important but the surface temperature of the element. That might be difficult to control accurately with a high power element. To get the oil from solid to liquid and establish convection perhaps you could have a smaller element whose surface temperature can never get high enough to burn the oil. Once you have a liquid the larger element can be fired up.
You could measure the temperature of the heating element by measuring its resistance. There is at least one temperature controlled soldering iron that measures temperature in that way.
What you want to do it turn the element on and off many times per second to essentially lessen the power that it is outputting. You will have to experiment with this to find the appropriate numbers.
I have some questions on this;
What effect will switching 4.5kW, which is quite a large load, rapidly like this have on other electrical equipment in the area?
Will switching affect the lifetime of the element?
How would the element temperature vary with switching frequency?
What type of heating element are you using? What's the surface area of the element? How hot is too hot for the fat?
Typically a resistive style heating element (i.e. hot water service) has the same density of heat in an element - they just vary the length of the element - thus adding additional elements will allow the unit to come upto temp more quickly but will do nothing to alleviate the initial issue. Although by having multiple elements - wired in series then you reduce the heat output of each element so it is valid in that respect.
Maybe a combination of the two - multiple elements in series and using a Zero crossing SSR to turn them on and off many times a second would be a good solution
What you want to do it turn the element on and off many times per second to essentially lessen the power that it is outputting. You will have to experiment with this to find the appropriate numbers.
I have some questions on this;
What effect will switching 4.5kW, which is quite a large load, rapidly like this have on other electrical equipment in the area?
Will switching affect the lifetime of the element?
How would the element temperature vary with switching frequency?
As long as the SSR is rated to handle the load (and if it is a cheap EBAY job i would overrate it by at least twice) (The op has not said what Country he is in so do not know what his wiring situation is) then switching at the Zero Crossing point will have no effect on the rest of his electricity supply.
I have a 4.4Kw element here in Australia and i have been using it for about 3 years doing exactly this (running of a Picaxe micro - another job to transfer this function across to a Arduino at some point !) I make Biodiesel about once a week or so and have had not issues with the element.
Essentially - the element temperature will be halved if you switch at 1/2 the frequency of the mains
Essentially - the element temperature will be halved if you switch at 1/2 the frequency of the mains
If the element temperature is halved will that not decrease its resistance resulting in more current flowing when the element is on?
Will the higher current not reduce element life?
Reading up on elements; The electrical power dissipated per cm2 by an element is called its surface loading or watt density and is expressed in W/cm2.
I also read
The temperature rises in accordance with the increase in the surface loading (watts density) and has a detrimental effect on the life of the element.
If you shop around is it not possible to find elements offering different watt densities, and hence lower surface temperatures, but still delivering the required total power?
Yes, on the outside it seems good, but I tend to agree with some comments here that the surface area will be equally as hot as a larger elements area. ie; 1 cm2 on the small one will be just as hot as 1 cm2 on the large one...
a resistive style heating element (i.e. hot water service) has the same density of heat in an element - they just vary the length of the element - thus adding additional elements will allow the unit to come upto temp more quickly but will do nothing to alleviate the initial issue.
Bingo, I think this is true...
What type of heating element are you using?
It is indeed a hot water heater element...
The op has not said what Country he is in
Canada, it will be running 2 phase 220V
Thanks for all the good info here guys, I think I'm on the right track.
I've got my uno here last night and built up a couple of shield kits and tested some code PIDing a lightbulb via a ds1820.
I still need to get a bunch of welding done on stainless drums before I can fit the heater element... I may need to resort to testing with an electric tea kettle...
I think you should look again at the heating element you are using, a water heating element may not be best. for example this seems to be exactly your problem;
Maximum Recommended Watt Density
— Some materials such as water, vegetable
oils and salt baths can tolerate relatively high
sheath watt densities. Other materials such as
petroleum oils or sugar syrups require lower
watt densities. These solutions have high viscosity
and poor thermal conductivity. If the watt
density is too high, the material will carbonize
or overheat, resulting in damage to the heating
equipment or material being heated. Other
sections of this catalog provide guidelines and
suggestions for sheath materials and recommended
watt densities for many common
heating problems.
Also
Extended heater
life will be obtained by using the lowest watt
density practical for any given application.
I suggest you use burst fire control (i.e. PWM at a very low frequency, using your zero-crossing SSR) to limit the power input, until your temperature sensor indicates that the oil has liquified enough for convection to be taking place. Then increase the heating power as the temperature increases, until you are approaching the final target temperature. A PID controller is definitely NOT what you want for this, except possibly when you are closing on the target temperature - but I doubt that you need one even then, unless the volume of oil to be heated is going to vary a lot.
I am dealing with a similar problem, but I am thinking about an entirely different approach. I will be bringing a 350 gallon spirits still up to a temperature set point as quickly as possible using 8 5500 watt heating elements. I don't think the low frequency pwm control is the way to go. With this method you are turning the element on (100%) and off (0%) for controlled periods of time (e.g. 1 second on and 1 second off at 50% power is the shortest time possible). Instead, we are using phase angle control of the 8 SSRs so that EACH 60 Hertz cycle of ac power is turned on only a part of each cycle to get from 0% to 100% effective power to the elements. We would blink the lights in the whole neighborhood if we used the PWM method, but more importantly, we might burn the booze turning them on 100% for 1.5 secs to get 75% power using PWM.
oldradio:
With this method you are turning the element on (100%) and off (0%) for controlled periods of time (e.g. 1 second on and 1 second off at 50% power is the shortest time possible).
No, the shortest time possible is half a cycle (or 1 cycle if you are being kind to the mains supply). So you can get 0 to 100% in 1% steps using a cycle time of just 0.8 second. Or shorter if you use variable cycle time.
oldradio:
Instead, we are using phase angle control of the 8 SSRs so that EACH 60 Hertz cycle of ac power is turned on only a part of each cycle to get from 0% to 100% effective power to the elements. We would blink the lights in the whole neighborhood if we used the PWM method, but more importantly, we might burn the booze turning them on 100% for 1.5 secs to get 75% power using PWM.
If using the burst-fire method really does cause the lights to blink, then you'll cause serious distortion to the AC mains waveform using the phase control method, which will cause radios and amplifiers in the neighborhood to make an annoying buzzing sound - unless you spend a small fortune on high-current inductors and other interference-suppression measures.
Burst-fire control using zero-crossing switches is generally preferred for heating devices.
oldradio:
With this method you are turning the element on (100%) and off (0%) for controlled periods of time (e.g. 1 second on and 1 second off at 50% power is the shortest time possible).
No, the shortest time possible is half a cycle (or 1 cycle if you are being kind to the mains supply). So you can get 0 to 100% in 1% steps using a cycle time of just 0.8 second. Or shorter if you use variable cycle time.
oldradio:
Instead, we are using phase angle control of the 8 SSRs so that EACH 60 Hertz cycle of ac power is turned on only a part of each cycle to get from 0% to 100% effective power to the elements. We would blink the lights in the whole neighborhood if we used the PWM method, but more importantly, we might burn the booze turning them on 100% for 1.5 secs to get 75% power using PWM.
If using the burst-fire method really does cause the lights to blink, then you'll cause serious distortion to the AC mains waveform using the phase control method, which will cause radios and amplifiers in the neighborhood to make an annoying buzzing sound - unless you spend a small fortune on high-current inductors and other interference-suppression measures.
Burst-fire control using zero-crossing switches is generally preferred for heating devices.
DC42 - for my education can you explain why we need PWM in this scenario - on my system (i am in Australia) so we use 60hz mains - i just have my SSR turning off and on 10 times per second and let the Zero Crossing nature of the SSR handle the actual drop out from the mains - is there some technical benefit to using PWM (other than maybe freeing up more Arduino Resources ?)