Introduction: Talking Clock With Arduino

Picture of Talking Clock With Arduino

Hello all,

For a time I tried to build a Talking Clock (see the video), but with not good results due the voice module I was using for that.

After many searches related to right hardware and also learn about how to use the appropriate libraries, I achieved my goals.

I will present you my version of Talking Clock using Arduino with the module DFPlayer_Mini to play MP3/WAV files.

There are many reasons to go further with this project !

With more improvements and adding some features, it can turn a clock for people with some visual deficiency, for example!

In this project all the "voices" were made digitally in Portuguese because is my mother language and I do not see many projects focused on that and also is an opportunity to give a gift to my followers in Brazil.

But of course you can follow the project and learn how everything works and then you can prepare by yourself all the voices in your native language!

This is really cool and part of fun !!

Let's see that!


LAGSILVA - Oct.2016

Step 1: Build List

Picture of Build List

These are the components you need:

  1. Arduino (UNO-R3, Nano)
  2. LED Display Catalex TM1637 (4 digits x 7 Segments) or equivalent
  3. DFPlayer_Mini
  4. MicroSD memory card (formated in FAT32)
  5. Resistor 1K Ohm (2x)
  6. Breadboard
  7. Momentary Switch (3x)
  8. Loudspeaker of 2W or 3W
  9. Wire jumpers (male-male & male-female)
  10. DC Power supply (9 Volts)


  1. You can use any MicroSD memory card up to 32GB, but all the MP3 files I have used for the voices are less than 2 MB (two Megabytes) in total!! So, do not spend your money a using memory card with a huge capacity!
  2. I decided to not use a RTC (Real Time Clock) because I have included a very easy feature to adjust the hours and minutes and the Arduino is precise enough to count the time.

Step 2: How to Prepare the MP3 Files for the Voices

Picture of How to Prepare the MP3 Files for the Voices

For your digital clock speak the hours and minutes, you must prepare some voice files in MP3 format and record them into MicroSD memory card according with the following steps:

  • Amount of files you need

I created 3 groups of voice files:

  1. Hours group (24 files from 0 to 23)
  2. Minutes group (60 files from 0 to 59)
  3. General voice messages (03 setup messages and 01 for the bell ring & cukoo sound)

The total were 88 files.

Note: I decided to use this strategy to simplify the logic of the program, but of course you have more work to record the files. That is a trade-off you must to evaluate before translate for your native language.

  • Naming the MP3 files

All MP3 files must be recorded with file names within format "xxxx.mp3".

The files must be done with four digits, starting from "0000.mp3" to "0087.mp3" or another number considering the total amount of files in your language.

  • How to create the digitally voices

I found out many sites on Internet to convert text to speache files.

The bad news are most of them must be paid to generate the files.

One interesting and very good example is the site Voice RSS.

Try to use the live demo in your preferred language. In Portuguese in just write the time as "12:17" and the softaware will speak the time for you. In English, just write "12:17pm", for example.

The problem is how to save the files.

You can find a reference for that on the site How-To-Geek.

My personal solution was to install a software on my computer to do this translation "text-to-speache": Verbose Text-To-Speach Software.

You can install it and start to convert your texts using a free period for evaluation and then you decided if you want buy it or not (around $20 USD). Personally I bought it after evaluation time.

Note: For special sounds or effects, a great site is the Sound Bible where you can save the files direct on MP3 standard. I used it for the Cukoo Clock sound.

Step 3: Assembly - Schematics - Arduino Program

Picture of Assembly - Schematics - Arduino Program

The assembly is very easy!

Just follow the schematics and take care with the wire connections.

For the program you must to install an additional library in your Arduino for the DFPlayer that you can download it on Github.

For setup of time there are 03 momentary switches:

  • # 1: For the setup of the 03 modes of the clock.
  • # 2: To setup the minutes.
  • # 3: To setup the hours.

The 03 modes are:

  1. Silence Mode: To adjust the time of the clock (hours & minutes).
  2. Minute Mode: To speach every minute.
  3. Hour Mode: To speach only at whole hours and put the cuckoo sound on action (on period 8:00am to 8:00pm). The remaining minutes of the hour keep in silence.


JAYB173 (author)2017-10-10

Hi I have a few questions. Would I be able to use audio like a 30 second mp3 audio file to play for every hour for example at 12am a 30 second song plays 1am another song plays etc.? or does it have to be simple short sounds. Also how much different will the coding for it be?

dancopy (author)2017-08-12

Saudações Engº lagsilva!

Seria possível usar um Display TFT 2.2" (ili9341) no lugar do TM1637?

O que mudaria/acrescentaria no código? Vc poderia me dar uma ajuda? Obrigado

lagsilva (author)dancopy2017-08-13

Olá, Daniel,

Nunca utilizei este display em meus projetos, mas qualquer outro display pode ser utilizado com as devidas adaptações no código.

O que posso lhe adiantar é que será necessário ter a Library para ele e depois revisar o meu código retirando todas as referências relacionadas ao display TM1637 e incluir os comandos do novo display.

Tente achar a documentação de seu display TFT e de sua Library para entender como são seus comandos.



