Arduino morse clock
No display, no real clock-hands only a tone to tell you the time
Introduction
------------
After I finished the morse code generator I came to the conclusion something important was missing. But what???
Looking at my desk, in our kitchen, in our livingroom it became clear: almost all "intelligent" devices also contain a digital clock. Conclusion: my project is not complete without a clock. The morseclock was born.
Hardware
--------
Because this is an extension of the original generator the basis will be the same Arduino Uno I was allready using. A prototype shield carries the real-time clock based on a DS3231 chip and the rest of the components (see schematic).
Two potentiometers are present to set the speed and the pitch of the morse signals. If a potentiometer is set to its minimum (gnd) the value is taken from the EEPROM and can be set through the USB-interface. If not needed A0 and A1 must be tied to ground. The analog inputs will not work if both are at 0V during startup of the Arduino.
To activate the clock the second jumper of JP2 must be connected (D4 to gnd). The buttons to recall time and date and the switch for the alarm are connected to JP1.
A (high impedance) speaker is connected to the board and eventually a logical output isolated by a reed-relay is available.
A simple 12V/500mA power supply connected to the Arduino is used, but supply through USB is possible as well. In the latter case the relay as shown in the schematic will not work. Eventually a 5V relay can be used, connected to +5V instead of Vin.
Software
--------
The sketch is an extension of the original morse code generator. Additional to the 3 jumpers for the texts a 4th jumper is present to activate the clock. This jumper has priority over the original 3 jumpers. If the clock jumper is placed the actual time will be sent 2 or 4 times every hour (selected with the Q-command). Standard the format will be numbers ("06:30") but also words ("half past seven") or roman numbers ("VI-XXX") is possible (change with the N-command).
Two buttons can be connected to send the time (no text, allways numbers) and the date on keypress. In the sketch also the option is available to send the temperature on keypress (by uncommenting a couple of lines), but because this is the internal temperature of the DS3231 chip the practical use may be poor.
And last but not least an alarm clock is included; the alarm sound is a message ("; wake up") followed by the time, which is sent every minute (max. 10 times). As soon as the alarm clock is activated by the switch, the automatic sending of time is stopped to ensure your night's sleep.
Setup of time and date and recall of messages can be accomplished through the USB-interface of the Arduino and a terminal program on a PC. I use "putty" for that purpose, but any terminal program will do. The serial monitor of the Arduino IDE is not very handy (but still usable) for this purpose, because it allways sends an "Enter" after every command and (worse) because "ESC" will not be sent. More information about commands can be obtained by typing 'H' or '?'. The sketch generates helptext and other output in english, but optionaly german and dutch are available (see sketch). Everything sent as morse code is also visible with the terminal program.
Manual
------
Commands for setup:
set clock date and time: "X2022-11-09 21:24"
set alarmtime: "W07:30"
input text 1: "AThis is text1"
input text 2: "BAnd this is text2"
input text 3: "CBut there are 3"
set number/text/roman: "N1" (0=number, 1=text, 2=roman numbers)
set quarter of an hour: "Q1" (0=half an hour, 1=quarter of an hour)
set pause time: "P10" (this is the time between repetitions of text 1/2/3, 5-60 seconds)
set speed: "S100" (this is the length of a dot, 40-500 ms)
set pitch: "T440" (this is the frequency of the tone, 120-1500 Hz)
Typing "ESC" will end the input immediately without change. Commands must be closed with "Enter".
A single letter without any data will show the actual setting without sending morse code.
commands for output (terminal and morse code):
send time: "Z" (in arabic or roman numbers)
send date "Y" (arabic numbers, text or roman numbers)
send day "D" (the name of the day as text)
send temperature "E" (rtc-chip, degrees centigrade)
send text 1 "1"
send text 2 "2"
send text 3 "3"
send live message "M", followed by the text. End with "ESC".
Additional:
show helptext "H" or "?"
Remarks
-------
There is a flaw in the roman representation: because in that old days they started counting at 1, the number 0 (zero) is not available in roman numbers, I have no good idea how to represent a time like nine o'clock. The clock will send "IX-".
The speed is set as the length of a dot in ms. Often speed is expressed as wpm (words/minute) or gpm (groups/minute). The speed in wpm can be calculated as follows: wpm=1200/tdot.
There is still a small problem in my situation: because the waf (wife acceptance factor) seemed close to zero there is no acceptable place in our house to install the clock.
------------
After I finished the morse code generator I came to the conclusion something important was missing. But what???
Looking at my desk, in our kitchen, in our livingroom it became clear: almost all "intelligent" devices also contain a digital clock. Conclusion: my project is not complete without a clock. The morseclock was born.
Hardware
--------
Because this is an extension of the original generator the basis will be the same Arduino Uno I was allready using. A prototype shield carries the real-time clock based on a DS3231 chip and the rest of the components (see schematic).
Two potentiometers are present to set the speed and the pitch of the morse signals. If a potentiometer is set to its minimum (gnd) the value is taken from the EEPROM and can be set through the USB-interface. If not needed A0 and A1 must be tied to ground. The analog inputs will not work if both are at 0V during startup of the Arduino.
To activate the clock the second jumper of JP2 must be connected (D4 to gnd). The buttons to recall time and date and the switch for the alarm are connected to JP1.
A (high impedance) speaker is connected to the board and eventually a logical output isolated by a reed-relay is available.
A simple 12V/500mA power supply connected to the Arduino is used, but supply through USB is possible as well. In the latter case the relay as shown in the schematic will not work. Eventually a 5V relay can be used, connected to +5V instead of Vin.
Software
--------
The sketch is an extension of the original morse code generator. Additional to the 3 jumpers for the texts a 4th jumper is present to activate the clock. This jumper has priority over the original 3 jumpers. If the clock jumper is placed the actual time will be sent 2 or 4 times every hour (selected with the Q-command). Standard the format will be numbers ("06:30") but also words ("half past seven") or roman numbers ("VI-XXX") is possible (change with the N-command).
Two buttons can be connected to send the time (no text, allways numbers) and the date on keypress. In the sketch also the option is available to send the temperature on keypress (by uncommenting a couple of lines), but because this is the internal temperature of the DS3231 chip the practical use may be poor.
And last but not least an alarm clock is included; the alarm sound is a message ("; wake up") followed by the time, which is sent every minute (max. 10 times). As soon as the alarm clock is activated by the switch, the automatic sending of time is stopped to ensure your night's sleep.
Setup of time and date and recall of messages can be accomplished through the USB-interface of the Arduino and a terminal program on a PC. I use "putty" for that purpose, but any terminal program will do. The serial monitor of the Arduino IDE is not very handy (but still usable) for this purpose, because it allways sends an "Enter" after every command and (worse) because "ESC" will not be sent. More information about commands can be obtained by typing 'H' or '?'. The sketch generates helptext and other output in english, but optionaly german and dutch are available (see sketch). Everything sent as morse code is also visible with the terminal program.
Manual
------
Commands for setup:
set clock date and time: "X2022-11-09 21:24"
set alarmtime: "W07:30"
input text 1: "AThis is text1"
input text 2: "BAnd this is text2"
input text 3: "CBut there are 3"
set number/text/roman: "N1" (0=number, 1=text, 2=roman numbers)
set quarter of an hour: "Q1" (0=half an hour, 1=quarter of an hour)
set pause time: "P10" (this is the time between repetitions of text 1/2/3, 5-60 seconds)
set speed: "S100" (this is the length of a dot, 40-500 ms)
set pitch: "T440" (this is the frequency of the tone, 120-1500 Hz)
Typing "ESC" will end the input immediately without change. Commands must be closed with "Enter".
A single letter without any data will show the actual setting without sending morse code.
commands for output (terminal and morse code):
send time: "Z" (in arabic or roman numbers)
send date "Y" (arabic numbers, text or roman numbers)
send day "D" (the name of the day as text)
send temperature "E" (rtc-chip, degrees centigrade)
send text 1 "1"
send text 2 "2"
send text 3 "3"
send live message "M", followed by the text. End with "ESC".
Additional:
show helptext "H" or "?"
Remarks
-------
There is a flaw in the roman representation: because in that old days they started counting at 1, the number 0 (zero) is not available in roman numbers, I have no good idea how to represent a time like nine o'clock. The clock will send "IX-".
The speed is set as the length of a dot in ms. Often speed is expressed as wpm (words/minute) or gpm (groups/minute). The speed in wpm can be calculated as follows: wpm=1200/tdot.
There is still a small problem in my situation: because the waf (wife acceptance factor) seemed close to zero there is no acceptable place in our house to install the clock.
Discussion (0 commentaire(s))