Project tutorial
Temperature Monitor with IoT

Temperature Monitor with IoT © GPL3+

Blynk app makes everything easy! Notifications, settings, probe, battery level and more...

  • 47 views
  • 0 comments
  • 0 respects

Components and supplies

Necessary tools and machines

3drag
3D Printer (generic)
09507 01
Soldering iron (generic)
4966285
Solder Wire, Lead Free

Apps and online services

About this project

I am preparing room for my baby. For this reason monitoring room temperature and moisture is really important. Solution is simple;

  • Use DHT11 to get temp and hum values,
  • ESP8266 collects values and sends to the blynk servers
  • AMS117 breakout board regulates power to 3.2 volt coming from lipo
  • Lipo charger charges the lipo
  • DS18B20 measures bath water temperature
  • 10k - 20k voltage divider limits voltage to measure battery level over analog input
  • blnk sends notification to mobile phone and tracks temperature

Code

Arduino IDE CodesArduino
This is esp8266 code
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

#include <dht11.h>
#define DHT11PIN 14
dht11 DHT11;


char auth[] = "uGDn56XGhJS7TkEb0D_gAzkFL66czQDs";
char ssid[] = "y-home";
char pass[] = "Yurdakul9988!";
BlynkTimer timer;


int temp;
int lowTemp;
int hiTemp;
float ambTemp;
float ambHum;

byte notifState = 0;

bool isFirstConnect = true;
BLYNK_CONNECTED() {
  if (isFirstConnect) {
    Blynk.syncAll();
    isFirstConnect = false;
  }
}

void setup()
{

  Blynk.begin(auth, ssid, pass);
  timer.setInterval(60000L, tempSend);
  timer.setInterval(5000L, probeSend);
  timer.setInterval(5000L, notifSend);
  sensors.begin();
}

BLYNK_WRITE(V1) {
  byte value = param.asInt();
  lowTemp = value;
}

BLYNK_WRITE(V2) {
  byte value = param.asInt();
  hiTemp = value;
}

BLYNK_WRITE(V3) {
  byte value = param.asInt();
  notifState = value;
}

void tempSend() {

  int chk = DHT11.read(DHT11PIN);
  ambTemp = (float)DHT11.temperature;
  ambHum = (float)DHT11.humidity;
  Blynk.virtualWrite(V11, ambTemp);
  Blynk.virtualWrite(V12, ambHum);

  // Blynk.setProperty(V0, "color", "#FF0000");
  // Blynk.setProperty(V0, "color", "#00FF00");
}

void probeSend() {
  sensors.requestTemperatures();
  temp = sensors.getTempCByIndex(0);
  Blynk.virtualWrite(V10, temp);
}

void notifSend() {
  if (notifState == 1 && ambTemp >= hiTemp) {
    Blynk.notify("Oda sicakligi cok yusek!");
    delay(300);
    Blynk.virtualWrite(V3, 0);
    notifState = 0;
  }
  if (notifState == 1 && ambTemp <= lowTemp) {
    Blynk.notify("Oda sicakligi cok dusuk!");
    delay(300);
    Blynk.virtualWrite(V3, 0);
    notifState = 0;
  }
}


void loop()
{
  Blynk.run();
  timer.run();
}

Comments

Similar projects you might like

Moisture Monitor - Orchid & Plant IoT w/ Blynk

Project showcase by Mitch K

  • 6,943 views
  • 1 comment
  • 13 respects

An IoT controlled temperature monitor (S1.3)

Project tutorial by greg

  • 1,865 views
  • 0 comments
  • 1 respect

Bluetooth Temperature Monitor

Project tutorial by Federico Vivaldi

  • 11,049 views
  • 8 comments
  • 17 respects

IoT Blink - Getting started with IoT

Project showcase by AppShed Support

  • 8,871 views
  • 1 comment
  • 26 respects

IOT Humidity And Temperature Display

Project tutorial by Patel Darshil

  • 10,514 views
  • 0 comments
  • 21 respects

Jar Temperature Detector and Cooling Fan

Project tutorial by Kutluhan Aktar

  • 1,694 views
  • 0 comments
  • 8 respects
Add projectSign up / Login