

I have posted the full code at the bottom of the page, but I will break down some of the main functions now.įirst, the function to run the PID equation. I also just randomly picked a digital pin to control the SSR.

I don’t normally use the built-in SPI CSB pin (pin 10 on Uno) just because I normally am using multiple SPI devices at the same time that can’t all use pin 10. The MISO and SCLK pin positions are dictated by the type of Arduino board you are using ( see this). I wrote a library for communicating with this chip on Github. The MAX31855 is controlled through a SPI interface. Power Switch for switching heating element, activated by digital pin. This library is very good with handling the PID equation, but I felt like it could use some more description and clarification in applying the equation to ordinary Arduino peripherals, which is why I’m writing this post. I based my Arduino code off of this library on Github. My PID controller library on Github is here. I won’t get into the details of the equation or the coefficients in this post I am merely showing an Arduino implementation. In very simple terms, the temperature controller takes readings of the current state of the system and uses that data to determine whether to keep the heating element on. PID stands for proportional-integral-derivative and is a very popular algorithm in control systems.

This could be useful for solder reflow cycles, food baking, beer brewing, or anything that needs a controlled timing scheme for temperature control. The goal was to maintain a fixed temperature rate for a specified ramp up period, hold the temperature for a specified soak time, and then cool down at a specified rate. I recently implemented a PID routine for controlling temperature settings.
