need help with a 4bit combination lock system

Papabravo

Joined Feb 24, 2006
21,159
You need something that counts the three attempts. This could be an

  1. Up Counter that goes "0-1-2-3"
  2. Down Counter that goes "3-2-1-0"
  3. A shift register that shifts 1's at the right that goes "000, 001, 011, 111"
  4. A shift register that shifts 0's that goes "111, 110, 100, 000"
And many other variations on that theme.
 

Thread Starter

matthew26

Joined Feb 21, 2011
6
You need something that counts the three attempts. This could be an

  1. Up Counter that goes "0-1-2-3"
  2. Down Counter that goes "3-2-1-0"
  3. A shift register that shifts 1's at the right that goes "000, 001, 011, 111"
  4. A shift register that shifts 0's that goes "111, 110, 100, 000"
And many other variations on that theme.
any way could get you to show me how to put the shift register into the circuit?
 

spinnaker

Joined Oct 29, 2009
7,830
any way could get you to show me how to put the shift register into the circuit?
Why not just use a microcontroller? You would have to learn programming but that is not too difficult. It would make the job so much easier and open up a whole bunch of options.
 

Thread Starter

matthew26

Joined Feb 21, 2011
6
Why don't you show me how you think it should go and I'll tell you if I think it will work
View attachment 4bit drawing.pdf

if i split the 2 grounds from the red and green LED's and put the red LED into the D flip flops and ran it back into the circuit. after the 3 attemps of (high's) 1 going into the D flip flops would it then lock out until it was reset?
sry for the bad drawing it wouldnt let me edit the original picture i got from this site
 

Papabravo

Joined Feb 24, 2006
21,159
Your "Go/No Go" signal should be used to derive the clock. The data_in for the first stage should be set to zero or one and then you need to decode three identical outputs of all zeros or all ones depending on the data in choice.

Last you need a way to RESET the shift register
 

Thread Starter

matthew26

Joined Feb 21, 2011
6
Your "Go/No Go" signal should be used to derive the clock. The data_in for the first stage should be set to zero or one and then you need to decode three identical outputs of all zeros or all ones depending on the data in choice.

Last you need a way to RESET the shift register
last question
what would be the best way to reset the shift register?
I need a hint cause I really have no clue or i would do it myself
 
Last edited:

Papabravo

Joined Feb 24, 2006
21,159
That is a really good question. From a logic standpoint another switch would do the job. From a security standpoint you would have to think about where to put it, how to access it, and how to activate it.
 

Thread Starter

matthew26

Joined Feb 21, 2011
6
That is a really good question. From a logic standpoint another switch would do the job. From a security standpoint you would have to think about where to put it, how to access it, and how to activate it.
couldnt i just put the "go" through to the clear? and reset it when the right combo is used? then after the power went off the D flip flop would just reset itself? because its suposed to lock up and not work after 3 attempts
 
Top