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

18K3950

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

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/

33 Comments

Segment off not declared in this scope. HELP i use common cathode
Hi, Is the Library still available?

All I need is just Humid and Clock how do I do that?
Hello, I got a problem with the Clock Humidity and temperature,it doesn't updating. I cant figure out what is wrong.
check battery from RTC module..
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?
check battery from RTC module...
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
hi, now I haven't free time to add other features...
thank you a lot :)
by the way ... my flash point is not working at all ... should i do somthing to make it flashing ?
You must verify the connexion and at DP led for left led display

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?

you must change type of display

/*

// 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.

Never mind, I apperently have a common anode screen

Please how can it be reconfigured for 12hrs format?
in zone with meniu = 0 after hours = rtc.hours(); put another line
if (hours > 12) hours = hours - 12;
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?
More Comments