Arduino - AT24C32 / DS1307 Real Time Clock 7 SEGment Display

Introduction: Arduino - AT24C32 / DS1307 Real Time Clock 7 SEGment Display

About: Hello world! I make simple & Advanced projects for people who want to learn programming and electronics. Most of my Instructables are about arduino and the wide range of sensors you can use with it. I ma...

Hello world! Today i made a real time clock on a 4 digit display. The display i used is not really for clocks but it works, only the 2 dots are not in the right place, but you do not have to change anything in the code. You need a Library for this project. Follow the next step for the Schematic, Code & Parts list.

You need the following library SevSeg.h

check if you are using a common anode or cathode display

You can change this in the code at line 26

int displayType = COMMON_CATHODE; //change that to COMMON_ANODE

Other instructions on how to set time are in the code!

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: Schematic, Code & Parts List.

Wire everything like the schematic and upload the code! Make sure the library is installed.

Parts list:

  • Arduino uno
  • AT24C32 / DS1307 real time clock ( I used the one on the picture above. There is also room for a temperature sensor like the LM35 on it)
  • 4 Digit 7 Segment Display
  • 4x 1 k Resistors. (Optional)
  • Jumper wires set MM/FM/MF

Good luck!

Check out our website! http://www.arduinosensors.nl


Be the First to Share

    Recommendations

    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Finish It Already Speed Challenge

      Finish It Already Speed Challenge

    17 Discussions

    0
    Marazan
    Marazan

    10 months ago

    I assembled this project this afternoon and managed to get it working.

    For anyone planning to have a go, make sure to use the version of SevSeg.h in the listing as loading a later version though "Manage Libraries" will not work. I found this a bit messy as I had to cut and paste the files indivdually.

    I'm going to hard wire this project more permanently using a chinese Arduino Mini clone and use it as a clock on my Desk.

    Thanks for the project.

    0
    Marazan
    Marazan

    Reply 10 months ago

    Clock now built with arduino mini. I changed the pin numbers in the code to make the wiring to the display easier. Digits 1-4 (13,10,8,7) Segments a-g (12,9,5,3,2,11,6) dp (4). This lines up the display pins with those on the arduino.

    20190731_070125.jpg
    0
    haruakatsuki
    haruakatsuki

    Question 10 months ago

    ı got some problems
    i dont understand how to set time and date my clock stuck at 9.10

    0
    Marazan
    Marazan

    Answer 10 months ago

    You have to put the current time in the timeselection void to set the rtc and upload it. To ensure it doesn't reset to this time every time you reset the arduino. You then have to comment out the timeselection lines and reload into the arduino.
    Hope that works for you

    0
    owahid96
    owahid96

    3 years ago

    What's the time format 12hrs or 24hrs

    0
    Manjunathrnrn
    Manjunathrnrn

    2 years ago

    i got error like

    exit status 1

    no matching function for call to 'SevSeg::begin(int&, int&, int&, int&, int&, int&, int&, int&, int&, int&, int&, int&, int&, int&)'

    0
    vandenbrande
    vandenbrande

    Reply 1 year ago

    Wrong library

    0
    vandenbrande
    vandenbrande

    Reply 2 years ago

    Got the right library?

    0
    Manjunathrnrn
    Manjunathrnrn

    Reply 2 years ago

    yeah ,I have include the correct library i,e #include <SevSeg.h> but same thing happens

    0
    黃銘森
    黃銘森

    2 years ago

    I got the following error messages while compiling

    Class SerSeg has no member named 'Begin', 'SetBrightness', 'DisplayString'

    Any comment, thanks

    0
    vandenbrande
    vandenbrande

    Reply 1 year ago

    Probably wrong version library

    0
    Samithasandaruwan
    Samithasandaruwan

    2 years ago

    display7seg.Begin(displayType, numberOfDigits, digit1, digit2, digit3, digit4, segA, segB, segC, segD, segE, segF, segG, segDP);
    Line erro.how to fix it

    0
    vandenbrande
    vandenbrande

    Reply 2 years ago

    Can u explain further please?

    0
    LucienM7
    LucienM7

    Reply 2 years ago

    hi vandenbrande. i've got the same problem. any suggestions?

    0
    HàşibŘ
    HàşibŘ

    3 years ago

    nice brother