Digital Temperature Controller Arduino Monitor Project

The project described here is also conveniently located in our Arduino Temperature Monitor Project_K104 manual.

There are instances where it would be helpful to observe the temperature value that is being measured by the Circuit Creations K104 Digital Temperature Controller kit.  By using the serial monitor capability of the Arduino open-source electronics platform we can indeed see the temperature value measurements in real time.  An example of the serial monitor display is shown to the right.

The connections between the Circuit Creations Kit 104 Digital Temperature Controller (after assembly) and Arduino Uno are shown in the illustration to the right.  Connect the wires between the Circuit Creations Kit 104 and Arduino Uno boards as described in the illustration and table. Circuit Creations Digital Temperature Controller Kit 104 does not include the Arduino hardware or interconnect wire.

The program below is written for the Arduino Uno with plenty of comments to explain its purpose and function.  You can copy the code below as a sketch directly into the Arduino development environment and  it is ready for compiling and uploading to the Arduino Uno board.  To see the temperature being measured by the Circuit Creations Digital Temperature Controller, start the Serial Monitor from the Arduino IDE and select a 9600 baud rate in the Serial Monitor pop-up window.  Of course, this code can be included as part of a larger project.  Pay attention to comments and pin connections for a straight forward adaptation of the example code to boards other than the Arduino Uno.

* Sketch for Circuit Creations Digital Temperature Controller Kit 104 Monitor:
*           Pin Connection Map
* K104 Pad                  Arduino Uno
* =======================
* VIN                             5V
* GND                           GND
* RA0                            A2

// Include the necessary Libraries
#include <Arduino.h>

// Analog pins definition for temperature sensor
// Here we use analog pin 2 for temperature input
#define pinTemperature    2

// Declare and set initial state of the temperature value
float temperatureValue = 0;

void setup()
   // Initialize serial communication at 9600 bits per second:

void loop()

  // Get temperature value
  temperatureValue = analogRead(pinTemperature);

  // Convert ADC result to temperature
  temperatureValue = ((temperatureValue * 5/1024) - 0.5) * 100;

  // Display temperature value every delay interval

  Serial.print ("C     ");
  Serial.print ((temperatureValue * 9/5 + 32),1); // Convert to Fahrenheit
  Serial.print ("F");