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

_q12x_

DIY
Reaction score
212
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)
electronic lock kit.jpg
 
https://www.jameco.com/Jameco/workshop/TechTip/555-timer-tutorial.html

Have a look at figure 6 in the link above. I reckon you ought to be able to work out a way to use this 555 monostable circuit to do the work of S53 to clock the final flip flop. And the 555 RESET input set LOW to inhibit further action in response to the pressing of S53 until the 555 RESET goes HIGH - (what S2 does in figure 6).

You can use the logic Q or Q* outputs of the final FF U2B and/or U3 to set the 555 RESET input LOW or HIGH depending on the state of the final FF U2B.

The resistors and capacitors connected to S1 of figure 6 debounce the contacts.

I picked a 555 circuit because I know you have some in stock.

Have fun working it out.
 
Thank you mister @marconi
I solved the problem actually, yesterday. I also thought on using a 555 as well. We are on the same line of thought, which is very GOOD !
I did it with a discrete Flip-Flop cct. Also with a discrete AND or Binary Bit cct.
Also with a 4081 AND gate IC.
It works perfectly in the simulator ! It remains to test it on the breadboard.
It was HARD to do it, but Im proud I did it.
Thanks for being on the same line of thought with me ;)
electronic lock kit Copy.jpg
 
Nice to see discrete transistors used to make circuits. I don't know if you do it but I used to and still do take a dc voltmeter with the negative inout connected to the 0V rail and then use the positive probe to measure voltages at various points of the circuit in order to imprint in one's mind and later on confirm all is well. eg, when a silicon transistor is turned on there ought to be between 0.6 and 0.7 V between its base and emitter. Similarly measure collector to emitter and base to collector.
 
  • Im not very proud to say that Im not measuring mostly anything when Im making my circuits. I know I should be more ... disciplined in this direction. I am though, using hints from placing LEDs in various important locations of the cct. Usually a LED will signal me most of the time, if something is wrong, either in the entire cct or in a module. It is somewhat equivalent to measuring with a voltmeter (as you describe it). My way is more...visual. Heh. It works this way with microcontrollers and why not, with normal ccts.
  • The only exception Im turning to measuring, is when I hit a wall, when I can no more intuitively distinguish the problem(s). So in extreme cases, Im starting to measure, as you just said/explained. But not as a normal day-by-day thing.
  • Im also checking a transistor, as you already explained, but only when I dont know exactly its E-B-C pin order, or when Im unsure if its working or not, damaged. Its an alternative to using the transitor tester. I do use this 'manual' mode from time to time, but not as routinely as I did it before having the tester.
  • I hope it makes sense. If I didnt understood your point, then clarify further.
- And thanks for your answers. Also to our silent viewer, mister DPG. Haha.
To be very sincere, Im not very sure I understand to what are you referring in your advice.
 
Hahaha,
1680382512413.png

No, seriously, you should not believe -everything- is written on internet as the facto. Hahahaha.
I don't. I like to think for myself. You are aware that every language, every country and its people has its different and regional ways of thinking things. Right? The same goes to words and expressions. We romanians, or at least here in Moldova territory side of Romania (not the Moldova country) , we are quite literal in our speaking and reading language. English is using a LOT of shortcuts for weird phonetical sounds or letters or symbols. For me, "a thing or two" literally means "a thing or two", which is very little. And not "a lot" - hahaha. Be careful what you choose on internet. I am.
THis guy here that is explaining the meaning in this article, he is using sarcasm in its explanations, or simply ill will just to f*uck people minds, to give some obscure new sense to the expression. It's my VERY strong impression. I do not think is a normal explanation, even if im not a fluent or consistent english speaker ! It's my impression. Very funny though. Haha. You little... ;)
 
I always enjoy your threads q12x. I admire the way you stick at things until they are solved.

And the differences in language and culture are fascinating. The world would be a boring place if we were all the same.
 
In your #3, is the note about C7 actually referring to C6? I can see why C6 may be required in a simulation of the circuit to reduce the frequency response of the circuit to avoid high frequency oscillation and also to progressively reduce the impact of high frequency thermal noise of one of the 'state switching' transistors. But I do not see such a low value having much impact using real components where like for like they are not electrically identical as they are when modelled in the simulator.

If you ponder for a moment this - there actually needs to be a minute difference in electrical response between the two halves of the bistable circuit otherwise it would settle happily on a 'knife edge' ie: for exact similarity between both halves of the bistable circuit the transistors would be partially on to the same degree. Real components inevitably provide the minute difference between the two halves.

As a further learning point, one sometimes see capacitors in parallel with R79 and R80 - commutation capacitors is one name for their purpose - which speed up the switching between the stable states of TRleft on & TRright off and TRleft off & TRright on. If you want to learn how they work look at this piece:

Commutating Capacitor or Speed up Capacitor - EEEGUIDE.COM - https://www.eeeguide.com/commutating-capacitor-or-speed-up-capacitor/
 
Last edited:
In your #3, is the note about C7 actually referring to C6?
Oh shi*/t - yes I didnt see it. It is referring to C6.
You see, the proteus simulator IS auto-renaming a lot. And is good for the most part. But not in my case with my static notes.....
I get a very nasty error -sometimes- in this simulator. Read carefully the timestep number. Is to the power os -17!!!! its enormous. So the simulator is doing some monkey bizniz behind the scenes.
1680432730590.png

1680432720349.png

My solution to add this cap there, on that node, was to delay that extreme small number.
It is a simulator thing. Not a real thing !
But I also get your point with :
"between the two halves of the bistable circuit otherwise it would settle happily on a 'knife edge' "
very good observation !
 
Last edited:
I made a movie about this project. I hope you like it.
I am not allowed to post my video link here on the forums, because marconi asked me to. The reason was 'swearing' and I can not change it at my age. Heh.
Instead, follow the link or search the name in Youtube and you should find it very Easy.
1680435846469.png
 
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.
1680444480584.png

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?
1680444533396.png
 
Last edited:
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....
 

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

Similar Threads

Hello ! I am building for some time a cct to drive a 3digit multiplexed LCD. (from aliexpress) From the sellers on aliexpress I managed to find...
Replies
7
Views
1K
Background Two weeks ago, lightning struck a tree in our yard. Many circuits tripped and several electronic devices failed. There was a strong...
Replies
2
Views
863
B
Prefix - I've tried to post this in automotive, but it would not let me. This may be because I have not been recently active. Apologies if this is...
Replies
3
Views
3K

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

Electrical Forum

Welcome to the Electrical Forum at ElectriciansForums.net. The friendliest electrical forum online. General electrical questions and answers can be found in the electrical forum.
This website was designed, optimised and is hosted by Untold Media. Operating under the name Untold Media since 2001.
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock