0431-4340778, 07639385448 [email protected]


INTRODUCTION:

After several months “Out of Stock”, DS1307 RTC module has a big upgrade. It comes with a Gravity IIC interface, and the size is also reduced to fit miniaturization application. Gravity I2C DS1307 RTC module is a easy-to-use Real Time Clock module. It is cheap and affordable in most applications such as time clock, data logger, etc.. The new version DS1307 RTC module adopts high precision crystal oscillator which reduces time error dramatically. The test conducted shows the time error is only about 1 second in 24 hours (the average time error of Mechanical Watches is about 20s). The module is powered by single cell CR1220 (service life: 3~5 years). It is smaller and keeps EEPROM 4KB ROM to record information related to alarm clocks and events. Besides, you can set the IIC address by resistance adjustment. The Gravity DS1307 RTC module uses Gravity I2C interface and you can plug it on the DFRobot Gravity IO expansion shield directly. Cooperate with Arduino DS1307 library developed by DFRobot, it is easy to realize functions like setting time and time display. It can be widely used in DA (Data Acquisition).

What is Real Time Clock?

Real Time Clock or RTC is a system that keeps track of the current time and can be used in any device which needs to keep accurate time.

You can also keep tracking the exact time without using RTC systems, but RTCs have some important advantages. Here are some of these advantages:

  • Low power consumption
  • Releasing system time from time calculation (this feature is critical because in many cases CPU is operating some delicate tasks like receiving sensors data. and if you don’t use RTC, CPU also has to keep track of the time and it can disrupt processors main tasks.)
  • High accuracy

DS1307 Module Feature & Specifications

DS1307 module is one of the most affordable and common RTCs modules. It can accurately keep track of seconds, minutes, hours, days, months, and years.

Some of the DS1307 important features are:

  • Ability of Generating Programmable Square-Wave
  • Low Current Use; under 500nA in Battery Backup mode
  • The Ability to Set the Date Up to Year 2100
  • I2C Serial Interface

Coding:

#include<LiquidCrystal.h>

#include “RTClib.h”

#include<EEPROM.h>

LiquidCrystal lcd(2,3,4,5,6,7);

RTC_DS1307 rtc;

#define load  8

#define count 13

#define mode  9

#define inc   10

#define dec   11

#define enter 12

char daysOfTheWeek[7][12] = {“Sun”, “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, “Sat”};

long int mod=0,sthour,sphour,stminute,spminute,decr,enter1,counttime=0,sthour2,stminute2,sphour2,spminute2;

long int calling,calling2;

void setup() 

{

  pinMode(load,OUTPUT);

  pinMode(mode,INPUT);

  pinMode(inc,INPUT);

  pinMode(dec,INPUT);

  pinMode(enter,INPUT);

  lcd.begin(16,2);

 Serial.begin(9600);

 rtc.begin(); 

  if (! rtc.begin()) 

  {

    Serial.println(“Couldn’t find RTC”);

    while (1);

  }

  if (! rtc.isrunning()) 

  {

    Serial.println(“RTC is NOT running!”);

  }

    //rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));//auto update from computer time

 lcd.clear();

 lcd.setCursor(5,0);

 lcd.print(“Welcome “);

 delay(1000);

 lcd.clear();

}

void loop() // put your main code here, to run repeatedly:

