Temperature Monitoring System using Bluetooth and Arduino

In this article we create a temperature monitoring system using Bluetooth Arduino and how to cut-off signal for a machine or device when it reaches a threshold value.

For example if the temperature of the machine reaches 50 degree centigrade then cut-off the power so that it cools down and doesn’t get damaged. Even we will see how to change the threshold value of the temperature.

CIRCUIT DIAGRAM

Temperature Sensor Arduino Bluetooth

CONNECTION TABLE

S.N. Arduino HC-05
1. + 5V + 5V
2. GND GND
3. Rx Tx
4. Tx Rx
S.N. Arduino LED
1. 2 Anode
2. GND Cathode
S.N. Arduino LM-35
1. + 5V + 5V
2. GND GND
3. A0 Vout

TEMPERATURE MONITORING SYSTEM USING BLUETOOTH AND ARDUINO CODE

// Set pin number
int device = 2;
int setpoint = 40;

void setup() {
  Serial.begin(9600);
  pinMode(device, OUTPUT);
  Serial.print("Give input of Setpoint");
  delay(2000);
}

void loop() {
  // To check if data is available on Serial port
  if (Serial.available() > 0) {
    // To read a data in integer form from HC05 via serial communication protocol
    setpoint = Serial.parseInt();
    Serial.print("Set Point Changed: ");
    Serial.println(setpoint);
  }
  int temperature = analogRead(A0);
  temperature = map(temperature, 0, 1023, 0, 500);
  Serial.print("Temperature = ");
  Serial.println(temperature);

  if (temperature <= setpoint) {
    digitalWrite (device, HIGH);
    Serial.println("Device is on");
  }
  else if (temperature > setpoint) {
    digitalWrite (device, LOW);
    Serial.println("Device is off");
  }
  delay(1000);
}

With the help of this sketch, you can control the industrial motor and domestic fan. Here we set a setPoint of temperature as 40 degree initially but you can change it from the mobile app.

Arduino MCU will receive that setpoint via HC05 Bluetooth module and save it until power is on. And MCU will compare real time temperature received from the temperature sensor, connected on A0 pin with setpoint, as per condition satisfied, output device will get turned ON or turned OFF.

OUTPUT

When the temperature reaches setPoint (threshold value) or cross the value device connected on pin 2 will be turned off and as it reaches below the setPoint it will again turn it ON. You can change conditions according to your convenience like, turn on if the temperature is five less than setPoint (else if (temperature <= setPoint – 5)).

output temperature setpoint


READ NEXT
BLUETOOTH CONTROLLED ROBOT CAR USING ARDUINO


 

4 1 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x