1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Morse Code project

  1. Mar 15, 2015 #1
    1. The problem statement, all variables and given/known data

    Hi everyone. I am currently embarking on a Morse Code project which involves building a circuit to display Morse codes, eventually displaying the Morse code with a 7 segment display.
    I am currently stuck at the first stage as I am not sure of what to do, i.e. what chips to use. My lab has a lot of chips in the rack, which made me totally spoilt for choice.

    Currently, I have a 555 timer and a push button (related to the RESET button above) installed on my breadboard. The button is working perfectly fine as of now.

    I am required to display the short signals via one LED and the long signal via another LED, but I don't know how to split the signals currently.

    2. Relevant equations

    3. The attempt at a solution

    My teacher advised me to output only the short signals first before thinking of putting out the long signal (on the other LED).

    I have tried to think of a way to implement the system and I think, we need to use a multiplexer, since this involves multiple inputs: 1. RESET button and 2. the 4-bit DIP switch which is a way to set the desired numbers you want to translate to Morse code. However, I don't know which type of multiplexer to use.

    I have thought of using a 3-to-8 multiplexer (Use 2 inputs only, one from DIP switch and the other from RESET button). Since I only need 2 outputs, one to LED representing short signal, the other to another LED representing long signal, I will use a NAND or AND gate to reduce the 8 outputs to 4 and eventually to 2.

    May I know if this will work? If not, can anyone give me advice on how to design this system?

    Thank you! :)
  2. jcsd
  3. Mar 15, 2015 #2


    User Avatar
    2017 Award

    Staff: Mentor

    What do you want to do? Push a button in a morse code pattern and get the result displayed?
    Then you'll first have to define how "pushing the button" is interpreted. For example, what happens if you push it for one second? Is that a long signal, a short signal, something else, ...?
    How do you distinguish between "pause between bits" and "pause after a letter"?

    Your timer will be useful to record how long the button has been pushed, or not pushed, but you'll need some way to convert that to a logical input for the remaining circuit.

    Does that follow some deeper logic? I don't think you can just connect your inputs to a multiplexer and expect some useful result.
  4. Mar 15, 2015 #3
    Hi mfb. I shall respond to your questions here:

    Yes. I will have to push the button which is already present in the circuit in order for the circuit to output a reading, and hence, display the result.

    The pushbutton is just a switch, I believe. The DIP switch will continuously give an output to my chip. When I press the pushbutton, the result will "flow out" of the chip to give a display in the form of LEDs. (one for long signal, one for short signal, i.e. the flashes will be consistent in intervals.) I suppose I will push the button once and let it go. Perhaps for simplicity, I shall assume I push the button for 1 second.

    This is the part where I am stuck I think... For now, I am told to build the system with just the short bursts, i.e. for 1 --> 1 short burst, 2-->2 short bursts, etc.May I have your advice on this?


    I think I may have said MUX wrongly-- I should be using a demultiplexer, as I would need less inputs and more outputs.

    Thank you. :)
  5. Mar 15, 2015 #4
    I am not sure about the deeper logic as of now. >< But I believe there is a deeper logic as this project doesn't look simple to me. :(
  6. Mar 15, 2015 #5


    User Avatar
    2017 Award

    Staff: Mentor

    Okay I don't understand your setup.

    How do you enter "..-", for example? How do you enter "..--" or "..-."?
  7. Mar 15, 2015 #6
    I see. Sorry for being unclear in my explanation and description above.

    For example, if I want to output a "2" (in DEC notation), I will push the 4-bit DIP switch to 0010. The DIP switch will output its signal to the chip.

    Do you need me to show you a picture or the circuit diagram of my 4-bit DIP switch? :)
  8. Mar 15, 2015 #7


    User Avatar
    2017 Award

    Staff: Mentor

    How is 0010 related to ..---?

    Edit: Wait, your input is the number in binary, and you want to display it on a 7-segment display (as "..---" in some way) together with LEDs producing the morse code as time sequence?
  9. Mar 15, 2015 #8
    Oh. No. I am doing D1A of the project as of now, which requires me to "read input from 4-bit DIP switch, RESET button (which is the push button I have now) and design the circuit." You may refer to the picture for more information above. :)

    Yes, my input is binary. The 7-segment display comes much later in the project (the last stage).
  10. Mar 15, 2015 #9
    I think I have to somehow find a way to split the signals. :( I'm not very sure about this.

    I will have 2 LED bulbs in the system, one to represent short signals, and another for long signals. Hence, for "2" (as an example), I will have 2 blinks for LEDshort signal, 3 blinks for LEDlong signal.
  11. Mar 16, 2015 #10


    User Avatar
    2017 Award

    Staff: Mentor

    Okay. So I think you'll need two things: one that gives 5 impulses and one that determines which LED to use in each case. Which also means you need some way to know "this now is the second pulse" - a counter?
  12. Mar 16, 2015 #11
    I see. I have a 555 clock built into my breadboard.

    Hmm.. A counter. My friend mentioned about using a counter too because he said something about, when the chip counts down, e.g. if I put my DIP switch to 0100 (which is '4' in DEC), it will blink 4 times for the short signal. I think I can use a 74'191 chip which has a D/U(BAR) port for counting. :) I think the pulsing part is okay for now (assuming the counter counts in the fashion: "4"[HIGH], [LOW], "3"[HIGH], [LOW], "2"[HIGH], [LOW], "1"[HIGH], [LOW], "0"[HIGH], [LOW]. The HIGH and LOW represents pulsing of the LED.

    Is it possible if I were to use a MUX or demultiplexer (a chip where I can put in 3 inputs, from button, from the DIP switch and another input to decide which LED to output the signals to) to do the switching between the outputs?

    Thank you for your help once again. :)
  13. Mar 18, 2015 #12


    User Avatar
    2017 Award

    Staff: Mentor

    I don't understand what you want to put where here.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted