--> Project II - 1.Digital Thermometer with 4 Channel (Arduino Based) | basic arduino tutorial

Monday, August 7, 2017

Project II - 1.Digital Thermometer with 4 Channel (Arduino Based)

| Monday, August 7, 2017
Digital Thermometer with 4 Channel



Read the temperature with 4 temperature sensor and the result is shown to 2x16 LCD. Type of sensor used is LM35 with temperature reading range 0 -100 degrees C.

Hardware Requirement
  • 4 Temperature Sensor LM35
  • Arduino UNO
  • LCD 2x16 Module
  • Power supply +5 Volt


LM35 Temperature Sensor | Source
https://www.tokopedia.com/mikroholik



Block Diagram

Schematic
 Arduino - LCD Wiring

Arduino - LM35 Temperature Sensor Wiring


Source Code/Sketch


#include <LiquidCrystal.h>
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
int adc; 
int suhu1, suhu2, suhu3, suhu4;

void setup()
{   
  lcd.begin(16, 2);
  lcd.print("MONITORING SUHU");
  lcd.setCursor(0, 1);
  lcd.print("4 CH dg ARDUINO");     
  delay(2000);
  
  lcd.clear();
  lcd.print("S1:      S2:   ");
  lcd.setCursor(0, 1);
  lcd.print("S3:      S4:   ");  
  
  Serial.begin(9600);
}


void loop()
{
  adc = analogRead(0); 
  suhu1 = adc*0.032;   
  delay(200);
  adc = analogRead(1); 
  suhu2 = adc*0.032;   
  delay(200);
  adc = analogRead(2); 
  suhu3 = adc*0.032;   
  delay(200);
  adc = analogRead(3); 
  suhu4 = adc*0.032;   
  delay(200);
  
  lcd.setCursor(3,0);
  lcd.print(suhu1);
  lcd.print("C ");
  lcd.setCursor(12,0);
  lcd.print(suhu2);
  lcd.print("C ");
  lcd.setCursor(3,1);
  lcd.print(suhu3);
  lcd.print("C ");
  lcd.setCursor(12,1);
  lcd.print(suhu4);
  lcd.print("C ");
  
  Serial.print(suhu1);
  Serial.print('A');
  Serial.print(suhu2);
  Serial.print('B');
  Serial.print(suhu3);
  Serial.print('C');
  Serial.print(suhu4);
  Serial.print("D#");
  delay(200);             
}


How it Works


1. Connect the Arduino with Peripherals needed
2. Plug in the Power Source on the device
3. Compile and upload the script program above to your arduino

4. On the lcd you'll see the opening text like this



5. After 2 second the data from temperature sensor will shown in one layer




Video for Project II - 1.Digital Thermometer with 4 Channel (Arduino Based)





Download the required file.

Related Posts

No comments:

Post a Comment