{

  sthour   = EEPROM.read(1);

  stminute = EEPROM.read(2);

  sphour   = EEPROM.read(3);

  spminute = EEPROM.read(4);

  calling  = EEPROM.read(5);

    sthour2   = EEPROM.read(6);

  stminute2 = EEPROM.read(7);

  sphour2   = EEPROM.read(8);

  spminute2 = EEPROM.read(9);

  calling2  = EEPROM.read(10);

    DateTime now =rtc.now();

    Serial.print(now.hour());

    Serial.print(‘:’);

    Serial.print(now.minute());

    Serial.print(‘:’);

    Serial.print(now.second());

    Serial.println(”  time “);

  if(digitalRead(count)==HIGH)

  {

  counttime+=1;

  delay(1000);

  }

  if(counttime>=3)

  {

    counttime=0;

  }

  while(counttime==0)

  {

    if(digitalRead(count)==HIGH)

  {

  counttime+=1;

  delay(1000);

  }

  if(counttime>=3)

  {

    counttime=0;

  }

    DateTime now =rtc.now();

    Serial.print(now.hour());

    Serial.print(‘:’);

    Serial.print(now.minute());

    Serial.print(‘:’);

    Serial.print(now.second());

    Serial.println(”  time “);

    lcd.setCursor(1,0);

    lcd.print(” Running mode   “);

    lcd.setCursor(0,1);

    lcd.print(now.hour());

    lcd.print(“:”);

    lcd.print(now.minute());

    lcd.print(“:”);

    lcd.print(now.second());

    lcd.print(”   “);

    Serial.print(sthour);

    Serial.print(” : “);

    Serial.print(stminute);

    Serial.print(“,,”);

    Serial.print(sphour2);

    Serial.print(” : “);

    Serial.print(spminute);

    Serial.println(” setting time checking “);

    if(now.hour()==sthour&&now.minute()>=stminute)

    {

      calling=1;

      EEPROM.write(5,calling);

    }

    if(now.hour()>=sphour&&now.minute()>=spminute)

    {

      calling=0;

      EEPROM.write(5,calling);

    }// first loop exit…

    if(now.hour()==sthour2&&now.minute()>=stminute2)

    {

      calling2=1;

      EEPROM.write(10,calling2);

    }

    if(now.hour()>=sphour2&&now.minute()>=spminute2)

    {

      calling2=0;

      EEPROM.write(10,calling2);

    }

    calling=EEPROM.read(5);

    calling2=EEPROM.read(10);

    if(calling==1||calling2==1)

    {

         lcd.setCursor(11,1);

        lcd.print(” ON”);

      digitalWrite(load,HIGH);

    }

     if(calling==0&&calling2==0)

    {

     lcd.setCursor(11,1);

    lcd.print(“OFF”);

      digitalWrite(load,LOW);

    }

  }

  while(counttime==1)

  {

     if(digitalRead(count)==HIGH)

  {

  counttime+=1;

  delay(1000);

  }

  if(counttime>=3)

  {

    counttime=0;

  }

  // mode loop start

      if(digitalRead(mode)==HIGH)

  {

  mod+=1;

  delay(500);

  }

  if(mod>=3)

  {

    mod=0;

  }

  if(mod==0)

  {

     lcd.setCursor(1,0);

    lcd.print(” Timer 1       “);

     lcd.setCursor(0,1);

    lcd.print(”              “);

  }

  while(mod==1)

  {

  if(digitalRead(mode)==HIGH)

  {

  mod+=1;

  delay(500);

  }

  if(mod>=3)

  {

    mod=0;

  }

    lcd.setCursor(1,0);

    lcd.print(” ON Time mode “);

    if(digitalRead(enter)==HIGH)

      {

        enter1+=1;

        delay(1000);

      }

      if(enter1>=3)

      {

        enter1=0;

      }

    while(enter1==1)

    {

      if(digitalRead(enter)==HIGH)

      {

        enter1+=1;

        delay(1000);

      }

      if(enter1>=3)

      {

        enter1=0;

      }

      sthour=EEPROM.read(1);

    if(digitalRead(inc)==HIGH)

    {

      sthour+=1;

      EEPROM.write(1,sthour);

      delay(1000);

    }

    if(digitalRead(dec)==HIGH)

    {

      sthour-=1;

      EEPROM.write(1,sthour);

      delay(1000);

    }

    if(sthour>=24)

    {

       sthour=0;

      EEPROM.write(1,sthour);

    }

     sthour=EEPROM.read(1);

    Serial.print(sthour);

    Serial.println(” ON HOURS “);

    lcd.setCursor(2,1);

    lcd.print(sthour);

    lcd.print(” “);

    lcd.print(“:”);

    lcd.print(”        “);

    if(sthour>=24)

    {

      sthour=0;

    }

  }

   sthour=EEPROM.read(1);

  while(enter1==2)

    {

      stminute=EEPROM.read(2);

       if(digitalRead(enter)==HIGH)

      {

        enter1+=1;

        delay(500);

      }

      if(enter1>=3)

      {

        enter1=0;

      }

    if(digitalRead(inc)==HIGH)

    {

      stminute+=1;

      EEPROM.write(2,stminute);

      delay(1000);

    }

    if(digitalRead(dec)==HIGH)

    {

      stminute-=1;

      EEPROM.write(2,stminute);

      delay(1000);

    }

    if(stminute>=60)

    {

      stminute=0;

      EEPROM.write(2,stminute);

    }

    stminute=EEPROM.read(2);

    Serial.print(stminute);

    Serial.println(” ON HOURS “);

    lcd.setCursor(2,1);

    lcd.print(”       “);

    lcd.setCursor(10,1);

    lcd.print(stminute);

    lcd.print(”   “);

  }

  stminute=EEPROM.read(2);

    lcd.setCursor(0,1);

    lcd.print(“T:”);

    lcd.setCursor(2,1);

    lcd.print(sthour);

    lcd.print(” “);

    lcd.print(“:”);

    lcd.print(stminute);

    lcd.print(”      “);

  if(digitalRead(mode)==HIGH)

  {

  mod+=1;

  delay(500);

  }

  if(mod>=3)

  {

    mod=0;

  }  

  Serial.print(mod);

  Serial.println(” Mode “);

  }

  while(mod==2)

  {

       if(digitalRead(mode)==HIGH)

  {

  mod+=1;

  delay(500);

  }

  if(mod>=3)

  {

    mod=0;

  }

    lcd.setCursor(1,0);

    lcd.print(” OFF Time Mode “);

     if(digitalRead(enter)==HIGH)

      {

        enter1+=1;

        delay(500);

      }

      if(enter1>=3)

      {

        enter1=0;

      }

    while(enter1==1)

    {

      sphour=EEPROM.read(3);

      if(digitalRead(enter)==HIGH)

      {

        enter1+=1;

        delay(500);

      }

      if(enter1>=3)

      {

        enter1=0;

      }

    if(digitalRead(inc)==HIGH)

    {

      sphour+=1;

     EEPROM.write(3,sphour);

      delay(1000);

    }

    if(digitalRead(dec)==HIGH)

    {

      sphour-=1;

      EEPROM.write(3,sphour);

      delay(500);

    }

    if(sphour>=24)

    {

      sphour=0;

      EEPROM.write(3,sphour);

    }

    sphour=EEPROM.read(3);

    Serial.print(sphour);

    Serial.println(” ON HOURS “);

    lcd.setCursor(0,1);

    lcd.print(“T:”);

    lcd.setCursor(2,1);

    lcd.print(sphour);

    lcd.print(”  “);

    lcd.print(“:”);

    lcd.print(”    “);

  }

  sphour=EEPROM.read(3);

  while(enter1==2)

    {

      spminute=EEPROM.read(4);

       if(digitalRead(enter)==HIGH)

      {

        enter1+=1;

        delay(500);

      }

      if(enter1>=3)

      {

        enter1=0;

      }

    if(digitalRead(inc)==HIGH)

    {

      spminute+=1;

      EEPROM.write(4,spminute);

      delay(500);

    }

    if(digitalRead(dec)==HIGH)

    {

      spminute-=1;

      EEPROM.write(4,spminute);

      delay(500);

    }

    if(spminute>=60)

    {

      spminute=0;

      EEPROM.write(4,spminute);

    }

    spminute=EEPROM.read(4);

    Serial.print(spminute);

    Serial.println(” Off HOURS “);

    lcd.setCursor(2,1);

    lcd.print(”   “);

    lcd.setCursor(10,1);

    lcd.print(spminute);

    lcd.print(”     “);

 }

  spminute=EEPROM.read(4);

    lcd.setCursor(2,1);

    lcd.print(sphour);

    lcd.print(” “);

    lcd.print(“:”);

    lcd.print(spminute);

    lcd.print(”    “);

     if(digitalRead(mode)==HIGH)

      {

     mod+=1;

     delay(500);

     }

      if(mod>=3)

     {

      mod=0;

     }  

  }

 }

 /// load 1 end the loop

 while(counttime==2)

  {

       if(digitalRead(mode)==HIGH)

  {

  mod+=1;

  delay(500);

  }

  if(mod>=3)

  {

    mod=0;

  }

     if(digitalRead(count)==HIGH)

  {

  counttime+=1;

  delay(1000);

  }

  if(counttime>=3)

  {

    counttime=0;

  }

  if(mod==0)

  {

     lcd.setCursor(1,0);

    lcd.print(” Timer 2        “);

         lcd.setCursor(0,1);

    lcd.print(”                  “);

  }

  while(mod==1)

  {

       if(digitalRead(mode)==HIGH)

  {

  mod+=1;

  delay(500);

  }

  if(mod>=3)

  {

    mod=0;

  }

    lcd.setCursor(1,0);

    lcd.print(“ON Time mode 2”);

    if(digitalRead(enter)==HIGH)

      {

        enter1+=1;

        delay(1000);

      }

      if(enter1>=3)

      {

        enter1=0;

      }

    while(enter1==1)

    {

      if(digitalRead(enter)==HIGH)

      {

        enter1+=1;

        delay(1000);

      }

      if(enter1>=3)

      {

        enter1=0;

      }

      sthour2=EEPROM.read(6);

    if(digitalRead(inc)==HIGH)

    {

      sthour2+=1;

      EEPROM.write(6,sthour2);

      delay(1000);

    }

    if(digitalRead(dec)==HIGH)

    {

      sthour2-=1;

      EEPROM.write(6,sthour2);

      delay(1000);

    }

    if(sthour2>=24)

    {

       sthour2=0;

      EEPROM.write(6,sthour2);

    }

     sthour2=EEPROM.read(6);

    Serial.print(sthour2);

    Serial.println(” ON HOURS “);

    lcd.setCursor(2,1);

    lcd.print(sthour2);

    lcd.print(” “);

    lcd.print(“:”);

    lcd.print(”        “);

    if(sthour2>=24)

    {

      sthour2=0;

    }

  }

   sthour2=EEPROM.read(6);

  while(enter1==2)

    {

      stminute2=EEPROM.read(7);

       if(digitalRead(enter)==HIGH)

      {

        enter1+=1;

        delay(500);

      }

      if(enter1>=3)

      {

        enter1=0;

      }

    if(digitalRead(inc)==HIGH)

    {

      stminute2+=1;

      EEPROM.write(7,stminute2);

      delay(1000);

    }

    if(digitalRead(dec)==HIGH)

    {

      stminute2-=1;

      EEPROM.write(7,stminute2);

      delay(1000);

    }

    if(stminute2>=60)

    {

      stminute2=0;

      EEPROM.write(7,stminute2);

    }

    stminute2=EEPROM.read(7);

    Serial.print(stminute2);

    Serial.println(” ON HOURS “);

    lcd.setCursor(2,1);

    lcd.print(”       “);

    lcd.setCursor(10,1);

    lcd.print(stminute2);

    lcd.print(”   “);

  }

  stminute2=EEPROM.read(7);

    lcd.setCursor(0,1);

    lcd.print(“T:”);

    lcd.setCursor(2,1);

    lcd.print(sthour2);

    lcd.print(” “);

    lcd.print(“:”);

    lcd.print(stminute2);

    lcd.print(”          “);

  if(digitalRead(mode)==HIGH)

  {

  mod+=1;

  delay(500);

  }

  if(mod>=3)

  {

    mod=0;

  }  

  Serial.print(mod);

  Serial.println(” Mode “);

  }

  while(mod==2)

  {

       if(digitalRead(mode)==HIGH)

  {

  mod+=1;

  delay(500);

  }

  if(mod>=3)

  {

    mod=0;

  }

    lcd.setCursor(1,0);

    lcd.print(“OFF Time Mode 2”);

     if(digitalRead(enter)==HIGH)

      {

        enter1+=1;

        delay(500);

      }

      if(enter1>=3)

      {

        enter1=0;

      }

    while(enter1==1)

    {

      sphour2=EEPROM.read(8);

      if(digitalRead(enter)==HIGH)

      {

        enter1+=1;

        delay(500);

      }

      if(enter1>=3)

      {

        enter1=0;

      }

    if(digitalRead(inc)==HIGH)

    {

      sphour2+=1;

     EEPROM.write(8,sphour2);

      delay(1000);

    }

    if(digitalRead(dec)==HIGH)

    {

      sphour2-=1;

      EEPROM.write(8,sphour2);

      delay(500);

    }

    if(sphour2>=24)

    {

      sphour2=0;

      EEPROM.write(8,sphour2);

    }

    sphour2=EEPROM.read(8);

    Serial.print(sphour2);

    Serial.println(” off HOURS “);

    lcd.setCursor(0,1);

    lcd.print(“T:”);

    lcd.setCursor(2,1);

    lcd.print(sphour2);

    lcd.print(”  “);

    lcd.print(“:”);

    lcd.print(”       “);

  }   

  sphour2=EEPROM.read(8);

  while(enter1==2)

    {

      spminute2=EEPROM.read(9);

       if(digitalRead(enter)==HIGH)

      {

        enter1+=1;

        delay(500);

      }

      if(enter1>=3)

      {

        enter1=0;

      }

    if(digitalRead(inc)==HIGH)

    {

      spminute2+=1;

      EEPROM.write(9,spminute2);

      delay(500);

    }

    if(digitalRead(dec)==HIGH)

    {

      spminute2-=1;

      EEPROM.write(9,spminute2);

      delay(500);

    }

    if(spminute2>=60)

    {

      spminute2=0;

      EEPROM.write(9,spminute2);

    }

    spminute2=EEPROM.read(9);

    Serial.print(spminute2);

    Serial.println(” Off HOURS “);

    lcd.setCursor(2,1);

    lcd.print(”   “);

    lcd.setCursor(10,1);

    lcd.print(spminute2);

    lcd.print(”     “);

 }

  spminute2=EEPROM.read(9);

    lcd.setCursor(2,1);

    lcd.print(sphour2);

    lcd.print(” “);

    lcd.print(“:”);

    lcd.print(spminute2);

    lcd.print(”          “);

     if(digitalRead(mode)==HIGH)

      {

     mod+=1;

     delay(500);

     }

      if(mod>=3)

     {

      mod=0;

     }  

  }

 }

}

