ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

CD4017 code lock with wrong code detection

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ส.ค. 2024
  • Learn how to build an advanced six-digit code lock with built-in wrong code detection, using the CD4017 decimal counter, the CD4081 AND gate IC, and the NE555 timer. In this project we will go through the basics of the schematic and build it together, step by step. Let me know if you have any questions in the comments, and I will do my best to get back to you. Thanks for tuning in!
    More details and an up-to-date list of all components:
    www.friendlywir...
    Monthly email list:
    www.friendlywir...
    Thanks for tuning in, and let me know in the comments if you have any questions!
    Website: www.friendlywir...
    Twitter: / friendlywire
    Reddit: / friendlywire
    Facebook: / friendlywire
    Instagram: / friendlywire
    Timestamps:
    00:00 Introduction
    00:44 What you need
    02:01 Code lock schematic & explanation
    10:19 Building the code lock
    18:02 Finished code lock
    18:25 How many combinations are there?
    18:48 Final thoughts

ความคิดเห็น • 105

  • @ryanwilliams271
    @ryanwilliams271 หลายเดือนก่อน +1

    This is a gem 100% haven't seen any of your videos of late

    • @FriendlyWire
      @FriendlyWire  หลายเดือนก่อน +1

      Thank you so much, Ryan, I am glad you like them! I just settled into a new place, and I am still re-building my studio there, but I already have a new project in the works. Stay tuned :)

  • @johnnyw66
    @johnnyw66 2 ปีที่แล้ว +5

    I'm a little puzzled why your videos are not 'liked' and 'viewed' as much as they deserve. They are very good. I'm hoping that it's just a problem with the Key Words you've chosen - and you're not going to change your presentation style (which is excellent). I've liked and subscribed. Thank you.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Thank you so much, Johnny, this means a lot, have a fantastic week! :) PS: Can I ask, are you an electronics beginner? And how did you come across my channel?

    • @johnnyw66
      @johnnyw66 2 ปีที่แล้ว +1

      @@FriendlyWire Thank you. Your channel just popped up as recommended on my TH-cam list. I'm not a complete beginner. I've dabbled with home brew radio in the past. I'm now interested in FPGAs. I've recently 'designed' a LogiSim microprocessor which I've put up on github (search for my username and 'SAP2'). Best wishes.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      @@johnnyw66 FPGA's are super interesting, I was thinking of maybe getting into them some time ago, but then I stuck with PIC microcontrollers for my videos. There is so much cool stuff to explore out there, thank you for sharing!

    • @Every_thing717
      @Every_thing717 3 หลายเดือนก่อน

      @@johnnyw66do u have an instagram account I want to get matched with u

  • @ScottWalshWoodworking
    @ScottWalshWoodworking 3 ปีที่แล้ว +2

    Hi Jens! I discovered your channel a little while back and I was inspired enough to build your binary clock. Now I'm making some simple changes to turn it into a Nixie tube clock! I'm very excited about this and I'll be making a video to document this project too.
    I enjoyed this video and perhaps I'll find more applications for discrete logic in place of microcontrollers in the future as well.

    • @FriendlyWire
      @FriendlyWire  3 ปีที่แล้ว +1

      Hey Scott, thank you so much, that's fantastic! I like your shop, it's incredible how much you put in there! And what kind of Nixie tubes did you end up using? I love Nixie tubes :)
      If you have a picture of the binary clock please let me know on Instagram @FriendlyWire, I would love to see it!

    • @ScottWalshWoodworking
      @ScottWalshWoodworking 3 ปีที่แล้ว +1

      @@FriendlyWire Thanks for checking it out! I ordered IN-14 tubes, and, in fact, they are the only component that I'm waiting for unfortunately. They seem to be taking their sweet time, while making their way from Russia to Canada. Cheers!

    • @FriendlyWire
      @FriendlyWire  3 ปีที่แล้ว

      @@ScottWalshWoodworking Nice! My first Nixie clock also used IN-14 tubes! Hope they will arrive soon. I bought most of my IN-14 tubes from Russia, and some of them were in the mail for a few months (but all arrived eventually). Hope yours will get there faster :)

  • @Mr_Motor
    @Mr_Motor 2 ปีที่แล้ว +2

    Man! Again Im impressed with your quality content. keep making it, and I also need a suggestion.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Thanks so much :) What suggestion are you looking for?

  • @md.mahbuburrahman9104
    @md.mahbuburrahman9104 2 ปีที่แล้ว +1

    YOUR VIDEO STYLE IS WOASAM 🌻🌻

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Ha, thank you very much, I am glad you enjoy them!! :)

  • @AndrewKiethBoggs
    @AndrewKiethBoggs 2 ปีที่แล้ว +2

    Fantastic videos. Thanks for the content.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Thank you, Andrew! Glad you like them!

  • @ernestfowler2418
    @ernestfowler2418 2 ปีที่แล้ว +2

    Jens, I like your idea of using a 555 chip to provide anti-bounce for keystrokes. It solves a problem I found with a counting circuit I was trying to build a while back. Now I do the counting with microcontrollers and such. The circuit you did could be done with a 7-seg display, couldn't it? With leading and / or trailing decimals you'd have 9 LEDs to play with.
    PS: Keep up the fine work!

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      Thank you for your kind words, Ernest! Technically the 555 debounces the reset line, but you could use it for switches, too! In my experience, for usual switches that are actuated 1-2 times per second, a 1uF capacitor in parallel does wonders. Oh yeah, totally, you could connect LED's to the CD4017 outputs. Now, if you wanted to show the digit that was pressed this would require a bunch of more logic to do it, and at that point it would probably be more economic to use a microcontroller :)

    • @aadhithyapasuparthi5642
      @aadhithyapasuparthi5642 ปีที่แล้ว +1

      @FriendlyWire hii! I'm a massive fan! I was wondering how you would show the digit that is pressed in a 7seg display?

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว

      @@aadhithyapasuparthi5642 Thank you, Aadhithya :) I am actually not sure. You could use diodes to decode the button into a BCD-signal, and then use the CD4511 to drive a 7-segment display. But if you want all digits next to each other in a multi-digit 7-segment display it would be much harder to do.

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว

      @@aadhithyapasuparthi5642 I'd love to help, but this is really no small project to do, and needs quite some time to plan. Have you ever worked with 7-segment displays? And can you get your hands on a CD4511 chip?

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว

      @@aadhithyapasuparthi5642 You can always use the CD4026 as a simple counter of wrong code attempts, I even have a video on that: th-cam.com/video/SQddveiff1k/w-d-xo.html
      Yeah of course, you can contact me on social media @FriendlyWire (preferably Twitter) or also via email which you can find on my website www.friendlywire.com all the way at the bottom,

  • @notenoughtech
    @notenoughtech 3 ปีที่แล้ว +1

    Love your presentation!

    • @FriendlyWire
      @FriendlyWire  3 ปีที่แล้ว

      Thank you so much, glad you like it! :)

  • @tdmmelody
    @tdmmelody 7 หลายเดือนก่อน +1

    This is a great video! I was just confused by 2 things, how do I set the initial password for this circuit? I am confused about how the circuit knows which input is the right one, also why are we using three extra buttons? Can’t I use one button to reset the circuit? Thanks!!

    • @FriendlyWire
      @FriendlyWire  7 หลายเดือนก่อน

      Thank you so much, glad you like it!
      Yeah, of course only one button is enough to reset the circuit, but if you add more buttons you make it more difficult for the person to find the right code.
      The code, as you said, is hard-wired into the diagram. You cannot set your own code dynamically, you have to re-wire the entire circuit. But if you read the companion article to this video on www.friendlywire.com, you will be able to design your own circuit with different codes :)

  • @pawelczarnecki7780
    @pawelczarnecki7780 2 ปีที่แล้ว +1

    Awesome thank

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Glad you like it, Pawel! Let me know if you have any questions, I am happy to help :)

    • @pawelczarnecki7780
      @pawelczarnecki7780 2 ปีที่แล้ว +1

      I will ask away if any questions come up. I’ve been learning electronics for about 27 years now, and you have got some talent that I could learn a lot from. Great Chanel and material.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      @@pawelczarnecki7780 Wow, thank you for your kind words, much appreciated! Keep me posted, and I would love to see a picture of the code lock when you build it! (My email is at the bottom of www.friendlywire.com, but you can of course also reach out on social media @FriendlyWire if you prefer.)

    • @pawelczarnecki7780
      @pawelczarnecki7780 2 ปีที่แล้ว +1

      I will send it in no problem

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      @@pawelczarnecki7780 Thank you! It's always so exciting for me to see these projects built by others :)

  • @jj74qformerlyjailbreak3
    @jj74qformerlyjailbreak3 ปีที่แล้ว +2

    Correction! There are 3 types of bread boards.
    1. Connected power rails
    2. Non-connected
    3. Connected Eluding Non-Connected.
    Don’t let 3 fool you.
    God Bless

    • @jj74qformerlyjailbreak3
      @jj74qformerlyjailbreak3 ปีที่แล้ว +1

      Thanks for the walk-through of this design. It really gives me an idea. I have 50 4017s otw.
      Originally I was going to cascade them all and test clock circuits. Now I guess I need to order another 50. Thanks for keeping me busy and mind off of stress.
      Once again
      God Bless

    • @jj74qformerlyjailbreak3
      @jj74qformerlyjailbreak3 ปีที่แล้ว +1

      But also couldn’t someone just press the button slowly to figure out the code. Assuming the lights remain.

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว +1

      @@jj74qformerlyjailbreak3 Oh, what's that type 3 breadboard? I am glad this video inspired you! Yup I suppose with the lights you could figure it out eventually (especially when you look at the red reset LED closely). So this is really just put in for fun (and not for final use).

    • @jj74qformerlyjailbreak3
      @jj74qformerlyjailbreak3 ปีที่แล้ว +1

      @@FriendlyWire 3rd Type is the ones that silk screen “not connected” power rails, but really are CoNectted. Make stuff go, dang ol boomy man.
      💨

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว

      @@jj74qformerlyjailbreak3 Oh I have never seen those. Good to know!

  • @wimealessandrasuege5901
    @wimealessandrasuege5901 ปีที่แล้ว +1

    Hi. can you explain to me how i can limit the number of attempts to put the code?

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว

      You could connect the wrong code signal (pin 3 of the NE555) to another CD4017 counter. This counter will then count the incorrect attempts. If you only want to allow, say, three wrong attempts, then connect Q3 of that CD4017 to the clock inhibit pin of IC1 (pin 13). Make sure to also then connect pin 13 of IC1 to ground with a 4.7kOhm resistor. This should to the trick!

    • @sakshidas8741
      @sakshidas8741 4 หลายเดือนก่อน

      ​@@FriendlyWire Hi I have connected this circuit by this trick but the lock system cannot restrict the attempts after 3 wrong attempt.So can u pls say any other method to limit the number of attempt.Pls say 🙏🏻

  • @dr.scientenium3698
    @dr.scientenium3698 2 หลายเดือนก่อน +1

    I have done it

    • @FriendlyWire
      @FriendlyWire  2 หลายเดือนก่อน

      That's awesome! I would love to see a picture of the code lock. If you can, please share it with me on Twitter/Instagram @FriendlyWire or via email (at the bottom of www.fiendlywire.com). Did everything work as expected?

    • @dr.scientenium3698
      @dr.scientenium3698 2 หลายเดือนก่อน

      @@FriendlyWire th-cam.com/video/yDn2xTaY5Uw/w-d-xo.html

    • @dr.scientenium3698
      @dr.scientenium3698 2 หลายเดือนก่อน +1

      ​@@FriendlyWire This is security lock system I have made it in youtube video you can see it

  • @talha_abbas
    @talha_abbas 3 หลายเดือนก่อน +1

    Hi, Great video. One Question, on which software did you make the schematic circuit

    • @FriendlyWire
      @FriendlyWire  3 หลายเดือนก่อน

      Thank you! I use Eagle to make the schematics (no real reason, I just like how they look like) and then I animate the squiggly lines by hand by drawing onto the schematic with GIMP and then superimposing those lines on top of it.

    • @talha_abbas
      @talha_abbas 3 หลายเดือนก่อน +1

      @@FriendlyWire Thanks A lot for this brief comment, I have my DLD Project presentation next week, saw your designs and it caught my attention. Amazing ❤️

    • @FriendlyWire
      @FriendlyWire  3 หลายเดือนก่อน

      @@talha_abbas Happy to help, and good luck for your presentation! :)

  • @502deth
    @502deth 20 วันที่ผ่านมา +1

    think you got your right and left mixed up there at 13:00

    • @FriendlyWire
      @FriendlyWire  20 วันที่ผ่านมา +1

      How so? :) All notches (circled in green) point to the left of the breadboard :)

    • @502deth
      @502deth 19 วันที่ผ่านมา +1

      @@FriendlyWire not the notches, the positive and negative voltage pins. i had to watch it 3 times because i thought i was missing something.

    • @FriendlyWire
      @FriendlyWire  19 วันที่ผ่านมา +1

      @@502deth I cannot see what you mean, I am sorry. Can you explain more what is misleading? :)

    • @502deth
      @502deth 19 วันที่ผ่านมา

      @@FriendlyWire then maybe im still confused? lol. because i used the mixed up left and right excuse to make thing work in my head.
      at 13:00 you say "connect the ic's to vdd on their top right pins" and show them getting connected to the top left pins, followed by "and to ground on their bottom left pins" then show the wires getting placed on the bottom right pins. the data sheet shows v+ at pin 18 and gnd at pin 8, so the visual makes sense to me, but confused as the narration doesnt seem to match. so concluding that the narration is mistaken makes it make sense to me. what am i missing?

  • @howitworks-anmolshastri2259
    @howitworks-anmolshastri2259 3 หลายเดือนก่อน +1

    What are the alternatives to CD 4081?

    • @FriendlyWire
      @FriendlyWire  3 หลายเดือนก่อน +1

      You can use any AND gate in the CMOS family. I used the CD4081 because it has two inputs, but you could use CD4073 (3 inputs) and just tie one permanently to VDD. But the CD4081 is the best choice.

    • @howitworks-anmolshastri2259
      @howitworks-anmolshastri2259 14 วันที่ผ่านมา

      @@FriendlyWire thanks brother

  • @anyonecanmakeit718
    @anyonecanmakeit718 7 หลายเดือนก่อน +1

    I have one doubt what if i make a safe with combination lock that runs on battery and unfortunately battery dies after couple of months then will my safe gets open automatically or it will stay closed forever i mean what would happen can u pls explain?

    • @FriendlyWire
      @FriendlyWire  7 หลายเดือนก่อน

      It depends on how you design the circuit :) But, yes, in short: when the circuit has no power left, it cannot activate the green LED at the end, and then the safe would not know that it has to open. As far as I know, many electronic safes have this problem. One way around it would be to add a "low voltage detection circuit" that warns when the battery gets low.

    • @anyonecanmakeit718
      @anyonecanmakeit718 7 หลายเดือนก่อน

      @@FriendlyWire thank you Sir for responding 🙏,
      Can u pls tell me how to add attempts i mean if someone tried 3 times to open safe and failed then safe would automatically locked forever?

  • @jpscafe7648
    @jpscafe7648 2 ปีที่แล้ว +1

    😀 belíssimo trabalho, show de 🏈🏀🥎. Parabéns pelo seu projeto e trabalho, pena que não falo inglês pra entender sua explicação.☹️ Vou me inscrever no canal. Bora, toma uma 🍺🇧🇷

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Muito obrigado! I am so glad you like the video. There is also an written version here: friendlywire.com/projects/code-lock/ . Maybe a translator website will be helpful. Best wishes, and have a great day!

  • @rafiahaider7861
    @rafiahaider7861 9 หลายเดือนก่อน +1

    Hey jens! I was wondering if we could somehow use a keypad in this project? I'm not very acquainted with electronics and it's my first time building an electronic project for my digital logic designs class so i don't really know much but wanted to like make it look more presentable maybe? Do you have any tips please?

    • @FriendlyWire
      @FriendlyWire  9 หลายเดือนก่อน

      Thank you for your question! Yes, there are keypads that are called 1x12 keypads, they have one common pin and 12 separate outputs for each key. There are also 3x4 keypads, and those are multiplexed and not usable for this project. Let me see if I can find one that would work :)

  • @srikanth1508
    @srikanth1508 5 หลายเดือนก่อน +1

    What will happen if input is ABC (we need to put B 2 times)

    • @FriendlyWire
      @FriendlyWire  5 หลายเดือนก่อน

      If you press C when you have only pressed A and then B, then the CD4017 in charge of pin C will still be at Q0, and therefore the circuit will reset when C is pressed :)

  • @AndrewKiethBoggs
    @AndrewKiethBoggs 2 ปีที่แล้ว +1

    What is another solution for the capacitors across the power terminals on the ICs. The leads on the 0.1 uF caps are too short. Do I just need to extend my leads by soldering?

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      If the capacitor is close to the IC it's OK, you could plug it into the breadboard and use a wire to extend it, for example. If you're running this circuit on batteries you can omit these 100nF capacitors to begin with, they are only important when the power supply is not a linear one that is regulated. Hope that helps, let me know if you have any other questions, I am happy to help!

    • @AndrewKiethBoggs
      @AndrewKiethBoggs 2 ปีที่แล้ว +1

      @@FriendlyWire thank you for your reply! I enjoy a creator that is so willing to help and give a way to enter into the world of electronics. I was thinking about extending the capacitors but I thought the capacitors needed to be as close as possible to the IC to ensure it works best for reliable power. I will be running this on a 9v so I may just take your suggestion and omit these. Thanks!

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      @@AndrewKiethBoggs Happy to help! Long connections to the capacitors will be OK in this case. For high frequencies these long connections would work as an inductance and introduce new problems, but in this case it is OK to have longer connections because the circuit works at very low frequencies. It is just good practice to have a 100nF capacitor close to every logic chip, that way your circuit will also work well if you decide, at some point, to run it from a different power supply.

    • @abanoubhenry8876
      @abanoubhenry8876 2 ปีที่แล้ว +1

      @@FriendlyWire i have the same problem. So what you're saying is that i can simply just not put those capacitors in my circuit?

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      @@abanoubhenry8876 They are not necessary for the functionality, under ideal circumstances. But they stabilize the circuit. I would recommend to place the 100nF capacitors directly in the power rail instead, close to each CD4017 chip. But if you run this circuit off of a battery you will most likely not need them. Let me know how it works out, Abanoub, I am happy to help and excited to see your progress :)

  • @mlozano818
    @mlozano818 ปีที่แล้ว +1

    Nvm just had to watch more of the video 👌

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว

      Ha, no worries, happy to help :)

  • @mlozano818
    @mlozano818 ปีที่แล้ว +1

    Can you please tell me where you got your jumper wires?:)

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว

      I always have all links in the companion article: www.friendlywire.com/projects/code-lock/

  • @marounn-ao4014
    @marounn-ao4014 3 หลายเดือนก่อน +1

    how to change the code?

    • @FriendlyWire
      @FriendlyWire  3 หลายเดือนก่อน

      Good question! Because this circuit does not use any microcontroller, the code is fixed and cannot be changed. If you want to change the code, you have to change the circuit. Have a look at the companion article on my website: www.friendlywire.com/projects/code-lock/ . In this article I explain how the schematic works, and after reading it you will have a pretty good idea of how you can change the code :)
      But if you are building this circuit and have the pushbuttons in a separate location, a simple way to change the code is this: leave all wires unchanged, and just move the location of the physical pushbuttons around. For example, switch the location of pushbutton A and C on your keypad, and all of a sudden it looks as if the code has been changed.
      Let me know if this helps or if you have additional questions, and thanks again for your interest & for your question! And, most importantly, have fun with electronics!

    • @marounn-ao4014
      @marounn-ao4014 3 หลายเดือนก่อน +1

      Man!! the article is so helpful... thank you!

    • @FriendlyWire
      @FriendlyWire  3 หลายเดือนก่อน +1

      @@marounn-ao4014 I am glad it helps! If anything doesn't make sense please reach out via email, I will do my best to help out. You can find my email at the bottom of www.friendlywire.com :)

  • @mancquito6181
    @mancquito6181 ปีที่แล้ว +1

    Hi, I congratulate you for the work you did. I think it's fantastic. Well, I would like to know if this circuit activates when you enter a 3-digit sequential password.

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว +1

      Thank you for your kind words, I am glad you like it! Can you give ne an example for a three-digit code sequential password? Like ABC? Or do you mean something else? :)

    • @mancquito6181
      @mancquito6181 ปีที่แล้ว +1

      @@FriendlyWire Good afternoon, thank you for answering a question. Do you have a sequential blocking project with only logic gates and when entering the 3-digit password, turn on a green LED or activate an alarm?🤗

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว +1

      @@mancquito6181 Thanks for the question :) I am not sure if I understand, but I think it should be possible. Can you give me an example what code you would like?

    • @mancquito6181
      @mancquito6181 ปีที่แล้ว +1

      @@FriendlyWire With the easiest brother I beg you to help me with this project. no lm555 no microcontrollers. only with integrated and, or, not, which are with 3-digit logic gates

    • @mancquito6181
      @mancquito6181 ปีที่แล้ว +1

      @@FriendlyWire please

  • @musharaf3561
    @musharaf3561 3 ปีที่แล้ว +1

    👍🏼

    • @FriendlyWire
      @FriendlyWire  3 ปีที่แล้ว

      Thank you, glad you like it!

  • @AbhinavChandra-s6w
    @AbhinavChandra-s6w 13 วันที่ผ่านมา +1

    Hey so i have watched your video today but i have been working oh this project since last 4 months i had some issues that i wanted to be solved so is there any way of contacting you instead of Instagram

    • @FriendlyWire
      @FriendlyWire  7 วันที่ผ่านมา

      Hello, thanks for your comment! I check Instagram sporadically, but it is easier to send me an email, which you can find at the bottom of www.friendlywire.com :)