Weekend Project Clock Date Thermometer and Humidity With Arduino Mega

Guys, I wanna share my weekend project on creating a clock with humidity and temperature sensor,
It's using DHT11 sensor, RTC DS1307, LCD 16x2 and Arduino Mega 2560,

Keep reading and good luck

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Prepare All the Parts Needed.....

In this experiment I need to use this parts :

1. Arduino Mega 2560 board
2. RTC DS1307
3. LCD 16 x 2
4. DHT11 sensor
5. 4K7 Resistor
6. 10K trimpot for LCD brightness

Step 2: Connection to Arduino Board :

Here's the connection to arduino board :
//init DHT11 sensor
#define DHT11_PIN 6

// Init the DS1307
DS1307 rtc(20, 21);

// Init the LCD
//LiquidCrystal lcd(22, 24, 26, 28, 30, 31);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

Step 3: The Main Loop for Displaying .....

Here's the main loop for displaying, I used Arduino 022..

void loop()
{
  // Display time centered on the upper line
  //lcd.setCursor(4, 0);
  //Read the temperature and humidity
   int chk = DHT.read11(DHT11_PIN);
  lcd.setCursor(0, 0);
  lcd.print(rtc.getTimeStr());
  //Read temp sensor
   double temp = Thermister(analogRead(0));  // Read sensor
   //Read Humidity
   //DHT.humidity,1
   //Read Temperature
   //DHT.temperature,1
   //print screen
   lcd.setCursor(9,0);
  //lcd.print(temp);
   lcd.print(DHT.temperature,0);
   lcd.print("C");
  //Display Humidity
   lcd.setCursor(13,0);
   lcd.print(DHT.humidity,0);
   lcd.print("%");
 
  // Display abbreviated Day-of-Week in the lower left corner
  lcd.setCursor(0, 1);
  lcd.print(rtc.getDOWStr(FORMAT_SHORT));
 
  // Display date in the lower right corner
  //lcd.setCursor(6, 1);
  lcd.setCursor(3, 1);
  lcd.print(",");
  lcd.setCursor(4, 1);
  lcd.print(rtc.getDateStr());

Step 4: Test and Enjoy My Project.....

Test and enjoy my project.....
Let's watch the video...


Thanks for reading and good luck for your experiment.....
Epilog Challenge V

Participated in the
Epilog Challenge V

Pocket Sized Electronics

Participated in the
Pocket Sized Electronics

Be the First to Share

    Recommendations

    • Assistive Tech Contest

      Assistive Tech Contest
    • Reuse Contest

      Reuse Contest
    • Made with Math Contest

      Made with Math Contest

    6 Discussions

    0
    None
    dancopy

    11 months ago

    sketch_dec17a:56: error: 'Thermister' was not declared in this scope

    0
    None
    dancopy

    11 months ago

    Does it work with the current IDE of Arduino Uno? Thank you

    use

    lcd.print((char)223); //degree sign
    lcd.print("C"); to display degree C ;)

    0
    None
    princenk007

    5 years ago on Introduction

    Hi, Very nice project. Keep up. Can you please help me too? Based on this instructable : https://www.instructables.com/id/Environmental-Mushroom-Control-Arduino-Powered/ I have an arduino code written by anthony to control relays for humidifier and heater used with sensor dht22. can you modify the code to use with sensirion sensor - sht75? Thank you.

    0
    None
    Bay Yolal

    5 years ago on Introduction

    How could we connect LCD's connection to Arduino? How; that you didn't show us.

    0
    None
    mweaver8

    6 years ago

    is there a place that we may get the code?