Arduino Oven Controller PID

TC_Relay_Controls.tar (4183Bytes)
pid_control_result.PNG (190116Bytes)

This is my Arduino temperature-ramp PID controller, which is running on a hot plate (up to 325 C) and which shall also be tested on a furnace (up to 650 C).  This controller integrates some interesting stuff that I didn't make, using libraries I didn't write, but perhaps this will be useful to someone.


Common furnace PID controllers focus on reaching temperature set-points and are manually set.  This controller allows a final temperature set-point and a rate to be specified using serial commands to an Arduino.

An example command "S300 R10" would set a final temperature of 300C and a rate of 10C/minute, starting from the current temperature.  A PID controller aims to match the moving temperature ramp.

The challenge for this controller is to make the relay not switch excessively -- I want to avoid wear on the relay, as it's switching a lot of power and is rated for 100,000 events at its rated power.


  • McLaughlin Engineering Thermocouple Shield and Max31855 Library
  • Omega K-type Thermocouple (I'm using 0.010" bare wire)
  • Relay or Power Switch Tail II on Arduino Pin 7
  • Arduino

Arduino Source Code Follows and is attached as "TC_Relay_Controls.tar"

Results for a Hot Plate

The above plot shows a hot-plate test to its maximum temperature.

1 Like

Nice project :slight_smile: Being an

Nice project :slight_smile: Being an HVACR tech since many years, I didn’t know that the Arduino was capable of doing such a task. I have K-Type thermocouple and I would like to try this too. Thanks for sharing and for the tip. Cheers.


Now I’ve got my eyes open in the lab for a nice hotplate to hack into. Thanks for the “Something Else.”


I just started using thermocouples, so I took a look around for a “toy” thermocouple application that I could use to check my temperature readings. The idea was that when I get a questionable reading from a thermocouple, I can toss in a second or third sensor to confirm.  As it turns out it was pretty educational - I hadn’t realized that the thermocouple contact chemistry could be important.

Doubt using code



I’m buildong a project were your contribution could be very usefull.

Nevertheless things aren’t going very welI.

I installed the libraries and merged the two files (Arduino_Oven_Controler and tc_relay_controler)in the same sketch.

I tried to make compilation but I got an error (“get_and_do_command”  was not declared in this scope).

Was is missing?

Can you help me?



Doubt (part2)

I just noticed that the problem is the same for “reportResult” (I just commented the first one to see what happens).





Re: Doubt


I did forget to add a file, but it is in the Github repository.

The missing functions are in “process string.pde”.

I also have several branches of this, for different numbers of thermocouples.  

And although the original Arduino thermocouple shield is no longer sold by the designer, it lives on at