Monitoring temperature rumah dengan display lcd dan recording

26
MONITORING TEMPERATURE RUANGAN DENGAN DISPLAY LCD DAN RECORDING MOCH. REZKI SELAMET MOKH IMAM NUGROHO SITI HARYANI YUDA WARDIANA D3-Teknik Refrigerasi Dan Tata Uadara Politeknik Negeri Bandung 2B

Transcript of Monitoring temperature rumah dengan display lcd dan recording

Page 1: Monitoring temperature rumah dengan display lcd dan recording

MONITORING TEMPERATURE RUANGAN DENGAN DISPLAY LCD

DAN RECORDING

MOCH. REZKI SELAMET

MOKH IMAM NUGROHO

SITI HARYANI

YUDA WARDIANA

D3-Teknik Refrigerasi Dan Tata UadaraPoliteknik Negeri Bandung

2B

Page 2: Monitoring temperature rumah dengan display lcd dan recording

LATAR BELAKANG

Dalam suatu pengukuran temperature kita biasanya menunggu guna memperoleh data tiap menit. Tetapi kadang kala kita selalu meniggalkan pengukuran karena ada kegiatan lain yang sama penting. Karna itu alat ini dibuat untuk menyimpan data temperature supaya data pengukuran tersimpan walaupun kita tinggalkan.

Page 3: Monitoring temperature rumah dengan display lcd dan recording

TUJUAN

Dapat mengetahui suhu ruangan yang terukur

Dapat menyimpan data temperature

Dapat mengetahui perubahan suhu ruangan

Dapat menganalisis data yang tersimpan guna keperluaan akademik

Page 4: Monitoring temperature rumah dengan display lcd dan recording

DESKRIPSI ALAT

Alat ini mempunyai 4 buah sensor LM35 yang ditempatkan pada tiap sudut ruangan ditampilkan pada display LCD dan di record oleh arduino uno. Penyimpanan data dengan micro sd module shield dan di simpan oleh memori micro sd menit permenit temperaturenya. Data yang disimpan oleh micro sd module berbentuk .txt(notepad).

Page 5: Monitoring temperature rumah dengan display lcd dan recording

Alat Dan Bahan

Arduino Uno

Page 6: Monitoring temperature rumah dengan display lcd dan recording

LM 35 LM35 TEMPERATURE SENSOR IS ONE TYPE OF

SENSOR THAT CONVERTS ELECTRICAL QUANTITIES TO THE TEMPERATURE SCALE IN THE FORM OF VOLTAGE. LM35 HAS 3 PIECES PIN LEGS, PIN TO INPUT POSITIVE VOLTAGE (+), PIN OUTPUT, INPUT PIN NEGATIVE VOLTAGE / GND (-).

Page 7: Monitoring temperature rumah dengan display lcd dan recording
Page 8: Monitoring temperature rumah dengan display lcd dan recording

LM 35

HOW the LM 35 measure???

Can operate at a voltage of 4 volts to 30 volts. Each temperature of 1 degree Celsius will show a voltage of 10 mV.

equation:

Vout = 10 mV / 1ºC

That is, if the read voltage Vout = 500 mV, then the temperature = 500mv / 10mV = 50ºC.

Page 9: Monitoring temperature rumah dengan display lcd dan recording

35 ºC

Vout = 10 mV / 1ºC

That is, if the read voltage Vout = 500 mV, then the temperature = 500mv / 10mV = 50ºC.

EXAMPLE

Page 10: Monitoring temperature rumah dengan display lcd dan recording

Arduino use sensor LM 35

Read the output of LM35 goes into analog pin, Read data already in the form of ADC conversion

        Converting ADC = Vout / Vref * 1023

        So it's not in the form of voltage magnitude again If you want to know the LM35 output voltage using the formula above:

    

Read voltage = Conversion ADC voltage reference * / 1024

Page 11: Monitoring temperature rumah dengan display lcd dan recording

MICRO SD SHIELD

The module (MicroSD Card Adapter) is a Micro  SD card reader module, and the SPI interface via the file system driver,  microcontroller system to complete the Micro SD card read and write files.  Users can directly use the Arduino IDE comes with an SD card to complete  the library card initialization and read-write