JokerzinhoTM (author)2017-03-19

Bom dia amigo lagsilva! Montei o circuito e funcionou perfeitamente... muito legal!

entanto 1) eu gostaria de usar um RTC ou GPS no circuito para quando,
por exemplo, faltar a luz, não precisar redefinir a Hora; 2) Gostaria tb
de fazer piscar os dois pontos do display mas não tenho conhecimentos
suficiente para tais coisas; Obrigado

lagsilva (author)JokerzinhoTM2017-03-22

Que ótimo! Coloque uma foto aqui de sua montagem!

É possível sim adicionar um RTC. GPS é bem caro e não o indicaria a este projeto por fugir de seu escopo original.

Tenho outros projetos publicados por aqui que o utiliza. De uma pesquisada e tente adapta-lo a sua aplicação.

Fazer piscar os dois pontos também é possível, mas tudo isto leva a outra versão do projeto e que no momento não tenho disponibilidade de realizá-lo.

Assim que for possível, faço uma atualização e lhe aviso.



jarmo.hakala.9 (author)2017-03-18

Compiling get message: " 'hour' was not declared in this scope", what is wrong ?

Hello Jarmo! This error is relative to the "Time" library. Search on google and go testing!

lagsilva (author)jarmo.hakala.92017-03-18

Hello Jarmo,

I did a test recompiling the same file I posted in this Instructables and I found no errors!

If you edited my original file, please take a look at the line reported with error by your compiler and try to fix it.

Seasickgooner (author)2017-03-13

what file folder is the correct one, could you please screenshot what file folder you put it in

Seasickgooner (author)2017-03-11

C:\Users\15017\OneDrive\Documents\Arduino\Talking_Clock_V2_0\Talking_Clock_V2_0.ino:9:83: fatal error: DFPlayer_Mini_Mp3.h: No such file or directory

#include <DFPlayer_Mini_Mp3.h> //Library of DFPlayer (module to play MP3 files)


compilation terminated.

exit status 1

Error compiling for board Arduino/Genuino Uno.

Still not compiling please tell me what i have done wrong

lagsilva (author)Seasickgooner2017-03-13

Hello Seasickgooner,

Probably the compiler is not finding the DFPlayer code in the libraries of your Arduino IDE.

Had you installed the DFPlayer_Mini_MP3 in the correct Arduino libraries folder in your computer ?

Seasickgooner (author)2016-11-05

ERROR: when uploading code. Using library SoftwareSerial at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial

exit status 1

Error compiling for board Arduino Nano.

lagsilva (author)Seasickgooner2016-11-06

Is the Arduino Nano original or similar ? I already got problems with Nano produced at China. To use them you need to take care with the installation of drivers communication for Windows.

Seasickgooner (author)lagsilva2016-11-07

please link drivers and how to do it

Seasickgooner (author)lagsilva2016-11-06


lagsilva (author)2016-11-05

Hello Seasickgooner,

Probably is missing the library.

You need to download the library for DFPlayer on following link:

After this, unzip the file on a temporary folder.

It will be created a directory with the same name of zip file.

Inside this directory, there is another one: DFPlayer_Mini_Mp3.

This directory must be copied to Arduinos libraries folder in your computer.

Try again and keep me informed.

Nishchinta UR (author)2016-11-05

momentary switches are not working in sync .and speaker inaudible. what do i do?

lagsilva (author)Nishchinta UR2016-11-05

Hello Nishchinta,

I suppose that you have done everything according with the descriptions and you are using same bill of material.

Another important thing is to use same libraries as I have mentioned in the project to be used in Arduino program.

Take a look again in the schematics file (Frietzen).

There are 03 momentary switches:

1) Mode: to define the operation modes (setup of time, talking minutes, talking completed hours).

2) Minutes: to adjust/setup the minutes of time.

3) Hours: to setup the hours of time.

I recommend first you setup the time. Adjust the hours and minutes. After this change the mode of operation using switch 1 for what mode you prefer.

Related to volume:

1) Take care what kind of loudspeaker you are using. I was using a 2W x 4 Ohms.

2) Try to increase the volume on the following statement of Arduino program, changing the 24 to 30 at maximum:

mp3_set_volume(24);//Set the volume (30 max)

3) Try to use a software for sound edition like Audacity to turn all sounds file louder.

A final question: how are you generating the sound files ?

Good luck,


Seasickgooner (author)2016-11-03

Could you please post code for arduino

lagsilva (author)Seasickgooner2016-11-04

Hello, Seasickgooner,

The code is in the file Talking_Clock_V2_0.ino

Read again the project you will find it for download.

DIY Hacks and How Tos (author)2016-10-23

That would make a great alarm clock. After a while of beeping, it could start yelling at you to get up.

Great idea !! It would be useful for me all mornings !!

About This Instructable




Bio: I am a Mechanical Engineer and an enthusiastic Maker. I like to develop new ideas combining electronics and programming.
More by lagsilva:Digital Clock With Mirrored Display Driven by AccelerometersAnalog Clock With LED Matrix and ArduinoChinese Rings Puzzle
Add instructable to: