Download presentation
Presentation is loading. Please wait.
Published byLeslie Arnold Modified over 9 years ago
1
Youn-Hee Han, In-Seok Kang {yhhan, Iseka}@kut.ac.kr Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology http://link.kut.ac.kr Ubiquitous Computing Practice ( Humidity Sensor )
2
/ 28 Introduntion Humidity Sensor Print Humidity TMP36 + Humidity Sensor Fritzing 2 Contents.
3
/ 28 Digital Pin 14 개의 Digital Input / Output Pin 6 개의 PWM Pin 사용가능 (3, 5, 6, 9, 10, 11 pin) digitalWrite() - LED digitalRead() - pushbutton 3 Arduino Pin
4
/ 28 analogWrite() ex) analogWrite(PinNumber, value); 4
5
/ 28 Analog Pin 6 개의 Analog Input Pin analogRead() ex) analogRead(PinNumber) 센서의 값을 읽기 위해 사용 5
6
/ 286 Introduction
7
/ 287 Humidity Sensor Humidity Sensor - HIH-4030 Breakout Features : - Near linear, analog output - 4-5.8VDC voltage supply - All pins broken out to a 0.1" pitch header - Laser trimmed interchangeability - Low power design, typical current draw of only 200μA - Enhanced accuracy - Fast response time - Stable, low drift performance
8
/ 28 상대습도 상대습도는, 특정한 온도의 대기 중에 포함되어 있는 수증기의 압력을 그 온도의 포화 수증기 압력으로 나눈 것을 말한다. 다시 말해, 특정한 온도의 대기 중에 포함되어 있는 수증기의 양 ( 중량 절대습도 ) 을 그 온도의 포화 수증기량 ( 중량 절대습도 ) 으로 나눈 것이다. 온도 대기 압력 포화 수증기량 절대습도 중량 절대습도 용적 절대습도 8 습도
9
/ 289 schematic
10
/ 2810 Data sheet
11
/ 28 PRINT HUMIDITY 11
12
/ 28 Voltage output Vout =( Vsupply ) 0.0062(sensorRH) + 0.16 ) sensorRH =( Vout/Vsupply ) × ( 1/0.0062 )- 0.16 × ( 1/0.0062 ) 센서의 출력 전압 Vout = Vsupply × ( 아날로그 입력 값 /1024 ) Vout / Vsupply = ( 아날로그 입력 값 / 1024) SensorRH = ( 아날로그 입력 값 /1024) X (1/0.0062) – 0.16 X (1/0.0062) 12 Humidity
13
/ 2813 Humidity
14
/ 2814 schematic
15
/ 2815 Sketch float vdd = 5.0; int indata; float sRH; void setup() { Serial.begin(9600); } void loop() { indata = analogRead(0); // pin number 0 sRH = (indata/1024.0)/0.0062-0.16/0.0062; Serial.println(sRH); delay(1000); }
16
/ 2816 Result
17
/ 28 TEMPERATURE + HUMIDITY 17
18
/ 28 Temperature compensation RH = sensorRH / ( 1.0546 - 0.00216 × T ) T = Temperature 18 Temperature + humidity
19
/ 2819 Temperature + humidity
20
/ 2820 schematic
21
/ 2821 float vdd = 5.0; int indata0, indata1; float sRH; float RH; float voltage; float temperatureC; void setup() { Serial.begin(9600); } Sketch
22
/ 2822 Sketch void loop() { indata0 = analogRead(0); // pin number 0 (analog) sRH = (indata0/1024.0)/0.0062-0.16/0.0062; indata1 = analogRead(1); // pin number 1 (analog) voltage = indata1*5.0/1024.0; temperatureC = (voltage - 0.5) * 100; Serial.print(temperatureC); Serial.println(" 'C"); RH=sRH/(1.0546-0.00216*temperatureC); Serial.print(RH); Serial.println(" RH"); Serial.println("----"); delay(1000); }
23
/ 2823 Result
24
/ 28 도전과제 24
25
/ 28 온도, 조도, 습도 센서의 값을 출력해보자. 25 도전과제
26
/ 28 FRITZING 26
27
/ 28 Fritzing 27 http://fritzing.org/
28
/ 2828 Thank You
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.