4-digit 7-segment Led Clock With Manual Adjust & Alarm, Thermometer & Higrometer Using Arduino

12,722

34

32

Introduction: 4-digit 7-segment Led Clock With Manual Adjust & Alarm, Thermometer & Higrometer Using Arduino

About: I'm designer engineer in automotive electronics with a special hobby: electronics :))) I love classical electronics, Arduino and Raspberry Pi... I'm intermediate in classical electronics and Arduino & I'm…

For RTC clock I use DS1307 homemade module, but works without changes with DS3231 module.

For thermometer and higrometer it use DHT11 sensor, but with a small change in sketch can be use DHT22 (AM2302) sensor.

I use led display named LFD080AAG-103-01 (4-digit 7-segment common cathode).

"Brain" is Arduino Nano with ATmega168 microcontroller, but work wery well with Arduino Nano with ATmega328 or Arduino Uno board.

Step 1: Schematic

Schematic use:

1) Arduino Nano board with ATmega168 chip (work also with Arduino nano wih ATmega328 chip or Arduino Uno board)

2) led display named LFD080AAG-103-01 (4-digit 7-segment common cathode)

with small changes in sketch work with common anode display

3) RTC module (homemade or buy-it) with DS1307 or DS3231 chip

4) DHT11 sensor (work with small change with DHT22 or AM3231 sensor)

5) 2 push button

6) 5V active buzzer (1kHz or 2kHz), I use for test red led & 330R resistor

7) breadboard

8) some Dupont wire

9) usb cable

10) 5V usb power supply

Step 2: Sketch

I write an sketch named multiplexedclock4_3.ino who can use for common cathode or common anode led display, just activate or deactivate some lines.

It use just 2 button, one is named ADJUST for enter in adjust mode, and second buton is named "+" because increase value until maximum, after changed value is put to minimum... value increase slowly by press repeatedly "+" or value increase quicly by push and hold down "+" button.

Step 3: Video

Is more easy to undertanf who work and how can be adjusted value be seeing the video...

Step 4: Normal Operation and Adjust Mode

Usual, on display is time (clock) about 5 seconds, temperature about 1 second and relative humidity in air about 1 second.

If you push on ADJUST button, clock enter in hour adjust mode (xx.CL style).

If push shortly or hold down the “+”button value fro hour increase (after 23 is reset at 0).

To exit in minutes adjust mode, must push ADJUST button… on display you will see CL.yy format.

If push shortly or hold down the “+”button value fot minute increase (after 59 is reset at 0).

For exit from minute adjust mode and enter in next menu, must push ADJUST button. On display is AL.on or AL.oF, in this case is AL.on (alarm is activate) and after push “+” button you will see AL.oF.

If alarm is deactivate (OFF = AL.oF) and push ADJUST button, system enter in usual mode, as clock with temperature and humidity indicator.

If push again ADJUST button, system enter again in hour adjust mode

and you can change hour value with “+” button

Exit in minute adjust mode with ADJUST button

Push “+” button to activate alarm

Now, if I push ADJUST button system enter in hour alarm adjust mode

and value chen be change with “+” button (push or hold down). After that, I push ADJUST button to enter in minutes adjust mode

If push “+” button value for minutes increase and when push ADJUST button system enter in clock mode.

In right side decimal point is on when alarm is activate and off when alarm is deactivate. When is time alarm, active buzzer (red led in my case) is intermittence active.

In time alarm, if you push “+”button alarm is temporary deactivate (until next day)....

For extra info see:

1) http://nicuflorica.blogspot.ro/2017/08/ceas-cu-reglaj-manual-al-orei-alarma-si.html

2) http://www.arduinotehniq.com/index.php/2017/08/17/rtc-clock-with-manual-adjust-alarm-thermometer-higrometer-using-arduino/

