Ian

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

DIGITAL THERMOMETER WITH ALARM

A lot of establishments today used air conditioning systems to provide a cool air in their buildings. These air conditioners continue to provide a cool air depending on the temperature set by the user. It is necessary to monitor the room temperature containing these air conditioners in order to set the temperature properly to an essential temperature. The device presented will be effective in monitoring the temperature level within a room as it will display the temperature reading from the sensor. It also contains an alarm that will trigger if the temperature drops below the threshold temperature. The alarm can be turned off by pressing the push button. The buzzer will continue to alarm again after some minutes if the temperature remains below the threshold temperature. EQUIPMENTS Gizduino The Gizduino is a microcontroller board based on the ATmega328 and ATmega 168. It has 14 digital input/output pins and 6 analog inputs. It is an open source computing platform based on a simple input/output (I/O) board and the use of standard programming language. It is a tool for implementing a program designed. Gizduino is programmed using the IDE (Integrated Development Environment).

Figure 1 Gizduino Microcontroller

Liquid Crystal Display An LCD or liquid crystal display is a type of flat panel display commonly used in

digital devices, for example: digital clocks, appliance displays, and portable computers. A simple monochrome LCD display has two sheets of polarizing material with a liquid crystal solution sandwiched between them. Electricity is applied to the solution and causes the crystals to align in patterns. Each crystal, therefore is either opaque or transparent, forming the numbers or text that we can read.

Figure 2 LCD Display LM35 Sensor The LM35 is an integrated circuit sensor that can be used to measure temperature with an electrical output proportional to the Centigrade temperature (in
o

C)

Figure 3 LM35 Sensor Piezoelectric Buzzers The piezo buzzer produces sound based on reverse of the piezoelectric effect. The generation of pressure variation or strain by the application of electric potential

across a piezoelectric material is the underlying principle. These buzzers can be used alert a user of an event corresponding to a switching action, counter signal or sensor input. They are also used in alarm circuits

Figure 4 Piezoelectric Buzzer Potentiometer

Figure 5 Potentiometer The potentiometer is used in adjusting the contrast of the LCD Display depending on the desires of the user.

10kohm resistor Pushbutton

WIRING DIAGRAM The wiring diagram shows the relation and connections of each components used in the device using the breadboard

Figure 6 Wiring Diagram CONNECTION PROCEDURES Connect pin16 of the LCD to ground, and pin15 to +5V Connect one side of the potentiometer to +5V and the other side to GND. The middle pin connects to pin3 of the LCD Pin1 connects to ground and pin2 connects to +5V. Connect pin5 of the LCD to ground. This pin is the R/W pin which determines whether we will be reading from or writing to our LCD module. Logic level low (ground) means we are writing to the LCD, which is all we will be doing, hence we can simply tie it to ground. Connect the LCDs pin4, the register select (RS) pin, to the Arduinos digital pin7.

Connect the LCDs pin6, the Enable (EN) pin, to the Arduinos digital pin8. We will be using DB7, DB6, DB5, and DB4. Connect LCD pins14,13,12 and 11 to Arduino digital pins12,11,10, and 9 respectively. Pin1 and pin3 connect to the +5V rail and GND rail, respectively. Connect pin2 to the analog0 input on the Arduino. Connect the other wire to digital pin13 on your Arduino. This pin is connected to the LED on the Arduino, so we can utilize that as a flashing light to complement our alarm.

Connect the pushbutton in series with 10kohm resistor to digital pin 6

LCD pin name Arduino pin #

RS 7

EN DB4 DB5 DB6 DB7 8 9 10 11 12

Table1: LCD Pin Configuration

PROGRAM CONFIGURATIONS #include <LiquidCrystal.h> LiquidCrystal lcd(7,8,9,10,11,12); const int inPin=3; int pinSpeaker = 13; int interval = 750; int threshTemp = 24;//24 Celsius alarm int frequency = 500; int duration = 750;

int pinSwitch = 6; float celsius; unsigned long int printTime=0; unsigned long int buzzTime=0; unsigned long old_time; unsigned long cpr_time; unsigned long off_time; void setup() { lcd.begin(16, 2); pinMode(pinSpeaker, OUTPUT); pinMode(pinSwitch, INPUT); off_time = 120000;//=2 minutes } void loop() { int state=digitalRead(pinSwitch); if(millis() - printTime > interval) { int value= analogRead(inPin); lcd.setCursor(0, 1); celsius = (value*0.4882812); float fahrenheit = ((celsius*9/5)+32); lcd.clear(); lcd.setCursor(0,0); lcd.print("BS ECE 5A"); lcd.setCursor(0, 1);

lcd.print(celsius); lcd.print((char)223); lcd.print("C "); lcd.print(fahrenheit); lcd.print((char)223); lcd.print("F"); printTime = millis(); } { if(celsius<=threshTemp && state==LOW && millis() - buzzTime > duration) { playTone(duration,frequency); buzzTime = millis(); } if(celsius<=threshTemp && state==HIGH && millis() - buzzTime > duration) { digitalWrite(pinSpeaker, LOW); old_time = millis(); cpr_time = millis() - old_time; while (cpr_time < off_time) { cpr_time = millis() - old_time; if(millis() - printTime > interval) {

int value= analogRead(inPin); lcd.setCursor(0, 1); celsius = (value*0.4882812); float fahrenheit = ((celsius*9/5)+32); lcd.clear(); lcd.setCursor(0,0); lcd.print("BS ECE 5A"); lcd.setCursor(0, 1); lcd.print(celsius); lcd.print((char)223); lcd.print("C "); lcd.print(fahrenheit); lcd.print((char)223); lcd.print("F"); printTime = millis(); } } } } } void playTone(long dur, int freq) { dur *= 1000;

int period = (1.0 / freq) * 1000000; long elapsed_time = 0; // last condition (in next statement) is to allow for disabling buzzer while buzzing while (elapsed_time < dur && digitalRead(pinSwitch)!=HIGH) { //Pulse train signal digitalWrite(pinSpeaker,HIGH); delayMicroseconds(period / 2); digitalWrite(pinSpeaker, LOW); delayMicroseconds(period / 2); elapsed_time += (period); } }

OUTPUT OF THE DEVICE

Figure 7 Internal Appearance of the Device

Figure 8 Outside Appearance of the Device Figure 7 and 8 shows the internal and external look of the device. The latter shows the device reads the temperature at 23.93 Degrees Celsius. The device is powered by 4 AA Battery. It is set to display the temperature at Centigrade and Fahrenheit measurements. The alarm is programmed to trigger if the detected temperature drops below 25 degrees Celsius. Pressing the pushbutton will stop the buzzer. It will continue to alarm again if the temperature remains below 25 degrees Celsius. REFERENCES http://blog.wellsb.com/post/1328196426/arduino-lcd-thermometer-with-optional-alarm http://www.e-gizmo.com http://inventors.about.com/od/lstartinventions/a/LCD.htm http://www.engineersgarage.com/electronic-components/piezo-buzzer http://www.ece.usu.edu/ece_store/spec/lm35dt-3p.pdf

Lyceum of the Philippines University Batangas College of Engineering

DIGITAL THERMOMETER WITH ALARM

Presented by: Mark Christopher C. Alcantara Paul Carlo G. Casimbon Ada Beatrice Suzette M. Catapanag

Christian P. Cuevas Nanette D. Ibon Janine Ayla I. Pilobello Lovely Rikka A. Sison

You might also like