Measure your home temperature on your smartphone

Introduction

In this project, we are going to learn how to Measure your home temperature on your smartphone, This project involves measuring the temperature of your home and collecting the data on your smartphone using an Arduino UNO, LM35 temperature sensor, HC-06 Bluetooth module, and a 5V battery. The project falls under the domain of domotics and IoT, which aims to make existing objects smarter and integrate them with everyday life.

Hardware Required

You will require the following Hardware Components to Measure your home temperature on your smartphone.

Components#Buy From Amazon
Smartphone1Buy Now
Arduino UNO1Buy Now
Bluetooth module HC-061Buy Now
Temperature sensor LM351Buy Now
5V Battery1Buy Now
Jumper WiresFewBuy Now
Breadboard1Buy Now

What is HC-06 Bluetooth

The HC-06 Bluetooth module is a wireless communication module that enables two-way communication between electronic devices over short distances. It is a low-cost, high-performance, and low-power-consumption device that is widely used in various embedded systems and Internet of Things (IoT) applications.

The HC-06 Bluetooth module operates using the Bluetooth 2.0+EDR (Enhanced Data Rate) standard, and it has a range of up to 10 meters. The module is designed to work as a slave device, and it can be easily paired with any Bluetooth-enabled device such as smartphones, tablets, laptops, and other microcontroller-based systems. Once paired, the module can be used to establish a wireless serial communication link between two devices, enabling them to exchange data.

Pinout of HC-06

HC-06-Bluetooth-Module-Pinout

Pin configuration

HC-06 module has 6 pins as displayed in the pinout. In them, we only require to use 4 for successfully interfacing the module. Some breakout boards will only leave 4 output pins only because of this reason.

NameFunction
KeyThe pin state determines whether the module works in AT command mode or normal mode[High=AT commands receiving mode(Commandsresponse mode), Low or NC= Bluetooth module normally working]
Vcc+5V Positive supply needs to be given to this pin for powering the module
GNDConnect to ground
TXDSerial data is transmitted by module through this pin (at 9600bps by default), 3.3V logic
RXDSerial data is received by module through this pin (at 9600bps by default),3.3V logic
StateThe pin is connected to the LED on the board to represent the state of the module

Circuit Connections

The LM35 temperature sensor is connected to the A0 analog pin of the Arduino UNO, the HC-06 Bluetooth module is connected to the TX and RX pins of the Arduino UNO, and the 5V battery is connected to the Vin pin of the Arduino UNO.

Circuit Diagram

The following circuit shows you the connection to Measure your home temperature on your smartphone Please make the connection carefully

Measure-your-home-temperature-on-your-smartphone-using-Arduino-circuit

Working Explanations

The LM35 temperature sensor is connected to the Arduino UNO, which reads the temperature data and sends it to the HC-06 Bluetooth module via serial communication. The Bluetooth module then sends the temperature data to the smartphone using Bluetooth communication. The smartphone application created using App Inventor 2 receives the data and displays it on the screen.

Installing Arduino IDE Software

First, you will require to Download the updated version of Arduino IDE Software and Install it on your PC or laptop. if you Learn How to install the Arduino step-by-step guide then click on how to install Arduino Button given Blow

Installing Libraries

Now when you are Ready to upload the code, to the Arduino Board you will need first to add the Following Libraries in Arduino, If you Learn How to add the library in the Arduino step-by-step guide click on how to install the library Button given Blow

Code

//For more Projects: www.arduinocircuit.com

#include <SoftwareSerial.h> 																									
SoftwareSerial HC06(2,3);
// Constants
#define DELAY 1000 // Delay between two measurements in ms
// Parameters
const int sensorPin = A0; // Pin connected to sensor
// Variables
float voltage, temperature;
void setup(void) {
 	Serial.begin(9600);
 	HC06.begin(9600);
}
void loop(void) {
 	voltage= analogRead(sensorPin) * (5.0 / 1023.0); // Convert digital value to voltage
 	temperature=100*voltage; // conversion from V to °C
 	
 	Serial.print("Sensor reading = ");
 	Serial.println(temperature); // the temperature reading
 	// Send voltage and temperature value to app
 	HC06.print(voltage);
 	HC06.print("x");
 	HC06.print(temperature);
 	
 	delay(DELAY); 	
}

Home Measurement App

The Android application created using App Inventor 2 displays the temperature data received from the Arduino UNO. The data is sent as a text, which is then split into individual items based on the separator “x”. The resulting list of items is then displayed on the corresponding labels on the smartphone screen.

Applications

  1. Distance measurement for robotics projects
  2. Parking assistance systems for cars
  3. Liquid level monitoring in tanks
  4. Obstacle detection for security systems
  5. Flow rate measurement in pipes
  6. Object detection for industrial automation
  7. Proximity sensing for interactive displays
  8. Depth measurement for underwater robotics

Conclusion

This project is a simple and effective way to measure the temperature of your home and collect the data on your smartphone. It showcases the integration of different technologies such as Bluetooth communication and smartphone applications, making it an interesting project for beginners in the field of IoT and domotics.

Leave a Comment


error: