Morse Code Communication Transmitter and Receiver

Intro: Morse Code Communication Transmitter and Receiver

Morse Code means converting the alpha numeric symbols (i.e. alphabets and numbers) into dots and dashes. Each symbol has different arrangement of dots and dashes which make them unique. Morse Code is use to send the secret data or the coded data. In this project, I have created the transmitter and the receiver section of the Morse Code Communication. The uniqueness in this project from different morse code communication projects is that the algorithm of the receiver section is really simple than any other algorithm.

Step 1: Transmitter Section

The Transmitter Section is used to send the input data through LASER.

Hardware Required :-

1. Arduino Uno - 1

2. LASER - 1

3. Breadboard

4. Jumper Wires

Connections:-

Connect the positive pin of LASER with the 13th pin of Digital Input in Arduino(As programmed in the code). Connect the GND of LASER with the GND of Arduino.

Program:-

The Algorithm of the Code is as followed:-

1. The data which has to be transmitted is kept as input and it is stored by an array of char.

2. The LED pin which has to be transmitted is defined.

3. Speed of the Morse Code is set.

4. Dots and Dashes are defined.

5. The inputted character is checked through switch case and the corresponding HIGH and LOW of the LASER is transmitted.

The Code is attached with this document.

Step 2: Receiver Section

The coded data which is sent by the transmitter is received and processed, after then it is displayed on Serial Monitor.

Hardware Required:-

1. Arduino Uno - 1

2. LDR - 1

3. Resistor - 10K ohm - 1

4. BreadBoard

5. Jumper Wires

Connections:-

Connect one end of the LDR with 5V of Arduino supply. Connect other end of the LDR with 10K ohm resistor as well as with analog input A0. Connect the other end of resistor with GND of the Arduino.

Program:-

The algorithm used in receiver section is the easiest algorithm than any other available on internet. This algorithm is full on observations.

1. When there is no LASER falling on the LDR, then the value of LDR will be less than 1000. If the value is coming beyond 1000 even if the LASER is on glowing on the LDR, then you need to cover the LDR to protect from extra light entering into it. Here, the LDR is covered with a dome made of black chart paper.

2. When the LASER falls on the LDR, the value goes beyond 1000, and then it will enter into a loop.

3. Now quantize the values i.e. if the value goes beyond 1000, then assign it as '1' , otherwise assign it as '0'.

4. Inside a loop, calculate the number of '1's and '0's. Set the counters 'a' and 'f'. Count the number of '1's and store it in 'a' and similarly count the number of '0's and store it in 'f' respectively.

5. Now check the specific values of 'a' and 'f' respectively. Each character will have different set of 'a' and 'f'. The matching value will be displayed.

The code is attached with the document.

Limitation:- The program which is attached to the code is used to print the specific characters. You can enhance the code further by the use of Combinations and display all set of characters. The main objective of the code is to make you understand the algorithm and working.

Share

    Recommendations

    • Optics Contest

      Optics Contest
    • Halloween Contest 2018

      Halloween Contest 2018
    • Plastics Contest

      Plastics Contest

    7 Discussions

    0
    None
    pranav1895

    1 year ago

    I made this program just for the transmission of the specific letters. Now, if you consider a dot, it will be counted as 1. A dash will be counted as 3 (since 3 1's will come together). So a dot and a dash will sum up to 4. The length of the buffer which I kept was 14. So if 4 is filled then 10 is left and if the condition got true, then it will print 'A'. This was the easiest approach which I thought.

    2 replies
    0
    None
    Harizan16pranav1895

    Reply 10 months ago

    hi. how did you get the length of buffer at 14?

    0
    None
    pranav1895Harizan16

    Reply 10 months ago

    So that the length of each letter which is in terms of dots and dashes can be fulfilled and also the receiver can read the quantized value more precisely.

    0
    None
    _iffa

    1 year ago

    Hi there, I'm new in this, I don't understand they way you define a and f in the receiver part. Let sat 'A'='.-' how do you determine the value of a(dot and dash) as 4 and f(space) as 10? and why the sum of a and f is 14, does it required to be 14 or how? Really appreciate the answer

    if(a==4 && f==10)

    {

    Serial.print("a");

    }

    if(a==6 && f==8)

    {

    Serial.print("b");

    }

    if(a==8 && f==6)

    {

    Serial.print("c");

    }

    1 reply
    0
    None
    pranav1895_iffa

    Reply 10 months ago

    Actually i took a buffer of value 14. Now if u see, 'A' has a dash and a dot. Considering a dash as a group of 3 dots, total no. of dots in 'A' will be 4. Now if there are 4 dots then 4 out of 14 buffer value will be filled and 10 will be empty. So the receiver will check that if a= 4 and f= 10 means 4 dots are present which decodes to letter 'A'.