Hi, I'm doing a project in which I need to stabilize to a certain temperature in a tank. There will be a heater that I can turn on/off with a SSR and there is a temperaturesensor in the liquid.
I was thinking to send a very low frequency PWM to the SSR to control the system. Like a 15min basetime and a dutycycle proportional to the error (wanted temperature - measured temperature).
But I'm not sure if this is the correct way to achieve the temperature control.
I don't need a very precise temperature, it is allowed to oscillate -+10 degrees. Its actually about frying oil that needs to be liquid when the tank is full.
Any advice or opinion about the feasibility or method is welcome!
Kind regards, Sven 
From the Arduino side: dead easy.
From the process side: not so much. Your biggest problem is to make sure the heat is distributed more or less evenly through the tank. It sounds like the stuff can get solid.
Now if you have your temperature sensor on the opposite side of the tank, the heater can be heating the stuff to boiling point while at the sensor's side it's still a solid.
If you have your temperature sensor right next to the heating element, it will melt only the little bit around the heater and then think it's done.
Of course this are extremes, but I'm sure you get the point. If you can keep it liquid at all times, and have some way to get the heat to be distributed evenly (thermal convection of the heated oil may be enough; otherwise you need some form of stirring/pumping/mixing/whatever), it's a lot easier. You may still need multiple sensors to make sure your oil is all at a high enough temperature to be liquid.
What thermostats do is have upper and lower limit set points inside of the total allowed temperature range.
If the temperature is less than the low point, heater comes on until temperature reaches the high point when it turns off. The heat will get a bit more and then fall. The heater state tracks which of the 2 conditions is current, right? If it's ON then go by the upper point else go by the lower.
To tell the truth, you could build this without an MCU. I'm just not sure it'd be any easier.
Thanks wvmarle and GoForSmoke,
wvmarle indeed heat distribution might be a problem that i didn't consider. I will make a setup anyway so then I can analyse how severe this problem is. Keeping it liquid all the time would require a lot more energy since it may take a month to have a full tank and then someone will come and empty the tank...
So it could be melted just one day beforehand which reduces elektricity use of the heater with a factor 30.
GoForSmoke, I was also considering this at first. Afterwards a was concerned about overshoot but now I might reconsider and try this in my setup, thanks! The MCU is used because this is only a part of a bigger project (sigfox, LCD, level tank) but I only explained what is relevant to my worries/problem.
In this case you may consider to use two or more heat sensors. One placed close to the heating element to prevent overheating of the oil in that area (which may be a concern - this sensor would stop the heating when the oil becomes dangerously hot here, of course this temperature will be higher than the bulk), another (or even multiple) at the opposite side of the the tank to tell you whether the overall temperature of your oil is high enough.
For heat sensors: I'm thinking of thermistors or thermocouples, as these are very robust and have high chemical resistance. A properly encased DS18B20 may work as well, should be easier to read out.
It sounds like it's a pretty big tank - what sizes and power and so are you talking about?
Your situation calls for a "blanket heater" that wraps completely around the tank and heats evenly. Like an electric blanket for your bed.
Paul
Hi,
If you cannot circulate the oil, because it starts as a solid, you may need two temperature sensors.
One sensor near the heating element, so the local temperature while melting the oil, does not get to boiling the oil.
The second sensor at the other end of the tank so when temperature has been attained at the end of the tank, you know it is ALL liquid.
Tom.. 
Paul_KD7HB:
Your situation calls for a "blanket heater" that wraps completely around the tank and heats evenly.
Indeed, that'd be best, but I guess it's too expensive and not too practical for a waste storage tank that's to be heated once a month (just so it's liquid so temperature doesn't matter much, and it may take a day to actually reach the liquid state). Bigger surface area of the element would definitely be an advantage, for sure.
svenonderbeke@hotmail.com:
Thanks wvmarle and GoForSmoke,
wvmarle indeed heat distribution might be a problem that i didn't consider. I will make a setup anyway so then I can analyse how severe this problem is. Keeping it liquid all the time would require a lot more energy since it may take a month to have a full tank and then someone will come and empty the tank...
So it could be melted just one day beforehand which reduces elektricity use of the heater with a factor 30.
GoForSmoke, I was also considering this at first. Afterwards a was concerned about overshoot but now I might reconsider and try this in my setup, thanks! The MCU is used because this is only a part of a bigger project (sigfox, LCD, level tank) but I only explained what is relevant to my worries/problem.
The set points must be inside of your acceptable range and perhaps as temperature approaches the top limit the heater could be pulsed smaller. If possible... maybe the heater ON state could be finessed to stay between the set points if the rise is not too fast.
Could you heat the grease with microwaves? Microwaves do heat lipids and it wouldn't be just an area on the outside.