Kit 104 Arduino Temperature Monitor Project

advertisement
Circuit Creations
Kit 104 Temperature Controller Arduino Monitor
Introduction
The Circuit Creations K104 Digital Temperature Controller kit provides temperature on-off control with
a digital set point. This kit can be found on eBay by searching for “circuit creations” &
temperature. The circuit uses 7 switches to digitally select the temperature set point in F or C,
ranging from -10C to 100C. The desired temperature set point is chosen from a table of values in the
Kit_104_Manual at http://www.circuitcreations.com/Data_Sheets_And_Manuals.html .
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 in
Figure 1.
Figure 1 –Circuit Creations Kit 104 temperature measurements displayed on a serial monitor.
Some knowledge of the Arduino environment is helpful and there are many great on-line references
to learn more such as http://www.arduino.cc/ .
Digital Temperature Controller Kit 104
with Arduino serial monitor
Page 1 of 4
www.circuitcreations.com
Circuit Creations
Hardware
The connections between the Arduino Uno and Circuit Creations Kit 104 DigitalTemperature
Controller (after assembly) are shown in Figure 2. Connect the wires between the Arduino Uno and
Circuit Creations Kit 104 circuit boards as described in the illustration and table.
Circuit Creations Digital Temperature Controller Kit 104
does not include the Arduino hardware or interconnect wire
Wire Color
Red
Black
Blue
Arduino Uno
5V
GND
A2
Circuit Creations Kit 104
VIN
GND
RA0
Figure 2 – Connections between Circuit Creations Kit 104 Temperature Controller and Arduino Uno.
Digital Temperature Controller Kit 104
with Arduino serial monitor
Page 2 of 4
www.circuitcreations.com
Circuit Creations
Code
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 K104 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 that is limited only by your
imagination. Pay attention to comments and pin connections for a straight forward adaptation of the
example code to boards other than the Arduino Uno.
Some points on accuracy:

Keep in mind that the Circuit Creations Temperature Controller is designed with 2C
hysteresis; meaning that the temperature will have to decrease 2C from the trip point to
deactivate the circuit.

Be aware that the temperature sensor absolute accuracy is +/-2C from 0C to 70C with as
much as a ~8C further reduction in absolute accuracy of measurement for the Arduino circuit.
This is due to the 5V tolerance and analog-to-digital converter accuracy of the Arduino circuit.
The Circuit Creations Digital Temperature Controller has an independent voltage regulator
and analog-to-digital converter so that its accuracy is not impacted by the Arduino circuit
(unless Arduino circuit introduces noise- see point on noise).

The difference between 2 temperatures; or relative accuracy of measurement, for the Arduino
circuit over the same 0C to 70C range is ~+/-3C. It makes sense that the relative accuracy is
better than absolute accuracy since the identical circuit is used for both measurements with
the result that error sources tend to cancel each other out.

Noise in the circuit can affect accuracy too. Insuring that the wires connecting the Arduino
Uno and Circuit Creations Temperature Controller boards are kept short (6 inches or less is
best) and away from noise sources (e.g. fluorescent lights, electronic equipment, motors,
etc.) will minimize the impact of noise. In general, temperature changes relatively slowly so if
you are getting large changes (more than ~2C to 3C) in value for each temperature
measurement try moving or shielding your circuit from noise.
Digital Temperature Controller Kit 104
with Arduino serial monitor
Page 3 of 4
www.circuitcreations.com
Circuit Creations
/****************************************************************************************
* 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:
Serial.begin(9600);
}
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(temperatureValue,1);
Serial.print ("C ");
Serial.print ((temperatureValue * 9/5 + 32),1); // Convert to Fahrenheit
Serial.print ("F");
Serial.println();
delay(500);
}
Digital Temperature Controller Kit 104
with Arduino serial monitor
Page 4 of 4
www.circuitcreations.com
Download