Circuit Diagram:

Thanks & Regards

POWER INTEGRATED SOLUTIONS

No:10A/3,Radhakrishna Colony,

Sasthri Road, Thennur, Trichy-17.

Mail to: [email protected] 

Visit to:www.powerintegrated.in

Call us: 0431-4340778 / 7639385448 / 9566377454.

Power electronics-ECE projects-EEE projects-buck –boost –fly back –converters-‘push-pull’ converters-microcontroller-embedded-VLSI- FPGA based power electronics- multilevel inverters-inverters-converters-led bulbs-led street- light-manufacture-mini projects- SMPS –  engineering –polytechnic projects-innovation projects-embedded course- course-real time training-development training-industrial electronics – power system projects-power systems-–MATLAB –Simulink tools-using-power electronics-trichy projects center-course training- institute-grid power system –solar based projects- sepic converter-resonant converter-AC to DC converter – photovoltaic – thyristors – MOSFET- design- power converters-power inverters –grid systems- power distribution systems-isolated converters-non isolated converters- transformer less converters-electrical projects-electrical design-series inverters-parallel inverter-dual  converter-step up step down converters-ac regulator- cycloconverter -UPS-VFD drives-power supply-DIAC –TRIAC-IGBT-SCR-controlled –diode

bldcdrive

bldc motor control

inplanttraining

http://powerintegrated.in/traininginfo.html
http://powerintegrated.in/index.html

EMF

Electromagnetic Induction Magnetic Coil 

EEE principles Electromagnetic law.

final year projects

final year projects Projects 2019-2020 Trichy Chennai Kumbakonam EEE ECE CSE MECH

final year projects in trichy

final year projects in tanjore

project components

low rate projects in trichy

low rate final year projects.

IEEE Projects 2019-2020 Trichy Chennai Kumbakonam EEE ECE CSE MECH project center in trichy

IEEE Project Centers

IEEE Project Centre in Trichy/chennai/kumbakonam

Embedded systems projects in Trichy/chennai/kumbakonam Power Electronics Projects in Trichy/chennai/kumbakonam

IEEE 2020-2021 Projects.

#IEEE Projects 2020-2021

Power Integrated

IEEE 2021 Embedded systems projects

IEEE 2021 power electronics projects

IEEE IOT projects

IEEE arduino projects

IEEE microcontroller projects

IEEE robotics projects

ieee power system projects

best project center in trichy

motor projects in trichy