Introduction: Smart Thermal + Arduino

Many times we are  faced with a heat containing coffee and don't  know if the fluid is at  the proper temperature and it is impossible to know just by looking at  the bottle ended up losing time with a coffee that is cold and we get  upset about it.

This however  indicates maker by a graph LEDs if the liquid is hot, warm or cold. The LEDs gradually  connect the blue (cold) to red (hot), when there is a heating and go off  when there is a cooling.

See the Vídeo here!!

Step 1:

To develop the project were used:

* 1 temperature sensor found in digital thermometers.
* 9 colored LEDs: 1 red, 4 yellow, 3verdes, 1 blue.

* 1 resistêcia 10K (Brown, Black and Orange).

* 1 arduino.

* 1 thermal.

* wires.

Nine holes were drilled in the side of the thermal with a hot iron of the same diameter of the LEDs.

Wires connected the leds of the pins 5 ao 13

Internal view of wall of LED thermal:

Step 2: Sensor

The temperature sensor was removed from the tip of the digital thermometer and connected to the Arduino as shown below:

The sensor was placed inside the glass bottle with a long wire.
I developed a code that was based on another that controls the LED graphics that was modified and adapted to the needs of the project. In this program you can also see the serial port of the Arduino IDE value read by the sensor and the number of LEDs that are off.
It was possible to detect the gradual change in temperature of the fluid within the thermal result of cooling or heating the graph of LEDs.

Step 3: Sketch:




-Programa criado por Gamesh_ (by Gamesh_) from Brazil
Criado em 03, janeiro,2010

--O programa detecta a temperatura do líquido(café, chá) na térmica e
indica com um gráfico a temperatura.
Azul para frio, vermelho para quente e
demais cores para temperaturas intermediarias.
O objetivo é saber se o "café" ainda está com
uma boa temperatura para tomar.--

Programa usou como base o:
LED bar graph
created 26 Jun 2009
by Tom Igoe
disponível no:


const int analogPin = 0; // Entrada do sensor de temperatura.
const int ledCount = 9; // Número de LEDs usados (the number of LEDs in the bar graph)

int ledPins[] = {5,6, 7, 8, 9, 10,11,12,13}; // Pinos usados com LEDS (an array of pin numbers to which LEDs are attached)

void setup() {


// loop over the pin array and set them all to output:
for (int thisLed = 0; thisLed < 9; thisLed++) {
pinMode(ledPins[thisLed], OUTPUT);

void loop() {

// Lendo o sensor termico:
int sensorReading = analogRead(analogPin);
// map the result to a range from 0 to the number of LEDs:
int ledLevel = map(sensorReading, 320, 930, 0, 9);

Serial.print("Valores ledLevel : ");
Serial.print("Valores sensorReading : ");

// loop over the LED array:
for (int thisLed = 0; thisLed < ledCount; thisLed++) {

if (thisLed < ledLevel) {
digitalWrite(ledPins[thisLed], LOW); //Desliga os LEDS(LEDs OFF)

else {
digitalWrite(ledPins[thisLed], HIGH); //Liga os LEDS(LEDs ON)