Documentos de Académico
Documentos de Profesional
Documentos de Cultura
for sending the international distress sig- of Morse transmissions have gone up tre-
Features nal: SOS. The SOS signal is keyed as: mendously with the arrival of computer-
Simple analog front end ized transmission and decoding based on
NE567 tone decoder intelligent algorithms. A revival of Morse
Arduino Morse Decoder sketch s o s was seen when radio amateurs developed
Glitch fighting software methods and programs to recover Morse
Simple calibration to match Morse Morse code relies on precise intervals of
speed time between dits and dahs, between
Single-sided PCB letters, and between words. The chart
Zero-SMD design in Figure 1 shows these relationships.
Telegraphists should comply with these
rules, hammered home during their
First off, the mention of code in this training:
article does not refer to microcontrol-
lers, but Morse. In the Morse code, short the length of a dot is one unit;
signals are popularly referred to as dits a dash is three units;
(represented as dots) while long signals the space between parts of the same
are referred to as dahs (represented as letter is one unit;
dashes), where the descriptors long and the space between letters is three
short refer to the time the Morse key is units;
held down. the space between words is seven
With the advent of radio communications, units.
an international version of the Morse code Figure 1. The Morse alphabet or Wireless Code.
became widely used. Although the code hasnt changed sub- Radio telegraphy would be a Tower of Babel
The best known usage of Morse code is stantially since the early days, the speeds without it.
to ARDUINO UNO
DIGITAL (PWM~)
AREF
GND
~11
~10
~9
~6
~5
~3
13
12
2
K2 K1
10 9 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1
+5V
C2
D1
R3 R6
33n
2x D2
27k
4k7
R5 1N4148
56k
C1 R9
2
R4 100k
1 6
K5 33n IC1.A 39k C4 R8 LED1
3 7 9
IC1.B 10k R14
5 8
47n IC1.C
4k7
10 R11 R15
330R
10k
4
V+
C6 3 8
INPUT OUTPUT
+5V 47n
R1 R12 R13 IC2
5 1
22k 680k IC1 = 324N 18k TIM R OUT FIL
P1 LM567CN
6 2
13 TIM C LOOP FIL
14 C7 4 10k GND
P2 R2 R7 IC1.D R10
C3 12 IC1 C5 7 C9 C8
4k7
820R
4k7
1u 11
4k7 50V
100u 47n 120n 270n
50V
+5V
1 2 3 4 5 6 7 8 1 2 3 4 5 6
K3 K4
140086 - 11
IOREF
RESET
3.3V
5V
GND
GND
Vin
A0
A1
A2
A3
A4
A5
POWER ANALOG IN
to ARDUINO UNO
Figure 2. The Morse Shield is an all-analog front end converting 1-kHz Morse tones to a format Arduino can understand. The key component is the LM567
tone decoder IC tuned here to 1 kHz.
from utter blubber signals that even old- The hardware An interrupted 1-kHz tone like a Morse
timer telegraphists deem impossible to Lets look at the schematic in Figure 2. signal results in a squarewave signal
resolve by ears & brains as the beeps and For those with no more than an I/O-ori- at the output, whose pulse length corre-
chirps are buried in noise. ented interest in the project, here goes: sponds to the duration of individual tones
Like the LP and the vacuum tube, Morse K1-K4 are pinheader connectors for (dahs and dits).
was supposed to die various times in the connecting the Shield to the Arduino A potentiometer at the input of the inter-
not too distant past but it survived mirac- UNO board; K5 is the stereo connec- face is used for matching the output level
ulously, with many radio hams keying tor for where the Morse audio signal is of the receiver to the decoder input. IC1,
away enthusiastically and enjoying the applied. Summarizing, the magic hap- a good old LM324, forms an active 1-kHz
great benefit of requiring very low band- pens between the tip receptacle of K5 filter. It is followed by an amplifier con-
width and very low TX power. Depending and pin 2 of K1. figured for an amplification factor of 10.
on etiquette and your handwriting Morse Morse audio signals output by a suitable Diodes D1 and D2 in the feedback loop
can also make friends for life. receiver cannot be used by a computer of the amplifier ensure that the output
Decoding Morse signals by ear (and brain) just like that they require an inter- signal is limited to approximately 600 mV
is a skill that can be learned with perse- face which converts the Morse tones to peak to peak. After some attenuation by
verance and some radio amateur clubs a square wave signal which the computer R10/R11 at the output of IC1c the signal
still provide training in keying and decod- can understand, and which simultane- gets fed via C6 to the input of the (good
ing. Both skills seem tailored to farm- ously suppresses interference, of which old) LM567-based tone decoder, IC2. Its
ing out to a computer though or even there is a lot on SW thanks to com- output, pin 8, swings to logic 0 as soon
a microcontroller, and here we propose puters /. as a 1-kHz tone is applied. LED1 when
an Arduino and a whiff of a-n-a-l-o-g cir- The main part of the circuit is the audio lit indicates reception of a Morse signal.
cuitry that decodes Morse signals received tone decoder. Assuming everything
from a short wave radio receiver. The CW works, a 1-kHz tone applied to the input Software
sections of the 80-m and 20-m ham radio produces a logic 1 at the output. If there Software was written (a Sketch got
bands are good places to start. is no signal the output goes to logic 0. created) to enable the Arduino IDE to
Figure 3. The printed circuit board for the Morse Decoder Shield is single-sided and takes through-hole parts.
basic soldering skills and a keen eye for visual inspection for solder joints subject Testing dahditdah
everything stated in the component list. to improvement and component value As initial settings, preset potentiometer
The Arduino connectors K1 through K4 and/or placement issues. On GO, connect P1 needs to be adjusted to set a fre-
are at the copper side of the board. the shield to the Arduino Uno board via quency of 1 kHz on the LM567CN. The
After assembling the board, give it a good connectors K1K4. other preset, P2, is adjusted to match
the audio volume of the Morse signal as
produced by your receiver.
{TCNT1=64536; As a test procedure, first connect a
if(j == 1) Morse input signal to stereo jack con-
{
nector K5. Then connect the USB to the
Serial.println(Decoding message...);
j=0; Arduino board. Program the Arduino using
} the file Morse code from the firmware
if(digitalRead(PIN) == 0) folder. Open the serial terminal set at
{ 9600 baud rate.
if(count_ones > 1)
Proceeding to the (optional) calibration
{
final_arr[loc] = count_ones; phase! Press C from the keyboard within
loc++; 30 seconds after powering up, else the
} device will take the calibration value
count_zeros++; saved in the EEPROM. If the EEPROM con-
count_ones=0;
tains no saved value then the default is
}
if(digitalRead(PIN) == 1) 36 ms.
{ For the actual calibration, apply a Morse
if(count_zeros != 0) signal of the letter E for the system to
{ calculate the dit time.
final_arr[loc] = count_zeros;
With the calibration done, you can input
loc++;
} the Morse message to be decoded and
count_ones++; hopefully read along with the help of your
count_zeros=0; Arduino. Next step will be to learn NATO
if(count_ones == 300) spelling, Q codes and other lingo used by
{
radio hams and telegraphists.
TIMSK1 &= (0 << TOIE1);
j=1;
count_ones=0; Do you copy?
dot_dash_decode(dot_count); Over to you now. Elektor being an elec-
starch_tree(); tronics magazine its QRT (/kju ar tokio/)
Serial.print(\n);
(thats signoff) as far as this article is
Serial.println(Waiting for next message...);
loc=0; concerned. Morse aint SK (Silent Key),
} its FB (Fine Business)!
} (140086)
}