New to the Arduino, and loving it. My mind is racing with the possibilities.
My first project I want to create is for a Sous Vide cooker. I know there are several examples and tutorials for a Sous Vide cooker, but I want to do mine different. If you don't know a Sous Vide cooker basically heats water to a degree just like a slow cooker, only more precise. Most people create the cooker with a relay for the heating element. I would like to use a TRIAC instead of a RELAY to control the heater of the water. I have found a that using a dimmer instead of an switch creates a much more stable water temp. A relay causes a constant up and down. I remember seeing a chart comparing the two and the dimmer was very steady right at desired temp, where the relay constantly fluctuating by a couple degrees up and a couple degrees down.
Can anyone point me to a tutorial for doing this? The heating element I am going to use is 400 watts, but I would like to make it a bit heavier duty.
Because household AC line voltage is dangerous you might want to use a Solid State Relay instead of a raw TRIAC. This will give your Arduino a degree of isolation form the line current. Then you can use a PWM (analogWrite()) output to control power to your heating element.
So how does a PWM output work with a SSR? Is it chopping up the AC like per cycle or just turning it on and off so many times per second?
I get a little confused when it comes to AC cycles.
Wouldn't a SSR be harder on the heating element, turning it on and off so often? or just the same as dimming it?
or making it yourself? If so, what components should I buy?
The channels on the module can only handle 2A each. That's 220W and 110V. Won't work for your 400W load. For a 110V 400W load you want a 4A (440W) or higher capacity.
If you are only controlling one heater then a single SSR should work fine. DigiKey.com and Mouser.com are good sources of components.
I have used the "Fotek SSR 25DA" for most of the sous vide controllers I have built.
You can find it at dealxtreme or ebay at a very reasonable price.
It needs a low current for switching, meaning that you can connect the Arduino directly to it. Furthermore, being able to handle 25A, I've controlled a 2kW heater with it, and it just got luke warm in spite of only using a piece of aluminium plate for a cooling fin.
So how does a PWM output work with a SSR? Is it chopping up the AC like per cycle or just turning it on and off so many times per second?
I get a little confused when it comes to AC cycles.
PWM is useless with 60Hz mains voltage if you don't know where the zero-volt-point in your cycle is.
You have to pulse exactly after this point, or you would just end up with a flickering light (or uneffective heater).
Peter_I:
I have used the "Fotek SSR 25DA" for most of the sous vide controllers I have built.
You can find it at dealxtreme or ebay at a very reasonable price.
It needs a low current for switching, meaning that you can connect the Arduino directly to it. Furthermore, being able to handle 25A, I've controlled a 2kW heater with it, and it just got luke warm in spite of only using a piece of aluminium plate for a cooling fin.
Thanks for the help, I am waiting for a 10A SSR I bought off of Fleabay. If it gets hot I will definitely buy the one you recommend, it sounds tough. You use a 2kW heater? Interested in knowing more about the controllers you have built. Did you share you process anywhere, or would you care to? Thanks! Randy
kduin, Thanks for the info. What you say makes sense to me. Given, I am a long way from understanding this stuff.
So is it important to leave the heater on for a period of time to make it effective? Like a 1/2 a second or something? Since I don't have a zero-cross detection shouldn't I be leaving it on for several cycles. Have like a minimum on time?
What if I changed my power to a percent and then took 10 secs and divided it by that percentage. So if it was 50% I would leave the heater on for 5 secs and off for 5 secs? 70% would be on 7 secs off 3 secs.
I keep thinking in the back of my head that I can take a heavy duty 1000w dimmer and hack it to be an effective arduino controlled dimmer somehow.
Thanks for the help everyone!!!
kduin:
So how does a PWM output work with a SSR? Is it chopping up the AC like per cycle or just turning it on and off so many times per second?
I get a little confused when it comes to AC cycles.
PWM is useless with 60Hz mains voltage if you don't know where the zero-volt-point in your cycle is.
You have to pulse exactly after this point, or you would just end up with a flickering light (or uneffective heater).
randynealpetersen:
So is it important to leave the heater on for a period of time to make it effective? Like a 1/2 a second or something? Since I don't have a zero-cross detection shouldn't I be leaving it on for several cycles. Have like a minimum on time?
If you just buy an off-the-shelf PID temperature controller (like 1/16 DIN PID Temperature Controller (For SSR) [SYL-2352] - $42.98 : Auber Instruments, Inc., Temperature control solutions for home and industry), as is pretty common for DIY sous vide cookers (and what I did), it will do just what you're suggesting. You can adjust the time base, but it defaults to 2 seconds. So, 10% power would be 0.2 sec on and 1.8 sec off, 50% would be 1 sec on and 1 sec off, etc. An SSR is the most common device used to switch the heater on and off, as a mechanical relay would quickly wear out from the on/off cycles. Properly tuned, and with an appropriate temperature sensor, these can hold temperature to within a few tenths of a degree without a problem.
If you know the volume of your cooker then you can calculate pretty closely how much power you need to get it up to temp. It comes out to about 2.42W to raise 1 gallon of water 1 degree F in 1 hour. Your tank will cool off of course but bringing it up to temp is where you'll use the most power.
What if I changed my power to a percent and then took 10 secs and divided it by that percentage. So if it was 50% I would leave the heater on for 5 secs and off for 5 secs? 70% would be on 7 secs off 3 secs.
Only someone from Clinton would do something like that ;). If you have any temperature reading of the water then the PID library is pretty straightforward to use to help you control the heater on/off. A DS18B20 probe in a stainless steel housing (~$10) is commonly used for water temperature sensing.
That is perfect!
Thanks for that info. I wondered how the PIDs did it.
Based on 2 seconds, sounds reasonable. Even at 1% it would be .02 seconds which is 1.2 cycles at 60hz.
danb35:
randynealpetersen:
So is it important to leave the heater on for a period of time to make it effective? Like a 1/2 a second or something? Since I don't have a zero-cross detection shouldn't I be leaving it on for several cycles. Have like a minimum on time?
If you just buy an off-the-shelf PID temperature controller (like 1/16 DIN PID Temperature Controller (For SSR) [SYL-2352] - $42.98 : Auber Instruments, Inc., Temperature control solutions for home and industry), as is pretty common for DIY sous vide cookers (and what I did), it will do just what you're suggesting. You can adjust the time base, but it defaults to 2 seconds. So, 10% power would be 0.2 sec on and 1.8 sec off, 50% would be 1 sec on and 1 sec off, etc. An SSR is the most common device used to switch the heater on and off, as a mechanical relay would quickly wear out from the on/off cycles. Properly tuned, and with an appropriate temperature sensor, these can hold temperature to within a few tenths of a degree without a problem.
I got a bunch of temp probes, I think they are DS18B20s as you suggested. They are waterproof, came from china. I was thinking it would be nice to try and capture water temp at different levels in the pot.
I know a lot of people that have simple programming that turns on the heater when the water temp goes down and off when it gets to temp. I just want to try and have a percentage level up and down to help regulate the heat. Trying to get as stable as temp as possible.
I didn't know anything about the PID library, that looks extremely helpful and perhaps the answer to all problems. I will be reading up on that.
Chagrin:
If you know the volume of your cooker then you can calculate pretty closely how much power you need to get it up to temp. It comes out to about 2.42W to raise 1 gallon of water 1 degree F in 1 hour. Your tank will cool off of course but bringing it up to temp is where you'll use the most power.
What if I changed my power to a percent and then took 10 secs and divided it by that percentage. So if it was 50% I would leave the heater on for 5 secs and off for 5 secs? 70% would be on 7 secs off 3 secs.
Only someone from Clinton would do something like that ;). If you have any temperature reading of the water then the PID library is pretty straightforward to use to help you control the heater on/off. A DS18B20 probe in a stainless steel housing (~$10) is commonly used for water temperature sensing.
Peter_I:
I have used the "Fotek SSR 25DA" for most of the sous vide controllers I have built.
You can find it at dealxtreme or ebay at a very reasonable price.
It needs a low current for switching, meaning that you can connect the Arduino directly to it. Furthermore, being able to handle 25A, I've controlled a 2kW heater with it, and it just got luke warm in spite of only using a piece of aluminium plate for a cooling fin.
Thanks for the help, I am waiting for a 10A SSR I bought off of Fleabay. If it gets hot I will definitely buy the one you recommend, it sounds tough. You use a 2kW heater? Interested in knowing more about the controllers you have built. Did you share you process anywhere, or would you care to? Thanks! Randy
Very simple:
Commercial PID-controllers (My first one was a second-hand Eurotherm, the next four has been cheap chinese controllers... they all work fine, but the eurotherm is the best by a small margin).
The eurotherm did not have an autotune function. It was fun to do the datalogging and Ziegler-Nichols, but it is so much easier to push AT and lean back.
I use a slowcooker controlled by the PID through the aforementioned SSR, and it works great.
I have also used a ricecooker (higher wattage, easier tuning) and a BIG pot insulated with a towel and heated by an immersion heater.
Tuning is important for stable temperature.... and do not trust the temperature calibration! One of the controllers were 4° off when I got it. Thermocouples can be a little tricky too, and be a couple of degrees of the mark.
(Relative temperature is easy, absolute temperature is a little harder)
I have used Type K couples, but Pt1000 or LM35 would be a wiser choice for the low temperature region of gastronomy.
Commercial PID-controllers (My first one was a second-hand Eurotherm, the next four has been cheap chinese controllers... they all work fine, but the eurotherm is the best by a small margin).
The eurotherm did not have an autotune function. It was fun to do the datalogging and Ziegler-Nichols, but it is so much easier to push AT and lean back.
I use a slowcooker controlled by the PID through the aforementioned SSR, and it works great.
I have also used a ricecooker (higher wattage, easier tuning) and a BIG pot insulated with a towel and heated by an immersion heater.
Tuning is important for stable temperature.... and do not trust the temperature calibration! One of the controllers were 4° off when I got it. Thermocouples can be a little tricky too, and be a couple of degrees of the mark.
(Relative temperature is easy, absolute temperature is a little harder)
I have used Type K couples, but Pt1000 or LM35 would be a wiser choice for the low temperature region of gastronomy.
Thanks for the info! I was planning on just using a PID controller. Most of the DIY Sous Vide cookers use one. I guess I am using the Arduino, just because I wanted a learn more about the Arduino.
randynealpetersen:
Thanks for the info! I was planning on just using a PID controller. Most of the DIY Sous Vide cookers use one. I guess I am using the Arduino, just because I wanted a learn more about the Arduino.
The difference depends on what you focus on.
Some people want to do sous vide cooking using a PID
Other really want to build a controller! .... Then they use it for cooking
It is almost a matter of philosophy! It is the journey or the destination?
8)
randynealpetersen:
So is it important to leave the heater on for a period of time to make it effective? Like a 1/2 a second or something? Since I don't have a zero-cross detection shouldn't I be leaving it on for several cycles. Have like a minimum on time?
If you just buy an off-the-shelf PID temperature controller (like 1/16 DIN PID Temperature Controller (For SSR) [SYL-2352] - $42.98 : Auber Instruments, Inc., Temperature control solutions for home and industry), as is pretty common for DIY sous vide cookers (and what I did), it will do just what you're suggesting. You can adjust the time base, but it defaults to 2 seconds. So, 10% power would be 0.2 sec on and 1.8 sec off, 50% would be 1 sec on and 1 sec off, etc. An SSR is the most common device used to switch the heater on and off, as a mechanical relay would quickly wear out from the on/off cycles. Properly tuned, and with an appropriate temperature sensor, these can hold temperature to within a few tenths of a degree without a problem.
I had thought of that, and did intend that but wondered about arduino control because I have a number of projects in mind like a smoker and a cheese cave which I need to control the humidity as well as the temperature. So to learn more about this and have more options available I was thinking on using arduino instead of dedicated PID.