Electronic Lock using 74LS74 DTFF | Page 2 | on ElectriciansForums

Discuss Electronic Lock using 74LS74 DTFF in the UK Electrical Forum area at ElectriciansForums.net

_q12x_

DIY
Joined
Jan 22, 2021
Messages
587
Reaction score
212
Location
New York
Im making this cct for fun. Ive seen it in a video on youtube, with different IC's. So I decided to adapt the cct to what IC's I already have.
And it is working perfectly, both in simulator and in reality (on breadboard). But while building it, testing it, and playing with it, I noticed a problem.
If button S53, the one with C4 in parallel to it, is pressed, it will bounce a bit, and the CLK on pin 3 will activate -multiple- times. Most of the time, the contact is as it should, only once and the CLK will be activated normally. But in random times, the button will bounce, depends the way Im pressing the button I guess. The cct behave like this: doesn't matter how many times any other button will bounce, it will still create the logic flow, correctly, even if Im purposely press, for testing reasons. But this last CLK button, S53, is tricky in the logic chain. If pressed once, it will activate the Unlocked LED, and the AND gate will set to LOW, the first 3 CLK's. But if pressed once more, the second time, it will toggle the LED off, but also the AND gate, and in turn, it will reset the entire logic flow to it's start.
My question to you is this:
- How to make S53 be pressed only once, and on other presses, doesnt matter if bounced or intentionally by my finger, to not clock anything anymore. The only real reset will be S54. So far, I can reset from 2 buttons, S53 and S54. But S53 should not reset the cct, only S54.
This is more as a fun challenge.
My immediate solution is to use another FF (Flip-Flop) only for this S53 button. But... Im afraid I might complicate things way too much.
Im very curious what you will come with.
Thank you.
(click the image to enlarge and zoom in)
[ElectriciansForums.net] Electronic Lock using 74LS74 DTFF
 
Mister @marconi
What is the role of the Set pin (4&10) on the 7474 chip? Besides setting or inverse of a reset.
Is it an input? If it is, then I believe it should be linked to + or -. To avoid random triggering. Right?
I believe I RE-solved the circuit problem and make it even smaller than it was and even better in functionality.
View attachment 107289
This is the new and improved cct !
All those INPUTS (S) representing the SET pin of the FF, are now linked to + rail, directly. This result comes from testing in reality. I was still having problems on the last (4th) FF on the CLK pin, with that bouncing button. But I believe, NOW when all these inputs are set to High, and not floating anymore, might affect the good functionality of the FFs. I think I am right... what you say?
View attachment 107291
Unused input and control pins should never be left floating to avoid spurious operation of the logic circuits.
 
Unused input and control pins should never be left floating to avoid spurious operation of the logic circuits.
Thank you.
Indeed. I remembered it way too late. I did mentioned that Im still learning the logic ICs, right? So the very big mistake I did was to Not convert properly the original cct into my ICs that I have ! But is a lesson for me. I spent 2 days on it. I think....
 
Thanks for those 2 pages. I actually have a VERY long history with bouncing buttons in my circuits, with various implementations (RC, 555) if you might even remember some of them, but I have these issues from long before you. And I come across, 'a time or two' (to paraphrase someone, haha) in my life over Denouncing ICs and I always overlook them. I think it is time to commit to take some of them IF they are cheap enough in bulk. I'll have to check it ! Very good reminder, looking over your 2 pages ! Thanks.

[ElectriciansForums.net] Electronic Lock using 74LS74 DTFF

Yes, I give it a quick look over ebay and aliexpress and they are not cheap. Especially in bulk. Damn. When I say -in bulk- I refer to 100pcs, minimum.
Heh, 74HC00 used as a debouncing IC, that is very new to me ! Very interesting.
-I do know about RC debouncing cct, but to be very sincere, I did neglect it in my previous project. I forget about it. I was concentrated to the other important aspects of the larger cct. It is a good reminder though !
 
