Diana Khalipina
Published

Health Kit: Humidity and Temperature Control

An Android app-controlled, Arduino-based kit that receives and analyzes humidity and temperature data.

IntermediateFull instructions provided2 hours22,873
Health Kit: Humidity and Temperature Control

Things used in this project

Hardware components

DHT22 Temperature Sensor
DHT22 Temperature Sensor
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
LED (generic)
LED (generic)
×2
Arduino UNO
Arduino UNO
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Android device
Android device
×1
Resistor 10k ohm
Resistor 10k ohm
×1
Breadboard (generic)
Breadboard (generic)
×1
USB-A to B Cable
USB-A to B Cable
×1

Software apps and online services

MIT App Inventor
MIT App Inventor
Arduino IDE
Arduino IDE

Story

Read more

Custom parts and enclosures

Mobile app for temperature and humidity control

Here is ready app for those who'd like to skip Step2 :)

Schematics

Curcuit for arduino

Step 1. Connect all the parts the way it is shown on the circuit diagram

Wiring of arduino and breadboard

That's how it should look like :) Don't forget to download Arduino IDE and paste the code (attached in the last part of this tutorial).

Construction of mobile app. part 1

Step 2. Creation of an app to get the data via bluetooth to android device. I used MIT App inventor to make it.

Construction of mobile app. part 2

Construction of mobile app. part 3

Working app. part 1

Step 3. Get data through app!

Working app. part 2

Working app. part 3

Working app. part 4

Working app. part 5

Working app. part 6

Code

Code for arduino

Arduino
That's the code for analysis of the data from the sensors about temperature and humidity
#include <SoftwareSerial.h>
#include <cactus_io_AM2302.h>

#define AM2302_PIN 7 


AM2302 dht(AM2302_PIN);
int LED_RED = 13;
int LED_GREEN = 12;

SoftwareSerial Bluetooth(10, 9);

void setup() {
  Bluetooth.begin(9600);
  Serial.begin(9600);
  dht.begin();
  Bluetooth.println("Ready for command...");
  pinMode(LED_RED, OUTPUT);
  pinMode(LED_GREEN, OUTPUT);
}

void loop() {

  dht.readHumidity();
  dht.readTemperature();
  if (isnan(dht.humidity) || isnan(dht.temperature_C)) {
    return;
  }

  if ((dht.temperature_C <= 20.00) || (dht.humidity <= 40.00)){

    digitalWrite(LED_GREEN, 0);
    digitalWrite(LED_RED, 1);
    Bluetooth.println("Low temperature/humidity");

    Serial.print(dht.humidity); Serial.print(" %\t\t");
    Serial.print(dht.temperature_C); Serial.println(" *C\t");
    Bluetooth.print(dht.humidity); Bluetooth.print(" %\t\t");
    Bluetooth.print(dht.temperature_C); Bluetooth.println(" *C\t");

  }
  
  if ((dht.humidity >= 60.00) || (dht.temperature_C >= 25.00)){

    digitalWrite(LED_GREEN, 0);
    digitalWrite(LED_RED, 1);
    Bluetooth.println("High level of humidity/temperature");

    Serial.print(dht.humidity); Serial.print(" %\t\t");
    Serial.print(dht.temperature_C); Serial.println(" *C\t");
    Bluetooth.print(dht.humidity); Bluetooth.print(" %\t\t");
    Bluetooth.print(dht.temperature_C); Bluetooth.println(" *C\t");

  }


  else {
    
    digitalWrite(LED_RED, 0);
    digitalWrite(LED_GREEN, 1);
    Bluetooth.println("Comfortable level of humidity and temperature");

    Serial.print(dht.humidity); Serial.print(" %\t\t");
    Serial.print(dht.temperature_C); Serial.println(" *C\t");
    Bluetooth.print(dht.humidity); Bluetooth.print(" %\t\t");
    Bluetooth.print(dht.temperature_C); Bluetooth.println(" *C\t");
  }
  
  delay(1500);

}

Credits

Diana Khalipina

Diana Khalipina

22 projects • 93 followers
Integrating Web Accessibility in Healthcare Tech | Web Developer & Bioengineering Specialist in Paris | MSc in Biomedical Engineering

Comments