I have seen a few projects on here about monitoring temperatures and using the Spark Core in conjunction with a slow cooker so I thought I would share the project I completed over the weekend. To be honest I am neither a hardware or software guy so willingly accept any comments and improvements, it is also my first foray into Arduino(and compatible) which the Spark Core has made really nice and easy!
I know that I should really have the relay contained in something, just awaiting for my project box to turn up
So, following in other people’s footsteps, I have been using a DS18B20 probe, connected up to the Vin and a digital pin with a 4.7k resistor. I am using the Spark Relay Shield to control the actual slow cooker and then using the Arduino PID library to control whether the relay is off or on using the probe for the temperature input. The temperature of the slow-cooker is then sent to Xively roughly every 30 seconds using their API which enables me to produce pretty graphs with it!
I am currently finding that with a target temperature of 65c and 3.5L of water, the slow cooker is cycling from 63.5c and up to 66.5c. which is roughly as I would expect but I reckon with tuning the Ki
, Kp
, Kd
values a bit better I imagine I will be able to reduce those changes a little bit more!
I have uploaded all the code to github.