Introduction: Master Clock

This is a project for anyone that wants a nice big clock that's viewable from 12 meters away or up close. You can make it as big as you want. It also incorporates a built in alarm clock that can be used as an event handler, say for a automated watering system for a garden or to remind you about that weekly meet up your meant to go to.

If you like it then please DONATE to my work effort!

Step 1: Step 1: Parts You Need

You will need the following parts to construct the Master Clock

- Freetronics DMD display

- Real Time Clock Module for Arduino (Like this one )

- Buzzer (or similar - enough to wake you up in the morning)

- Momentarily On push button

- 2x On-Off buttons (One for power -optional)

- Arduino Uno or similar

- Arduino Uno Proto shield (Optional - If you want things a little neater)

- A 5VDC regulated power supply capable of 4 - 30 Amps (Optional for high brightness - Not needed for normal operation)

Step 2: Step 2: Constructing the Hardware

To construct the Master Clock's Hardware follow these step:

1) Connect the buzzer, silence button and alarm set switch to the breadboard.

2) Wire one of each switches pins to ground and the buzzers GND pin to the GND pin on the arduino (As shown in the diagram

3) Wire the other pin of the alarm set switch to D2, the silence pin to D3 and the buzzer to D4

4) Connect your RTC module to the arduino according to its type (read manufacture data)

5) Connect the DMDCON to arduino and plug in DMD

6) For full brightness of DMD connect a 5V source to the High Brightness terminals

7) If you wish to make this on a proto shield solder all parts to the shield and connect appropriately.

Step 3: Step 3: Loading Software

To install the software on the arduino follow the following:

First you need to install the DMD library available from here and install it in your libraries folder.

The software can be downloaded from here. This contains the basic operations for the Master Clock.

To set the time on the RTC module find lines 117 to 124 and adjust these to the current time. Now uncomment line 124 and upload to the arduino. Now comment line 124 again and upload again. If this is not done the RTC will stay the same time.

On line 593 and 594 you set the time and days you want the alarm to occur. Line 593 is the day of week you wish it to occur. The days correspond to the numbers as follows:

1 = Sunday
2 = Monday
3 = Tuesday
4 = Wednesday
5 = Thursday
6 = Friday
7 = Saturday

Then on line 594 the set the time the alarm goes off in 24-hour time.

Step 4: Step 4 (Optinal): Add More Displays

You can add more DMD displays the make the clock bigger. Read this for more information.

Step 5: Step 5 (Optinal): Adding More Alarms

To add more alarm add the following lines of code to the sketch:

void CheckAlarm() {
AlarmSet = digitalRead(AlarmSetPin);
Snooze = digitalRead(SnoozePin);
byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
/* Only Trigger Alarm If it is a day listed below. This can be changed by changing the numbers to any of the following:
1 = Sunday
2 = Monday
3 = Tuesday
4 = Wednesday
5 = Thursday
6 = Friday
7 = Saturday
*/
if(dayOfWeek == 2 || dayOfWeek == 3 || dayOfWeek == 4 || dayOfWeek == 5 ||dayOfWeek == 6) { //This is days ALLOWED to ring alarm
if(hour == 18 && minute == 05 ) { //Set Time Here (In 24 hour Time)
if(AlarmSet == LOW) { //If alarm pin is on
Snooze = digitalRead(SnoozePin);
while(Snooze == HIGH)
{
Snooze = digitalRead(SnoozePin);
//Add what happens here
}
}
}
}
}

Changing void CheckAlarm() to a new name for this command. Also in void RunClock at line 555 add your new command name here. Remember to add your event in the while command.

Step 6: Thanks for Reading

Thanks for reading. This is my first instructable so please comment or follow on twitter at @jed_Hodson

Also feel free to change the code to suit your needs. Just please include that the original sketch was created by Jed Hodson (me)

If you liked it then please DONATE as any help if appreciated!

Comments

author
dancopy (author)2015-07-04

Hi friend! First, thanks for Instructable;
This code works on a 16x64 Matrix? If not, what needs to be changed?
I have a 16x64 matrix and would make this watch;
thanks

author
sciencewithkids (author)2014-10-31

Nice instructions for this clock. I have most of the items to get started and only need to pick up a few parts. Thanks for the instructable!

About This Instructable

8,309views

35favorites

License:

More by jedhodson:Wunderlist Task PrinterArduino and Pi in harmony - As a sensor web server!Large Temp Display
Add instructable to: