You are on page 1of 7

instructables

LED Matrix Alarm Clock (with MP3 Player)

by cermakmara

This Arduino based alarm clock has everything you would expect from your alarm - possibility to wake you with
every song you like, snooze button and its easy to control through three buttons. There are three main blocks - LED
matrix, RTC module and MP3 shield with speaker.

Step 1: Material & Tools

LED Matrix Alarm Clock (with MP3 Player): Page 1


LED Matrix
Arduino Uno
MP3 shield DHF player Mini
RTC module DS1307
Any Speaker
3 buttons (with pullup/pulldown resistors 10k)
Wires
Plexi (or any material from which you want your box)
3D printer (for printing matrix boxes)
DC power supply connector
USB B female connector.

I believe that you can modify this material list based on your possibilities (de nitely you can use di erent MP3
Shields, di erent RTC modules and everything should work just ne:)

Step 2: LED Matrix

As an inspiration, I used this instructables to build LED di erent ones and do another LED matrix. I will
matrix, I only decided not to use prototyping board explain the working principle in Part arduino. Anyway,
and design my own PCB. You can nd my project in to nd out if you did good job and display is working,
circuit maker here. You can also use schematics and if just replace the constants in DisplayChar function in
you want to send gerber data (rather then generate it main arduino loop ( e.g. instead of DisplayChar(1,
from circuit maker project by our own) let me know I letA); use DisplayChar(0, 9); which will write number 9
will provide it to you:). Some few tips - rstly I used starting from 1st column), you dont need to comment
very cheap LED but after I solder all diodes and run anything else.
the arduino code, turned out the variance of LED
diode color was not acceptable so I needed to order

LED Matrix Alarm Clock (with MP3 Player): Page 2


Download
https://www.instructables.com/ORIG/FEV/DPPT/K970192V/FEVDPPTK970192V.pdf

Step 3: Other HW

LED Matrix Alarm Clock (with MP3 Player): Page 3


The other HW components to build alarm clock are: some reason I wasn´t successful in serial
RTC module, MP3 shield, Buttons and arduino UNO. communication (it didnt work together with SPI and
I2C communication used for other componets) but I
For RT C m o dule I used module DS130 7 and library was kind a OK just to use IO pins (I used ADKEY1
MD_DS1307.h its quite simple everything works connected to arduino Digital output as a trigger to
smoothly, but I would recommend probably use more play song and than pin USB+ to stop the music).
precise RTC module like 3231 or other - if I let it
without power for about few days it started to loose As you can see on picture, I used three simple buttons
some seconds. on prototyping board connected to Digital Inputs of
arduino with pull down 10kOhm resistors.
M P3 s hie ld DHF pla y e r M ini - This MP3 shield is
really easy, you can upload some mp3 to SD card, The wiring for arduino can be clearly seen in Arduino
connect any speaker you nd and then it can be code:)
operated in two ways either through serial
communication, or by I/O pins. To be honest from

Step 4: Mechanical Parts


LED Matrix Alarm Clock (with MP3 Player): Page 4
To create view of nice regular display, you need to use part which is directly on LEDs to prevent LEDs being
some grid to de ne the exact shape for each LED. I visible as a point source of light. You can see that in
used simple 3D printed grid which works just ne - It side wall there is a space for DC power supply
is made from two parts, left and right, you can nd connector and USB to upload better ideas of code:) I
the STL data in attachment. used standard glue for plastics to glue plexi parts
together. In attachment there are STL les for all parts
The box is milled on CNC machine from milk plexi. It is (Thanks my friend Peshi for designing this super cool
totally up to you from which material you make in, box:) )
only one recommendation, if you will use the similar
material as I did, put some semipermeable layer to

Download
https://www.instructables.com/ORIG/FAT/VP28/K9701OWU/FATVP28K9701OWU.stl

Download
https://www.instructables.com/ORIG/FLR/Q4Z6/K9701OXI/FLRQ4Z6K9701OXI.stl

LED Matrix Alarm Clock (with MP3 Player): Page 5


https://www.instructables.com/ORIG/FMV/1VI2/K970267T/FMV1VI2K970267T.step
… Download

Download
https://www.instructables.com/ORIG/FGN/01KG/K970267U/FGN01KGK970267U.step

Download
https://www.instructables.com/ORIG/FKW/8AXR/K970267V/FKW8AXRK970267V.step

Download
https://www.instructables.com/ORIG/FQZ/RPSL/K970267W/FQZRPSLK970267W.step

Download
https://www.instructables.com/ORIG/FQ1/9BF5/K970267X/FQ19BF5K970267X.step

Download
https://www.instructables.com/ORIG/FPB/R3B2/K970267Y/FPBR3B2K970267Y.step

Download
https://www.instructables.com/ORIG/FXJ/FB8M/K970267Z/FXJFB8MK970267Z.step

Step 5: Arduino Part

In part related to arduino I would just like to brie y who wrote this smooth function). So rst step
describe the main loop algorithm and then few words (preparing the data for shift register is happening in
to controlling the Shift registers through SPI and function DisplayChar, where you just nd the wanted
Alarm setup. symbol from array of constant and prepare data for
registers. And when the function UpdateDisplay is
In the main loop you just basically check whether called the data are shifted to outputs (for more info
some button is pressed, check whether the RTC send see screen from arduino IDE)
you newly updated values of minutes and whether its
time to play some pink oyd song:) and if not, you just Ala rm S e t up . There are three buttons, left, middle,
periodically turn on and o LEDs with set numbers. and right. When you doublepress right and middle,
you will enter the alarm menu. In Alarm menu there
Co nt ro lling t he LED m a t rix - For better are following functions available - left button (Set
understanding it is good to follow instructables for alarm for hours) middle button (Set alarm for
LED matrix I mentioned at beginning, but just brie y - minutes) Right button long press ( con rming alarm),
it is important to understand that to show numbers long press of middle and right button (erasing
or letters in this Matrix, you need to periodically existing alarm).
choose which LED from set row will need to be turned
on, and then turn the all LEDs from row for some When the alarm is set (you can recognize this by the
time. In the next step you will turn o this row and fact the alarm turn on mark LED in bottom right) and
prepare second row and this again and again. What Clock will start to play your favourite morning song:)
this mean? - dont use any delays! - otherwise it wont there are following functions avaliable - left button
show you numbers but just blinks:) (Snooze for another 5minutes), middle button (cancel
alarm).
I use quite di erent and I would say easier way to
control shift registers (thanks to my friend Krystof

LED Matrix Alarm Clock (with MP3 Player): Page 6


Download
https://www.instructables.com/ORIG/FI5/5FA4/K97024HQ/FI55FA4K97024HQ.ino

Step 6: Completing Alarm

At the end, I just glue everything inside together:) and For future I would like to try di erent material -
close the glue the back part of alarm. In the attached ideally some black:) and to add some more functions,
video, you can see the control mechanism of this like showing the date, maybe temperature etc:)
alarm. Just note to the video, in the video it looks like
its blinking, its caused by the principle of turning on Hope you will enjoy building your own alarm clock,
and o LEDs and camera caption frame rate - in reality and looking forward for your ideas:)
your eyes see this as turned on without blinking:)

https://www.youtube.com/watch?v=8Q2TgzYwoGc&feature=youtu.be

LED Matrix Alarm Clock (with MP3 Player): Page 7

You might also like