Page 12: Monitoring temperature rumah dengan display lcd dan recording

Features: Support Micro SD Card, Micro SDHC card  (high-speed card) The level conversion circuit board that can  interface level is 5V or 3.3V Power supply is 4.5V ~ 5.5V, 3.3V voltage  regulator circuit board Communication interface is a standard SPI  interface 4 M2 screw positioning holes for easy  installation Control Interface: A total of six pins (GND,  VCC, MISO, MOSI, SCK, CS), GND to ground, VCC is the

power supply, MISO, MOSI,  SCK is the SPI bus, CS is the chip select signal pin; 3.3V regulator circuit: LDO regulator output  3.3V as level converter chip, Micro SD card supply Level conversion circuit: Micro SD card into  the direction of signals into 3.3V, MicroSD card toward the

direction of the  control interface MISO signal is also converted to 3.3V, general AVR  microcontroller system can read the signal

Micro SD card connector: yes since the bomb  deck for easy card insertion and removal Positioning holes: 4 M2 screws positioning  hole diameter of 2.2mm, the module is easy to install

positioning, to achieve  inter-module combination

Mirco SD Card Interface Module :(the last picture show) -Control Interface : A total of six pins (GND,  VCC, MISO, MOSI, SCK, CS), GND to ground , VCC is the

power supply , MISO, MOSI,  SCK is SPI bus , CS is the chip select signal pin 3.3V voltage regulator circuit : LDO regulator  output is 3.3V level converter chip , Micro SD card

supply Level conversion circuit : Micro SD card into  the direction of the signal is converted to 3.3V, MicroSD

card interfaces to  control the direction of the MISO signal is also converted into 3.3V, general  AVR microcontroller system can read the signal ;

Micro SD card connector : a self- bomb deck ,  easy card insertion . Positioning holes : 4 M2 screws positioning  hole diameter is 2.2mm, the positioning of the module is

easy to install , to  achieve inter- module combination ;

Page 13: Monitoring temperature rumah dengan display lcd dan recording

LCD AND BACKPACKThis is another great LCD display

compatible with I2C bus and  Gadgeteer modules. With limited pin resources, your project will quicly run out of resources using normal LCDs. With this I2C interface LCD module, you only need 2 lines (I2C)to display the information.If you already have I2C devices in your project, this LCD module actually cost no more resources at all. The adress can be set from 0x20-0x27.Fantastic for Arduino or gadgeteer based projects.

Page 14: Monitoring temperature rumah dengan display lcd dan recording

Specifications LCD•Supply voltage: 5V•I2C Address:0x20-0x27(0x20 default)•Back lit (Blue with white char color)•Interface:I2C/TWI x1,Gadgeteer interface x2•Adjustable contrast•Size:82x35x18 mm

Specifications Bacpack PCF8574 • Compatible With Most Microcontrollers• Low Standby-Current Consumption10 mA Max • Latched Outputs With High-Current Drive• I2C to Parallel-Port Expander Capability for

Directly Driving LEDs• Open-Drain Interrupt Output • Latch-Up Performance Exceeds 100 mA Per JESD 78, Class II

Page 15: Monitoring temperature rumah dengan display lcd dan recording

RTC DS1302

A Real Time Clock Module with battery backup using the easy to use DS1302 chip. The DS1302 chip uses a simple serial interface (see datasheet) and example code is available for Arduino, Raspberry Pi and many others.

Page 16: Monitoring temperature rumah dengan display lcd dan recording

Features

Real-Time Clock Counts Seconds, Minutes, Hours, Date of the Month, Month, Day of the Week, and Year with Leap-Year Compensation Valid Up to 2100

Serial I/O for Minimum Pin Count

2.0V to 5.5V Full Operation

Uses Less than 300nA at 2.0V

Single-Byte or Multiple-Byte (Burst Mode) Data Transfer for Read or Write of Clock or RAM Data

Board Size: 44mm x 24mm

Page 17: Monitoring temperature rumah dengan display lcd dan recording

Desain Project

Page 18: Monitoring temperature rumah dengan display lcd dan recording

LANGKAH MERANGKAI

Siapkan alat dan bahan termasuk wadah misting

Wadah misting lubangi untuk keperluan shield micro sd dan arduino

