Morse Code Display Project

Discussion in 'The Projects Forum' started by glitzy_dust, Mar 25, 2015.

  1. glitzy_dust

    Thread Starter Member

    Mar 16, 2015
    38
    0
    Hi everyone! :) I am currently doing a project, which is on building a system to display Morse Code keyed into the system via a 4-bit DIP switch. The details are as follow:

    [​IMG]

    My attempt at the project:

    Currently, I have build up a system using several chips, listed below:

    1. 555 timer
    2. 4-bit DIP switch
    3. 74157 MUX
    4. 74191 Up/Down Counter
    5. 7485 Comparator
    6. 7404 NOT gate

    I have built the system in such a way that it can read in a 4-bit binary digit from a 4-bit DIP switch, and output long and short signals from 2 LEDs, each representing short and long signals respectively. I noted that the order of display of long and short signals is complementary to one another, i.e. signals from 1 – 4 are the complement of 6—9.

    A comparator is used, so that the chip 74191 counts down when the given number is less than 5, and it counts up when the given number is more than 5, via the D/U_BARport of 74191.

    A NOT gate is put in, as the long and short signals of any given number, except for 5 and 0, are complements of one another.

    Here is my breadboard of the circuit with some explanations:

    [​IMG]
    The yellow LED in the middle is for the short signals, while the green LED is for long signal. The yellow LED at the extreme right of the photo is just an indicator of whether the PB is working correctly. PB stands for pushbutton. (Here I am assuming perfect conditions, so I neglected the circuit to debounce the circuit for simplicity). I have also labeled the chips for quick and easy identification.

    My problem so far is that when I energized my circuit, none of my LEDs lit up, except for the LED indicating the output of the 555 timer. When I pushed my PB, the LED on the extreme right, which indicates whether the PB has completed the circuit lit up, but not my short and long LEDs. Interestingly, when I pushed and held the PB in place for an extended period of time, my short LED (yellow color LED exiting port 3 of 74191) lit up and flashed continuously without stopping, while my long LED (green color LED from NOT gate) did not light up once. I know I have done an illegal connection for my short LED due to a lack of space on my breadboard. Sorry. (But will it affect the circuit?)

    Hence, may I have advice on how to solve the problems of my circuit? I took a look at my friends' projects and they all used almost 2 breadboards for the above project, but I only used one, which I think, may be a sign of trouble for me. Sigh.

    I would appreciate any help/hints given as I am feeling a little stressed out over this project, which is due in 2-3 weeks' time. :( I have attached a document, documenting my thought processes in arriving at the above circuit. If there are any mistakes/loopholes in logic, please do feel free to correct me. Thank you very much. :)

    **D1A, B and C are partitions of the big project. I am at the D1A to D1B stage at the moment.

    Thank you once again. :)
     
  2. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,995
    745
    A circuit diagram would help you further....
     
    simo_x likes this.
  3. glitzy_dust

    Thread Starter Member

    Mar 16, 2015
    38
    0
    Do you mean a schematic diagram? I thought a circuit diagram will only show how the chips are wired in the system. May I request that you elaborate more on your point? Thank you. :)
     
  4. glitzy_dust

    Thread Starter Member

    Mar 16, 2015
    38
    0
    Oh wait. Do you mean that with a circuit diagram, the community will be able to see the circuit more clearly?
     
  5. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,995
    745
    circuit diagram,schematic,drawing, whatever you call it, Post it please..
     
    simo_x likes this.
  6. glitzy_dust

    Thread Starter Member

    Mar 16, 2015
    38
    0
    Okay. I am not very sure how to draw a schematic diagram. Do you know of any free software which I can use to draw my schematic? I can try Fritzing but I have used it before and the circuit is quite messed up. I will post something in 15 minutes. Sorry. :(
     
  7. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,809
    834
    Do you have a smartphone? Draw it on a piece of paper and take a picture.
     
  8. glitzy_dust

    Thread Starter Member

    Mar 16, 2015
    38
    0
    Ah alright. I shall try to draw the schematics. :) Hang on. Thank you!
     
  9. glitzy_dust

    Thread Starter Member

    Mar 16, 2015
    38
    0
    I shall post my circuit diagram later today, as it is almost 2am here in Southeast Asia. >< Sorry. I need to sleep as I have classes later today. Thanks again for all your help! Do stay tuned for the diagram!

    Thanks~ :D

    <Circuit diagram pending.>
     
  10. glitzy_dust

    Thread Starter Member

    Mar 16, 2015
    38
    0
    [​IMG]
    Hi everyone. Here is the schematic of the diagram. I have added colors to help in visualizing my circuit. The above takes up only one breadboard of space.
    I have also attached the Fritzing diagram via a webpage to host my file as I can't attach .fzz files here, in case any of the mentors here need a clearer, larger view of my schematics.

    File address: http://s000.tinyupload.com/index.php?file_id=09418812927390823282

    Thank you.
     
  11. glitzy_dust

    Thread Starter Member

    Mar 16, 2015
    38
    0
    Update on project: I have realised my mistake. I used a MUX, to output my 4-bit number which will cause problems when the pushbutton comes into play. This is because I use the pushbutton to control the Strobe_BAR port of the MUX, hence when I release the pushbutton, the Strobe_BAR will become HIGH, disabling all outputs at once.

    Now I have replaced the MUX with a 74175 Quad D-flip flop chip to output my 4-bit number, with my pushbutton fed into the CLK port of 74175. I will update again when it works.

    However, now I have a slight problem in handling the long and short signals, which are represented by 2 LEDs, which are supposed to flash at the same frequency, with the order of flashing: short, then long. But how do you make the circuit wait for all the short pulses to finish (displaying on LED) before the long pulses (display on LED) come in?

    Thank you to all mentors who guide me along in this project.
     
  12. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,809
    834
    Can you feed the outputs driving the long/short LEDs into a NOR gate. Then feed the clock input through an input of an AND gate. The other AND gate input is fed by the output of the NOR. Hence, the clock advances only when the outputs are off.
     
  13. glitzy_dust

    Thread Starter Member

    Mar 16, 2015
    38
    0
    Ah I see. Thank you for your suggestion. I will try that later when I have successfully put out my short signals through my 1st LED. Right now, I am still having problems. :(
     
  14. glitzy_dust

    Thread Starter Member

    Mar 16, 2015
    38
    0
    Update: I connected the outputs of my DIP switch to 74175, a Quad-input D flip-flop, from which its output, I connect it to 74191 (Up/Down counter). I have LOAD_BAR connected to LOW of my pushbutton via a NOT gate (so when I push it, it becomes HIGH and through the inverter, flip to LOW). CLR_BAR of my D-flip flop (74175) has also been connected as mentioned in the previous sentence.

    I connected outputs of my D-flip flops (74175) to A,B,C,D of 74191 up/down counter, from which I connect them to a comparator 7485, comparing it with 0101, which is 5 in DEC. I connected the output from port 7, A<B back to D/U_BAR of 74191, which allows me to count down when I put in a number less than 5.

    I have connected an LED (for short signals) to QA port of 74191.

    However, I am unable to get any sensible reading when I power my circuit. The LED lit up continuously, after which when I press the button, it turns off permanently.

    May I know what is wrong with my circuit?

    I will draw the updated circuit diagram later.
     
  15. glitzy_dust

    Thread Starter Member

    Mar 16, 2015
    38
    0
    Correction: I connected CLR_BAR directly to the output of the pushbutton, so that when I push the button, CLR_BAR will be HIGH which will result in activating the D flip flop.

    Correction to the end result: The LED lit up only when I pressed the button, but once I stopped pressing it, the LED light turned off.

    Hence, may I know what is wrong with my circuit?

    Thanks! :)
     
  16. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,809
    834
    I don't quite understand from your schematic how your pushbutton is wired. It needs a pull down resistor so when it is not activated, it will provide a low signal to the IC and when it is pressed it will provide a high signal. (Note: can be wired to reverse the logic levels, too). Without a pull down or pull up resistor, the input is left floating and you cannot know what state it is in. My apologies if you know this already. Look at the schematic snippet below for an illustration of what I am talking about.

    PULLDOWN.PNG
     
  17. glitzy_dust

    Thread Starter Member

    Mar 16, 2015
    38
    0
    djsfantasi, thank you for your reply.

    Yes, my pushbutton should be connected correctly, according to my teacher's lab sheet. Thank you for your reminder to connect my DIP switch correctly, and please don't apologise, because your explanation served as a form of revision to my concept and also taught me something new - I did not know the purpose of a pull-down resistor until I read your above comments. Hence, I thank you again for taking your time to explain the above to me.

    Diagram of my pushbutton:

    [​IMG]


    Update: I know my mistake in my connections for my D flip-flop - I connected CLR_BAR to my pushbutton, so whenever I released my pushbutton, the signal goes to a LOW, and hence clear all inputs to my D flip-flops. I have now changed my chip to 74194 chip (universal bidirectional shift register), however, I am currently lacking a 7474 (D flip-flops with PRESET and CLEAR). Thus, I will have to return to school on Monday to take the chip from my lab before I can proceed further.

    I will update again in this forum of my progress so that the mentors and professionals in this forum can assist me in this project.

    Thank you once again.
     
  18. glitzy_dust

    Thread Starter Member

    Mar 16, 2015
    38
    0
    Update on project:

    Hi mentors and friends in AllAboutCircuits forum. Sorry for not updating on my progress for my Morse Code project. Currently, I still have problems putting out short signals via my 74191 counter (D/U_BAR port).

    I have drawn the schematics by hand (if it is unclear, do tell me). Please assume that my clock is working and my voltage regulator maintains the LIVE and NEUTRAL of the circuit at +5V/+0V.

    Currently, my problem is that my output from the D/U_BAR port of 74191 behaves like a D flip-flop, disregarding my inputs from my DIP switch. The LED connected to D/U_BAR of 74191 turns on and off at the rising edges of the clock (555 timer). May I know why is this so?

    Just a note, before I changed my pin selections for S0 and S1 of 74194 (Universal shift register), I checked, using the multimeter the relevant port outputs and most of them were correct, except that for QA-QD of 74194, the levels are by default HIGH, and only dips down to a sensible reading (depending on the output of the DIP switch).

    <<Changes made: Previously: S0 is connected to PB (pushbutton) while S1 is consistently HIGH. NOW: So and S1 are tied together to the pushbutton.>>

    May I know how should I rectify the above problem?

    Schematic of my project:

    [​IMG]
     
  19. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    Are you allowed to use 74194 (shift register) as it was not indicated in your pdf file. And then where do you put your 74157 MUX?

    Allen
     
  20. glitzy_dust

    Thread Starter Member

    Mar 16, 2015
    38
    0
    Hi absf. :) Yes, I am allowed to use 74194 shift register. :) Thank you for taking the time to download and read the PDF file.

    I have stopped using the MUX, so MUX is no longer in the picture, as seen from the above schematic diagram.

    Thanks! :)
     
Loading...