Last edited:
I have 2 interesting Questions for anyone here looking to my posts.
-Question1- What is the role of that 4011 NAND gate in the original cct ?
I have 3 Theories about its role.
  • T1: The role of the NAND gate is to automatic deactivate S1 to S8 AFTER LED1 is ON, by setting HIGH the first 3 Gates Reset pins, resetting them, until S9 or S10 is pressed, that in turn will reset only the 4th gate.
  • T2: If it is indeed a gate used to reset the first 3 FF's, why in the hell didn't do it like I did it? Linking all 4 Reset pins together. I am still absolutly perplexed why he used it there. It still has no sense to me. The only logical sense is if it was having some LEDs there, that he didnt wanted to keep them open when the last digit in the opening code was activated. For curious eyes, not to see which leds/buttons were activated. But it is not having any LEDs in the cct either. It is a true mystery that NAND gate there.
  • T3: The designer didnt know anything about logic ICs and he slap it there, just because, no reason whatsoever. Just to make a Bigger cct, for appearances that it is 'complicated' and fancy. He might be an idiot.
[ElectriciansForums.net] Electronic Lock using 74LS74 DTFF

- - -
-Question2- Now the fun part! Hehehe. I already solved this problem. I worked on it probably 1 day and I figure out a solution. It is working fine in simulator, but I didn't test it on the breadboard. But I will very soon, just to be sure. If you like to play logic games, like I do, give it a try. I will post the cct I made, but after awhile. Not right now. I will give you time to think.
So... the cct we are using is from post #8 and the problem is like this:
- How would you add a LED for each Switch in the cct? To light when the button is pressed, but not all LEDs at once! Only when you press a certain button, its corresponding LED, let's say it's "parallel" LED, will lit up, telling you THAT button is in pressed state.
I will give you a hint. There are 2 sets of switches. 1 set are all linked between them and to the Reset pins, and 1 set are the ones for the Clocks. You will have to adapt to each set.
Again, I solved the problem and it is a very cool one. Haha. Happy designing !
Im very curious if you will come with the same or similar solution as mine, or completely different approach. Or nothing at all. Haha. Good luck. Let's see who will be the winner ! Haha.
 
I suggest you think first about what effect the series RC circuit of C1 and R7 has. So consider:

a. What is the waveform at U2B-Q* pin 12?;

b. What will the waveform be at the point where C1 and R7 join together in response to the waveform at a?;

c. How does U3A's output respond - the waveform which is sent to the Reset R inputs of the previous FFs - when it has as its input the waveform at b above?;

d. Now consider what would be the reset waveform with out using U3A, C1 and R7 which is the way you think it should be done.

e. Finally what effect do the two schemes have on the operation of the lock circuit including how the LEDs illuminate?
 
Here is the progress so far. Only 4/6 button modules are made so far. In the final cct I linked 6 Reset pins toghether and 4 buttons for clock pins. In total 10 btns. I tested what I have here and working just fine. But is hard work and slow. Slowly but surely.
All the components are scrapped and repurposed. Those leds are VERY old, 80's or 90's and quite dim to today standards. But bright enough for this application.
[ElectriciansForums.net] Electronic Lock using 74LS74 DTFF
 
I managed to finish the Lock circuit. The final cardboard with everything on it. I also made a movie about it showing how it is functioning. WOW. Im very happy it worked from the first try ! I was very slow and careful when I build it. Also checked it many times while I was constructing it. Im very relieved I made it. Ohoha !
 

Reply to Electronic Lock using 74LS74 DTFF in the UK Electrical Forum area at ElectriciansForums.net

News and Offers from Sponsors

  • Article
Join us at electronica 2024 in Munich! Since 1964, electronica has been the premier event for technology enthusiasts and industry professionals...
    • Like
Replies
0
Views
184
  • Sticky
  • Article
Good to know thanks, one can never have enough places to source parts from!
Replies
4
Views
560
  • Article
OFFICIAL SPONSORS These Official Forum Sponsors May Provide Discounts to Regular Forum Members - If you would like to sponsor us then...
Replies
0
Views
516

OFFICIAL SPONSORS

Electrical Goods - Electrical Tools - Brand Names Electrician Courses Green Electrical Goods PCB Way Electrical Goods - Electrical Tools - Brand Names Pushfit Wire Connectors Electric Underfloor Heating Electrician Courses
These Official Forum Sponsors May Provide Discounts to Regular Forum Members - If you would like to sponsor us then CLICK HERE and post a thread with who you are, and we'll send you some stats etc

YOUR Unread Posts

This website was designed, optimised and is hosted by untold.media Operating under the name Untold Media since 2001.
Back
Top