Buat jalur rangkaian pcb untuk pembagian tegangan dan konektor pin arduino

Rangkai seperti gambar

Up load script data pada arduino.

Page 19: Monitoring temperature rumah dengan display lcd dan recording

SCRIPT ARDUINO#include <Wire.h>

#include <LiquidCrystal_I2C.h>

#include <SD.h>

#include <DS1302.h>

File myFile;

LiquidCrystal_I2C lcd(0x27, 16,2);

float tempc;

float tempc1;

float tempc2;

float tempc3;

int tempin = 0;

int tempin1 = 1;

int tempin2= 2;

int tempin3 = 3;

int a=1;

int b;

DS1302 rtc(2, 3, 5);

Page 20: Monitoring temperature rumah dengan display lcd dan recording

void setup()

{

lcd.begin();

Serial.begin(9600);

while (!Serial) {

; // wait for serial port to connect. Needed for Leonardo only

}

Serial.print("Initializing SD card...");

// On the Ethernet Shield, CS is pin 4. It's set as an output by default.

// Note that even if it's not used as the CS pin, the hardware SS pin

// (10 on most Arduino boards, 53 on the Mega) must be left as an output

// or the SD library functions will not work.

pinMode(10, OUTPUT);

if (!SD.begin(4)) {

Serial.println("initialization failed!");

return;

}

rtc.halt(false);

rtc.writeProtect(false);

}

Page 21: Monitoring temperature rumah dengan display lcd dan recording

void loop()

{

tempc= analogRead(tempin);

tempc= (5*tempc*100)/1024;

tempc1= analogRead(tempin1);

tempc1= (5*tempc1*100)/1024;

tempc2= analogRead(tempin2);

tempc2= (5*tempc2*100)/1024;

tempc3= analogRead(tempin3);

tempc3= (5*tempc3*100)/1024;

b=a++;

lcd.backlight();

lcd.setCursor(0,0);

lcd.print(b);

Page 22: Monitoring temperature rumah dengan display lcd dan recording

lcd.setCursor(3,0);

lcd.print(tempc,1);

lcd.setCursor(10,0);

lcd.print(tempc1,1);

lcd.setCursor(3,1);

lcd.print(tempc2,1);

lcd.setCursor(10,1);

lcd.print(tempc3,1);

Serial.println("initialization done.");

myFile = SD.open("T1A1.txt", FILE_WRITE);

if (myFile)

{

Serial.print("Writing to T1A1.txt...");

Page 23: Monitoring temperature rumah dengan display lcd dan recording

myFile.println(rtc.getDOWStr());

myFile.println(" ");

myFile.println(rtc.getDateStr());

myFile.println(" -- ");

myFile.println(rtc.getTimeStr());

myFile.println("T('C)= ");

myFile.println(tempc);

myFile.print("T1 ('C)= ");

myFile.println(tempc1);

myFile.print("T2 ('C)= ");

myFile.println(tempc2);

myFile.print("T3 ('C)= ");

myFile.println(tempc3);

myFile.println("---------------------------------------------------");

myFile.close();

Serial.println("done.");

}

Page 24: Monitoring temperature rumah dengan display lcd dan recording

else

{

Serial.println("error opening T1A1.txt");

}

myFile = SD.open("T1A1.txt");

if (myFile) {

Serial.println("T1A1.txt:");

while (myFile.available()) {

Serial.write(myFile.read());

}

myFile.close();

} else {

Serial.println("error opening T1A1.txt");

}

delay(5000);

}

Page 25: Monitoring temperature rumah dengan display lcd dan recording

LANGKAH PENGUJIAN DAN DATA PENGUJIAN

Page 26: Monitoring temperature rumah dengan display lcd dan recording

KESIMPULAN DAN SARAN

Data temperature lm35 yang terbaca oleh arduino harus di ubah ke ADC supaya bisa terukur suhunya oleh arduino.

Data yang tersimpan oleh shield micro sd berupa txt(notepad)

Backpack yang terpasang pada lcd berguna untuk memperkecil pin pada lcd

Saran

Untuk mempermudah sambungan pin dan untuk menempel dengan benar seharusnya dipasan terminal untuk memperkuat sambungan