Temperature Sensor Output Values on Android Smartphone

27K4916

Intro: Temperature Sensor Output Values on Android Smartphone

This is project of temperature sensor, value of temperature will be transmitted on Android smartphone via Bluetooth and displayed on its screen, with RemoteXY library used. Such a temperature sensor can be placed in an inaccessible location, such as behind the window, in the refrigerator.

STEP 1: Electrical Part

For making of the electrical part of the device, you need any Arduino board, the thermistor 1K, resistor 1K. Above image is a diagram of connections of all structural elements. The thermistor circuit is included in the voltage divider, a second shoulder which is constant resistance. The midpoint of the voltage divider we have connected to an analog input of the Arduino with the number A5.

STEP 2: Calibration

The development of the program we will start with calibration of the sensor. Calibration we perform two-point, and to do this we need the reference temperature. This, subsequently, to calculate the current temperature will use linear interpolation.

For calibration, we need to determine what value input Arduino ADC with temperature sensor that we have chosen the reference. Use Serial and port monitor, to transmit the ADC value on the computer that we could see what it is when our reference temperatures. To do this we need the following simple Arduino sketch.

void setup()   {    
	Serial.begin(9600);    
}

void loop()   {
	int sensorValue = analogRead(A5);
	Serial.println(sensorValue);   
	delay(1);  
}

For example, we obtained the following calibration values:

T = 25,0 ° C ADC = 580

T = 36,6 ° C ADC = 514

STEP 3: RemoteXY Library

Go to online editor RemoteXY and create the management interface. It consists of a text field, through which is transmitted the measured temperature, and a text label. See above image.

Selected in the RemoteXY project settings of the target platform Arduino (SoftwareSerial), library version and the generated source code of our interface. Don't forget to download RemoteXY library and import it to the Arduino IDE (Sketch/Import library/Add library...).

For transmit the value of temperature on the smartphone screen we need to get the current value of the ADC, to get the value of the current temperature using a linear interpolation on the two known points, convert the received value into a string and write it in the field text_1 patterns RemoteXY.

Full version of result sketch for Arduino IDE is attached. In this code, you must change the defined values SENS_1_VAL, SENS_1_TMP, SENS_2_VAL, SENS_2_TMP, substituting them your that you got when you measured values for calibration.

STEP 4: Download Android App

Download to your smartphone or tablet RemoteXY app. And can control the temperature when you are away from your sensor, using Bluetooth.

16 Comments

Which bluetooth module is that? Can't it ne wired directly into the arduino? I am doing a similar project but I have verey little experience with arduino. :)

Done! just little bit modification, it was using 1 wire Digital Temperature Sensor with DS18B20. here is the link.

http://www.14core.com/wiring-the-ds18s20-1-wire-temperature-sensor-with-hc06-on-android-with-microcontroller/

from where i can get the circuit

can i change the sensor by LM35 ?

Yes, I think, you can use LM35 too.

can i use MLX90614 instead ??

how far via Bluetooth can give data ?

Bluetooth can transmit data ~10 meters. You can use WiFi. RemoteXY supported WiFi modules.

did u have another example of temperature sensor output values via message

can you tell me how to code with this android interface, i decided to make 2 tabs on arduino IDE, one for interface and one called sketch like what you did but i got error it said " redefinition of void setup()" and also it make me confused should we use 2 tabs or only one tab.. please reply me. thanks and sorry for my bad english :)

One tab. Use the sketch of interface from RemoteXY. And add to it needed functional.

i thought i did, but will install again, thanks

wonderful job, and very clever idea! thanks for sharing!

O, the battery used for an example only. Of course it will not work long, as Arduino and Bluetooth module consumes a lot of energy for it work long time

hey. nice simple work. what is your battery life, any clue?