Be the First to Share

    Recommendations

    • Hour of Code Speed Challenge

      Hour of Code Speed Challenge
    • Paint Challenge

      Paint Challenge
    • Reclaimed Materials Contest

      Reclaimed Materials Contest

    32 Comments

    0
    reychris13
    reychris13

    Question 1 year ago on Introduction

    Hi, Is the Library still available?

    All I need is just Humid and Clock how do I do that?

    0
    reychris13
    reychris13

    Reply 11 months ago

    Hello, I got a problem with the Clock Humidity and temperature,it doesn't updating. I cant figure out what is wrong.

    0
    niq_ro
    niq_ro

    Reply 11 months ago

    check battery from RTC module..

    0
    denzelcruz26
    denzelcruz26

    Reply 11 months ago

    i have a problem, the time of the clock seems to be not running. the minutes was not increasing as soon I adjust the clock.
    what do I need to do?

    0
    niq_ro
    niq_ro

    Reply 11 months ago

    check battery from RTC module...

    0
    reychris13
    reychris13

    Reply 11 months ago

    Thank you so much

    0
    m-zarka
    m-zarka

    1 year ago

    It is really an integrated project ... I am a fan of the Arduino field, and I like watch's projects, and I have been looking for a project like this for long months, and I have tried many, but there must be a deficiency in them .. But your project is very beautiful and easy to apply I wish I could add the date display also in this case, so we would have taken advantage of all the features of each module, and at the same time I had a clock, a calendar, and a thermometer and humidity scale, oh bliss ....
    So...is adding the date is possible?
    I would be grateful if you could reply
    By the way ... Thank you again for this artwork

    0
    niq_ro
    niq_ro

    Reply 1 year ago

    hi, now I haven't free time to add other features...

    0
    m-zarka
    m-zarka

    Reply 1 year ago

    thank you a lot :)

    0
    m-zarka
    m-zarka

    Reply 1 year ago

    by the way ... my flash point is not working at all ... should i do somthing to make it flashing ?

    photo_2020-11-09_13-08-41.jpg
    0
    niq_ro
    niq_ro

    Reply 1 year ago

    You must verify the connexion and at DP led for left led display

    0
    LodeS
    LodeS

    Question 3 years ago

    Hello,

    This project looks great, but I have a problem, it looks like the pins don't switch fast enough and the numbers bleed through

    Any idea?

    28537322_2075021472538508_905431875_n.jpg
    0
    niq_ro
    niq_ro

    Reply 1 year ago

    you must change type of display

    0
    Karavan
    Karavan

    Answer 3 years ago

    /*

    // for Common Cathode

    #define DIGIT_ON HIGH

    #define DIGIT_OFF LOW

    #define SEGMENT_ON LOW

    #define SEGMENT_OFF HIGH

    */

    // for Common Anode

    #define DIGIT_ON LOW

    #define DIGIT_OFF HIGH

    #define SEGMENT_ON HIGH

    #define SEGMENT_OFF LOW

    ---

    Pick the right one.

    0
    LodeS
    LodeS

    Answer 3 years ago

    Never mind, I apperently have a common anode screen

    0
    TechCreator001
    TechCreator001

    2 years ago

    Please how can it be reconfigured for 12hrs format?

    0
    niq_ro
    niq_ro

    Reply 2 years ago

    in zone with meniu = 0 after hours = rtc.hours(); put another line
    if (hours > 12) hours = hours - 12;

    0
    TechCreator001
    TechCreator001

    Reply 2 years ago

    Here are the other problems I'm encountering.
    1. Alarm rings for both a.m. and p.m. For instance, alarm set at 11:00 at night ~= 23:00. How do I fix this?

    2. When setting the clock and/or the alarm (whenever SW0 is held), the 'seconds' segment stops and thereby lagging behind the real time. Can't there be a way a counter carries on whenever the SW0 is held so as to update the clock when I am done setting either the alarm or the clock?

    0
    TechCreator001
    TechCreator001

    Reply 2 years ago

    Please I still await your reply. Thanks.