Motion triggered talking DCF77 clock
People who wear glasses know the problem: you're lying in bed, it's dark, and you want to know what time it is. Now you don't feel like looking for your glasses and putting them on to read the time. What if a wave of the hand near the clock is enough to tell you the time? That's exactly what this little marvel does.
The hardware
If you have already studied the circuit diagram, you will have noticed that the speaker is connected to 2 PWM pins of the Arduino.
Here is a statement from the author of the Talkie.h library:
>> On Arduino enables pin 11 as inverted PWM output to increase the volume. <<
I checked if the volume changes when I switch the speaker from pin 3 to ground or connect it to pin 11. And indeed, there was a significant increase in the volume of the wiring indicated in the circuit diagram.
I originally wanted to install an additional amplifier à la LM386, but the volume achieved by this clever solution via the two PWM outputs made the need unnecessary.
The software
In order to realize the project, the following libraries are used:
The DCF77.h library contains all the necessary functions to evaluate the signal of a DCF77 receiver. The TimeLib.h library provides the necessary functions for time formatting.
Now there was a small imperfection to remedy. When I was looking for the appropriate TimeLib.h library, I was only offered the Time.h library. After I included these, the code could not be compiled, the library DCF77.h includes a reference to the library TimeLib.h. The solution to the problem was to rename the file 'Time.h' to 'TimeLib.h' in the library folder 'Time'. Not pretty, but effective.
The highlight: the TimeLib.h library contains a virtual RTC. So if the reception of the DCF77 signal is interrupted in between, the clock will still continue to run and the current time can be queried at any time. As soon as the DCF77 signal is available again, the time will be resynchronized.
Using the Talkie.h library with the associated vocabulary files went without such problems. The largest vocabulary file was used here, as this is the only one that provides the vocabulary I need.
Since all words are assigned to unique variables, the programming required some hard work in terms of typing, as each number now had to be implemented accordingly.
If you don't like the voice of the library I use, you can speak the necessary words yourself and then use them. The following web pages explain very well how to do this:
https://learn.adafruit.com/adafruit-wave-shield-audio-shield-for-arduino/check-your-files
https://srituhobby.com/how-to-make-an-arduino-based-text-speech-project/?utm_content=cmp-true
Construction
The construction of the circuit is relatively simple and should be done in a short time based on the circuit diagram. When placing the antenna of the DCF77 receiver, care should be taken to keep a minimum distance of about 5 cm from the Arduino so as not to interfere with the received signal. By the way, I used a small speaker box as a cabinet.
If you only want the hand movement to be recognized when it is relatively close to the housing, I recommend installing the motion sensor completely into the housing and drilling a small hole above it.
Commissioning
After applying the supply voltage, you should be able to hear 'Start time machine' from the loudspeaker. After the antenna has been pointed in the direction of Frankfurt, you can hold down the check button and check whether the signal is received correctly. If the LED flashes every second, everything is fine, otherwise a realignment should be made. After about 2 minutes you should hear the message 'Time adjust complete'. If the message 'Time error' can still be heard after 5 minutes when detecting a movement, a realignment should be considered. It is also possible that a poorly screened power supply can cause interference. A high-quality power supply should therefore be used.
BTW
If you still remember the Ti99/4A home computer from Texas Instruments, you should take a look at the library Vocab_US_TI99.h. It contains the original vocabulary of the speech synthesizer used at the time. When I tried it out, I immediately felt transported back to the 80s. Who would have thought that this library would manage to survive long enough to still be used today.
Small catch
This talking clock is more suitable for single sleepers. After all, who wants to scare their partner with a strange voice just because they want to know what time it is ;-)
- Arduino Nano
- ELV DCF-2 DCF77 receiver
- SR602 IR motion sensor
- LED
- Diode 1N4001
- Resistance 220 Ohm
- Resistance 4K7 Ohm
- Button
- Speaker 32 Ohm
If you have already studied the circuit diagram, you will have noticed that the speaker is connected to 2 PWM pins of the Arduino.
Here is a statement from the author of the Talkie.h library:
>> On Arduino enables pin 11 as inverted PWM output to increase the volume. <<
I checked if the volume changes when I switch the speaker from pin 3 to ground or connect it to pin 11. And indeed, there was a significant increase in the volume of the wiring indicated in the circuit diagram.
I originally wanted to install an additional amplifier à la LM386, but the volume achieved by this clever solution via the two PWM outputs made the need unnecessary.
The software
In order to realize the project, the following libraries are used:
- DCF77.h
- TimeLib.h
- Talkie.h
- Vocab_US_LARGE.h
The DCF77.h library contains all the necessary functions to evaluate the signal of a DCF77 receiver. The TimeLib.h library provides the necessary functions for time formatting.
Now there was a small imperfection to remedy. When I was looking for the appropriate TimeLib.h library, I was only offered the Time.h library. After I included these, the code could not be compiled, the library DCF77.h includes a reference to the library TimeLib.h. The solution to the problem was to rename the file 'Time.h' to 'TimeLib.h' in the library folder 'Time'. Not pretty, but effective.
The highlight: the TimeLib.h library contains a virtual RTC. So if the reception of the DCF77 signal is interrupted in between, the clock will still continue to run and the current time can be queried at any time. As soon as the DCF77 signal is available again, the time will be resynchronized.
Using the Talkie.h library with the associated vocabulary files went without such problems. The largest vocabulary file was used here, as this is the only one that provides the vocabulary I need.
Since all words are assigned to unique variables, the programming required some hard work in terms of typing, as each number now had to be implemented accordingly.
If you don't like the voice of the library I use, you can speak the necessary words yourself and then use them. The following web pages explain very well how to do this:
https://learn.adafruit.com/adafruit-wave-shield-audio-shield-for-arduino/check-your-files
https://srituhobby.com/how-to-make-an-arduino-based-text-speech-project/?utm_content=cmp-true
Construction
The construction of the circuit is relatively simple and should be done in a short time based on the circuit diagram. When placing the antenna of the DCF77 receiver, care should be taken to keep a minimum distance of about 5 cm from the Arduino so as not to interfere with the received signal. By the way, I used a small speaker box as a cabinet.
If you only want the hand movement to be recognized when it is relatively close to the housing, I recommend installing the motion sensor completely into the housing and drilling a small hole above it.
Commissioning
After applying the supply voltage, you should be able to hear 'Start time machine' from the loudspeaker. After the antenna has been pointed in the direction of Frankfurt, you can hold down the check button and check whether the signal is received correctly. If the LED flashes every second, everything is fine, otherwise a realignment should be made. After about 2 minutes you should hear the message 'Time adjust complete'. If the message 'Time error' can still be heard after 5 minutes when detecting a movement, a realignment should be considered. It is also possible that a poorly screened power supply can cause interference. A high-quality power supply should therefore be used.
BTW
If you still remember the Ti99/4A home computer from Texas Instruments, you should take a look at the library Vocab_US_TI99.h. It contains the original vocabulary of the speech synthesizer used at the time. When I tried it out, I immediately felt transported back to the 80s. Who would have thought that this library would manage to survive long enough to still be used today.
Small catch
This talking clock is more suitable for single sleepers. After all, who wants to scare their partner with a strange voice just because they want to know what time it is ;-)
Mises à jour de l'auteur