CD4017 tutorial: the IC you can count on!

2020 ж. 7 Қаз.
30 167 Рет қаралды

The CD4017 decimal counter IC can be used for many interesting electronics projects, and in this 7-step tutorial we will cover the basics of how it works so that YOU can also use it in your next project!
More details and an up-to-date list of all components: www.friendlywire.com/tutorials/cd4017
Thanks for tuning in, and let me know in the comments if you have any questions!
Monthly email signup sheet: www.friendlywire.com/email/
Website: www.friendlywire.com
Twitter: twitter.com/FriendlyWire
Reddit: www.reddit.com/r/FriendlyWire
Facebook: facebook.com/FriendlyWire
Instagram: instagram.com/FriendlyWire
Timestamps:
00:00 Introduction
01:37 Step 1: Basic circuit
05:25 Step 2: debouncing & power-on reset
07:04 Step 3: Custom reset
07:57 Step 4: Counting to 99
09:10 Step 5: More custom resets
10:42 Step 6: Proper reset circuit
15:15 Step 7: External clock source

Пікірлер
  • Impressed by the amount of work that´s been done to make this video. A big thank you.

    @GerryLaureys@GerryLaureys3 жыл бұрын
    • Thank you, Gerry, I am glad you like it! Have a great day! :)

      @FriendlyWire@FriendlyWire3 жыл бұрын
  • your circuit wiring is like a work of art!

    @matthewvenn@matthewvenn Жыл бұрын
    • Thank you so much, Matthew, I am glad you like it!

      @FriendlyWire@FriendlyWire Жыл бұрын
  • Wow, what an incredibly well polished video, amazing production quality! And great tempo too!

    @ProCroGamers@ProCroGamers3 жыл бұрын
    • Thank you, happy you like it!

      @FriendlyWire@FriendlyWire3 жыл бұрын
  • What an absolute pleasure to watch. You're very clear in your voice-overs and the animations are really helpful. I will definitely build this when I have the chance.

    @bensaxon3829@bensaxon38293 жыл бұрын
    • Thank you so much, Ben, I am glad you liked it! If you have social media please send me some photos @FriendlyWire if you get the chance, I'd love to see it! :)

      @FriendlyWire@FriendlyWire3 жыл бұрын
  • Thanks bro. Thanks for the very detailed explanation of the 4017 IC!

    @adamansley2240@adamansley22402 жыл бұрын
    • Glad you like the video, Adam! Have a great day! :)

      @FriendlyWire@FriendlyWire2 жыл бұрын
  • Awesome video, well explained and very detailed. Got everything I needed to know without wasting any time. Also great production quality

    @trevorjohnston9314@trevorjohnston93143 жыл бұрын
    • Thank you, Trevor, glad you like it!

      @FriendlyWire@FriendlyWire3 жыл бұрын
  • Just finished building this circuit and learnt a bunch, so thanks a bunch. 😊

    @stew9456@stew94563 жыл бұрын
    • Fantastic! Great job, glad to hear it!!

      @FriendlyWire@FriendlyWire3 жыл бұрын
  • Great work Jens. The quality of the video production is really going great. We can see the effort that's going in, thanks.

    @75slaine@75slaine3 жыл бұрын
    • Thank you for your kind words, Glen, I am glad you like it! This video took me a while because I wanted to present a step-by-step journey instead of just a finished product. Now I am already working on the next video (using a DS1302 real-time clock with a PIC microcontroller).

      @FriendlyWire@FriendlyWire3 жыл бұрын
  • VERY NICE PIECE FULL CREDIT WHERE ITS DUE THANKYOU FOR THE CONCENTRATED VERY USEFUL TIPS

    @patrickmulholland1840@patrickmulholland18404 ай бұрын
    • Thank you very much, Patrick, I am glad you find the video helpful. Have a great weekend!

      @FriendlyWire@FriendlyWire4 ай бұрын
  • you deserve so many more subs. really great video. thanks a lot

    @KK-rg3nj@KK-rg3nj2 жыл бұрын
    • Thank you so much, Kartik, that is very kind of you! Knowing that my videos help somebody is more important to me than sub counts :) Have a great day!

      @FriendlyWire@FriendlyWire2 жыл бұрын
  • Awesome video! Neat explanations, circuits and editing, thanks a lot for your work :)

    @tuchomendez@tuchomendez3 жыл бұрын
    • Thank you very much, glad you find it useful :) Do you have anything you would like to see on FriendlyWire in the future? Always looking for suggestions! :) PS: Happy holidays!

      @FriendlyWire@FriendlyWire3 жыл бұрын
    • @@FriendlyWire hehehe, I've got a bunch of 74HC595's laying around... Just saying! :o) I've got your other videos on my watchlist, i believe that you have a better criteria than me to choose subject :)

      @tuchomendez@tuchomendez3 жыл бұрын
    • @@tuchomendez Ha, yeah, shift registers are fun! I have a video on the CD4094 (mis)used as a 7-seg driver for small displays. It's the "scrolling text display" video if you are interested. Thanks again for your kind words!

      @FriendlyWire@FriendlyWire3 жыл бұрын
  • Very through and comprehensive overview!

    @johndczerwinski@johndczerwinski3 жыл бұрын
    • Thank you so much, John!

      @FriendlyWire@FriendlyWire3 жыл бұрын
  • Another awesome tutorial. The time it takes to put together a production like this must be incredible, well worth the wait. Thank you, take care.

    @jerril42@jerril423 жыл бұрын
    • Thank you, glad you like it! I struggled with this tutorial a little bit because I wanted to present a story and not just give a final schematic. So I hope it's helpful for beginners :)

      @FriendlyWire@FriendlyWire3 жыл бұрын
    • @@FriendlyWire It did feel like mini-epic.

      @jerril42@jerril423 жыл бұрын
    • @@jerril42 Haha, thanks :)

      @FriendlyWire@FriendlyWire3 жыл бұрын
  • incredible explanation 🔥🔥❤️❤️❤️❤️

    @JayElectroTech@JayElectroTech Жыл бұрын
    • Wow, thank you so much, I am glad you liked the video! :)

      @FriendlyWire@FriendlyWire Жыл бұрын
  • Great video, I learnt alot. Thanks!

    @alanmangroo3656@alanmangroo36563 жыл бұрын
    • Thank you, Alan, that's great to hear :) Have a fantastic day! (And let me know what else you are interested in, if you want, I am always looking for new ideas!)

      @FriendlyWire@FriendlyWire3 жыл бұрын
  • 11:08 - I believe if you add a cap to the output of the AND gate (after the diode so it doesn’t discharge), it should hold the output longer and reset both 4017’s. Make the cap about 10x the startup cap so they form an initial voltage divider at startup and will be high enough voltage to reset the 4017’s at power on.

    @FilamentFriday@FilamentFriday3 жыл бұрын
    • Interesting, so add a 1uF to ground? I will try and see if that works :) Thanks, Chuck! Funnily enough I never had any reset problems on perf boards with soldered circuits, only on breadboards this becomes relevant. Must be the stray capacity/resistance in the breadboards themselves.

      @FriendlyWire@FriendlyWire3 жыл бұрын
    • @@FriendlyWire did it work?

      @adumont@adumont2 жыл бұрын
    • @@adumont I think it did, but in the end someone told me that the reset problem comes from a different reason: one should connect all clock pins in parallel (yes, parallel) and then connect the carry-out of the ones to the clock-inhibit of the tens. Then it works without any problems :)

      @FriendlyWire@FriendlyWire2 жыл бұрын
  • You had a train to catch, slowly man we learn!

    @marckaos@marckaos Жыл бұрын
    • Ha, what? I am not sure what you mean :)

      @FriendlyWire@FriendlyWire Жыл бұрын
  • Great video, super helpful!

    @divitrajgogia4909@divitrajgogia4909Ай бұрын
    • Thank you, glad you find it useful! :)

      @FriendlyWire@FriendlyWireАй бұрын
    • @@FriendlyWire don't stop making beginner friendly tutorials. I am trying to replicate and learn :)

      @divitrajgogia4909@divitrajgogia490914 күн бұрын
    • @@divitrajgogia4909 Comments like your mean a lot, and I don't have any plans to stop anytime soon. I just moved recently so I am still getting set up in the new place. :) Thank you for your kind words, and have a great Sunday!

      @FriendlyWire@FriendlyWire13 күн бұрын
  • A really easy tutorial. I had to redo the wire so it was clean looking. Not as good as yours. I got several CD4017's just because of this video. Thanks!

    @yahodad@yahodad Жыл бұрын
    • That's fantastic, congratulations! I would love to see a photo of your finished breadboard :)

      @FriendlyWire@FriendlyWire Жыл бұрын
  • Finally another video! yay!

    @filipcvetanovski2545@filipcvetanovski25453 жыл бұрын
    • Glad you like it! This one took me a while, but I am already working on the next one :)

      @FriendlyWire@FriendlyWire3 жыл бұрын
  • Thank you very much man

    @nakshtra604@nakshtra6043 ай бұрын
    • Thank you for your nice comment, and have a great weekend!

      @FriendlyWire@FriendlyWire3 ай бұрын
  • Use a resistor in conjunction with denouncing capacitor C3 to prevent premature contact erosion. Insert the resistor between S1 pin 1/2 and C3's + lead. A typical value range would be 10K to 100K ohms.

    @arthurharrison1345@arthurharrison1345 Жыл бұрын
    • Thanks, Arthur! This is to limit the current draw of the capacitor, yes? Good idea! (Schematic is at 5:49, for anybody reading this.)

      @FriendlyWire@FriendlyWire Жыл бұрын
  • Very nice

    @Akram101@Akram1012 жыл бұрын
    • Thank you! :)

      @FriendlyWire@FriendlyWire2 жыл бұрын
  • Thanks!

    @brandonlightner4031@brandonlightner403114 күн бұрын
    • Wow, thank you so much much, Brandon!

      @FriendlyWire@FriendlyWire14 күн бұрын
  • I liked and subscribed. This takes a lot of work. Does each LED really need its own current limiting resistor? They can only be on one at a time, right? Looking forward to more vids.

    @tonycarboni2002@tonycarboni20022 жыл бұрын
    • Thank you, Tony, glad you like the videos! You are right, one resistor would be enough actually. Good point, I completely forgot about that and did not notice! :)

      @FriendlyWire@FriendlyWire2 жыл бұрын
  • Great video. I stumbled on this looking for something very similar. I basically need your exact circuit, but I need to be able to also count down as well, using a separate momentary switch. Do you know of an IC that has the 'down' option? Thanks!

    @bobt7484@bobt7484 Жыл бұрын
    • Hey Bob, glad you found my video useful! The CD4510 can count up and down, but it does that in binary-coded decimal (BCD). If you want to convert this into a decimal pattern, you need to connect the outputs to a BCD-to-decimal converter, such as the CD4028. Hope it helps!

      @FriendlyWire@FriendlyWire Жыл бұрын
  • you are too good

    @anandsystemsengineering9142@anandsystemsengineering91423 жыл бұрын
    • Thank you so much, that is very kind. I am glad you enjoyed the video! :)

      @FriendlyWire@FriendlyWire3 жыл бұрын
  • Great video… you can eliminate all those resistors tho… tie the cathodes of leds together and run them to ground through 1 resistor ( I used a 560 ohm resistor with a 9 volt supply and it worked fine( only 1 led is being turned on at a time so no need for each one to have its own resistor) Thanks for the video. I subscribed ❤

    @iaov@iaov3 ай бұрын
    • Thank you, I am glad you liked the video. And yes, you are right, in this case only one resistor works because only one LED can ever be on at the same time, good idea! :)

      @FriendlyWire@FriendlyWire3 ай бұрын
    • This circuit worked great the first couple of times I turned it on. It then started behaving really erratically. No longer counting and leds lighting in no order at all. When I looked at the circuit with my scope I could see a lot of noise at the leading edge of the square wave from the 555. I tried changing both chips. No luck. I then tried using a 9vt battery hoping this would get rid of the noise. No luck.😢 I then placed a 220uf cap across VCC and bingo!! It worked perfectly. Noise from 555 gone. Thanks so much for these videos. Very cool circuits!!❤

      @iaov@iaov3 ай бұрын
    • @@iaov Glad it works now! Yes, that's why I always try to add a big bulk capacitor (here: C2 with 100uF), it really helps stabilize stuff. Glad you got it working, congrats, and thanks for your kind words!

      @FriendlyWire@FriendlyWire3 ай бұрын
  • Your videos are like Peter Jackson movies ,pristine and eye catching .I'm new in electronics I'm a 50 years old guys always love electronics ,learning alone with some books and videos. LOOKING FOWAR FOR MORE OF YOUR VIDEOS.I have a question 🤔 can I use ceramic cap.? Also it's there a equivalent for 1N4148 diode ?.I have a lot of them but not this one you know how it is .Thank

    @ricardomarty9292@ricardomarty92922 жыл бұрын
    • Thank you for your kind words, it means a lot! :) For which part do you want to use a ceramic capacitor? The larger ones, above one microfarad, typically are electrolytic ones. And yes, you can use other diodes, too. Which ones do you have? 1N4001 or similar ones should work as well. Let me know if this helps or if you have additional questions, I am happy to help!

      @FriendlyWire@FriendlyWire2 жыл бұрын
    • I'm referring to the cap that you use for bypass between pin 16 and pin 8 for the CD4017,I see you use a yellow cap I believe they are Monolithic Cap. I wondering if I can use the Ceramic Disc Cap instead . The diode ,I have 1n4007 but they are the black ones, can I use those .I thank you so much for taking time to answering my questions.

      @ricardomarty9292@ricardomarty92922 жыл бұрын
    • @@ricardomarty9292 Thank you for your interest, it means a lot :) Oh, I see! Yes, those capacitors should work great, and the diode should work as well. Good luck, and let me know how it turns out, I would love to see a picture :)

      @FriendlyWire@FriendlyWire2 жыл бұрын
  • We already found a mistake! 1. It's probably a good idea to add additional 1N4148 diodes wherever the NE555 output signal enters the rest of the circuit. This way there won't be any current flowing into the NE555 output when a button is pressed. I did not originally envision this difficulty since the NE555 outputs are push-pull, so the output stage itself won't be damaged, but you can still create a short circuit when pressing a button and the NE555 output is low at that point. Oh well, the more you know :) I added a note with an updated schematic at the end of the article: www.friendlywire.com/tutorials/cd4017/#ch9 And let me know if you find more mistakes, let's collect them here.

    @FriendlyWire@FriendlyWire3 жыл бұрын
  • Wow a really well done video! Shame that this channel isn't getting any attention from KZhead overlords! ty for the video man!

    @TheRealDefacto@TheRealDefacto2 жыл бұрын
    • Glad you like it, thank you! :)

      @FriendlyWire@FriendlyWire2 жыл бұрын
  • I'm going to build a binary clock with this

    @epluribusunum6622@epluribusunum6622Ай бұрын
    • I would love to see it, make sure to share a photo and tag me :)

      @FriendlyWire@FriendlyWireАй бұрын
  • Wow, thats amazing. I would love to build this kit. Quick question, can this be powered by a usb cable with a power bank as a battery? I know that it would probably need some modifications on the resistors, but would it still work?

    @victorsunah4626@victorsunah46262 жыл бұрын
    • Thanks, Victor, I am so glad you like it! Yes, of course :) In this case you can change the LED resistors to 220 Ohms (instead of 470 Ohms), but if you leave them at 470 Ohms the LEDs will work just fine, they will just be a little bit dimmer. There is a nice USB breakout adapter that you could use. I talk about it at 2:55 in this video here: kzhead.info/sun/rKaigdmDfaelZ6s/bejne.html . Let me know if that helps. If you have any other questions, let me know :)

      @FriendlyWire@FriendlyWire2 жыл бұрын
    • @@FriendlyWireThanks man, I will write this down in my component list for when I have to purchase them! I'll take a look on that video you mentioned :) You have my sub.

      @victorsunah4626@victorsunah46262 жыл бұрын
    • @@victorsunah4626 Happy to help, and let me know how it goes! :)

      @FriendlyWire@FriendlyWire2 жыл бұрын
    • @@FriendlyWire I will!

      @victorsunah4626@victorsunah46262 жыл бұрын
  • can you create a separate video on IC 555 timer ? and few simple projects based on IC 555 ?

    @DominicKumar06@DominicKumar062 жыл бұрын
    • Already did! kzhead.info/sun/n5mFqqmKoZ2rq2g/bejne.html :)

      @FriendlyWire@FriendlyWire2 жыл бұрын
  • 10:50 just add a inductor with a transistor to bump the voltage and make it charge faster to make it hold the voltage a bit longer so that it can register

    @desktopantec2290@desktopantec2290 Жыл бұрын
    • Thanks! Won't you get a negative induced voltage when the signal disappears? I would be worried about EM noise.

      @FriendlyWire@FriendlyWire Жыл бұрын
  • Hi. First your video is so beautiful ! Regarding the reset inputs hooked up to the two counters. Look for schmitt trigger inputs in the datasheet. The clock input is a schmitt-trigger input, and that is why it allows for slow clocks, like the RC circuit you have created by the button, caps and resistors. The reset input is not schmitt trigger I think, but before debunking it, I think there is another problem. The two decade counters are not running syncronous, meaning that the clock inputs are not hooked up to the same clk. This is where the Count inhibit (CI) input comes in. Notice in the datasheet how there is two inverters in series on the CI input. Why invert and invert? It has something todo with the timing when there is a carry out signal from counter1 cascaded to counter2 onthe CI input. You can connect both clocks (counter 1 and 2) to the clock, then the cascade output of counter1 to CI. Now when the clock comes, the outputs of counter1 and counter2 change syncronously. Now there will be much less chance of a glitch on the output of the and-gate. regarding the diode, caps and resistors on the reset input, im not sure if it will work. Hope this helps :)

    @bwack@bwack3 жыл бұрын
    • Thank you very much for your helpful comment, and I am glad you liked the video! This is a very interesting perspective on CI and CLK, thank you so much for sharing! I am sure I will do a follow-up video on the CD4017 at some time and I will be sure to include this. In some sense the synchronous counting is not required here, but is certainly would be nice, and it would perfectly explain the glitchy behavior. It should be possible to try out your suggestion with my breadboard rather quickly, I hope to do it this weekend. I will let you know! What do you think of the "pushbuttons connected to NE555 output" problem, do you think an additional 1N4148 just before the NE555 output's signal connects to the pushbutton, would solve the problem?

      @FriendlyWire@FriendlyWire3 жыл бұрын
    • ​@@FriendlyWire It is worth a try to syncronize, not sure if it will help. The more I think of it, it has less todo with the reset problem, because the output of counter2 is stable when the reset occurs. Beware that the speed of the and-gate is also important. I think you are on to something when you want to extend the reset signal. I'm thinking a flipflop after the and gate could work. It will delay the reset by 1 clock cycle, so beware that, and it will stay high for one clock cycle, but will it need two clocks to get to count=1 ? I don't know :D .. I looked for the pushbutton problem in the video. Do you have minute mark ?

      @bwack@bwack3 жыл бұрын
    • @@bwack Yeah, true, but it would be nice to see if that could fix it for this layout. But that being said, I sleep better at night with a dedicated reset circuit. The pushbutton problem is not mentioned in the video because I did not realize that it's a problem and only learned about it today on Reddit. When you look at 15:20 there is the schematic. The problem occurs if either S1 or S2 are pressed: current may flow into the NE555 output. For S2 it's not too bad because its NE555 goes high immediately, but for S1 it causes a short :(

      @FriendlyWire@FriendlyWire3 жыл бұрын
    • @@FriendlyWire I see the switch shorts the push-pull output circuit of the 555. You can use a diode to form a wired or circuit. It is very normal on reset lines to be wired or.

      @bwack@bwack3 жыл бұрын
    • @@bwack Yeah, that's what I was thinking, too. For the RESET it's actually not really needed: whenever the button is pressed the NE555 output goes high, which prevents a short from forming. But I should have included it. Oh well, many things become clearer after sharing them with an audience :)

      @FriendlyWire@FriendlyWire3 жыл бұрын
  • Can the green led starts to lights after the last yellow led I want the led to light in sequence like (1,2,3,….20) not as the video in the same time (only one led lights)

    @user-pt7di1zh2s@user-pt7di1zh2s Жыл бұрын
    • Oh, you want to have a counter from 1-20, basically? Yes, this can be done, I think, by using the clock inhibit pin of the first and second counters. The problem will be to turn off the last yellow led (when the counter is in the range 10-19) and to turn off the first green LED when the counter is in the stage 0-9.

      @FriendlyWire@FriendlyWire Жыл бұрын
  • can i ask how can you make it reverse and forward counter using 2 buttons

    @fuxionlab3704@fuxionlab370410 ай бұрын
    • With the CD4017 it does not work, it can only count in one direction unfortunately.

      @FriendlyWire@FriendlyWire10 ай бұрын
  • Thanks so much Mate. What a fantastic tutorial. Push button bouncing, haha. I thought I was wiring up a previous project incorrectly. ;-}

    @davyps8273@davyps82732 жыл бұрын
    • Thanks, David, glad you liked it! Yes, this bouncing can drive you crazy at times :)

      @FriendlyWire@FriendlyWire2 жыл бұрын
    • @@FriendlyWire Built the circuit today. Works perfectly. A quick question if you don't mind. Does the red led on the second 555 correspond with the cycle of upper bank of LEDS IE 1-10, and the blue LED remains as the reset indicator? Thanks again for this. It is so informative. Cheers Mate.

      @davyps8273@davyps82732 жыл бұрын
    • @@davyps8273 Awesome work! And yes, please always ask, I am happy to help :) Yes, the blue LED is just there to show whenever a reset happens, and the red LED gives the clock frequency of the counter :) These LEDs are both not required for the circuit to work, but I added them to make it easier to follow what happens. If you have a photo I'd love to see it! (I am @FriendlyWire on Twitter and Instagram.)

      @FriendlyWire@FriendlyWire2 жыл бұрын
    • @@FriendlyWire Have posted on Instagram.

      @davyps8273@davyps82732 жыл бұрын
    • @@davyps8273 Thank you, received! :) Looks amazing!

      @FriendlyWire@FriendlyWire2 жыл бұрын
  • Just for the meme, I would have made this a 10-step tutorial. The carry out counting to 99 is fine but I would have liked to see implementation of a count to 19 circuit as I think that's also quite useful. You could make a followup video called "Hey 19", again for the meme, a reference to the Steely Dan song.

    @KJ6EAD@KJ6EAD Жыл бұрын
    • Something tells me you like memes... ;-) Well the general reset is discussed with AND gates in this video, too :)

      @FriendlyWire@FriendlyWire Жыл бұрын
    • @@FriendlyWire I'm not too meme centric but when there's an obvious opportunity, I think it should not be dismissed too easily. I've helped people on forums make sequencers using the 555/4017 combination to control model lighting such as for the various strobes and lights on commercial aircraft. It's an effective and accessible method for people who would not be willing or able to cross the entry barrier to microcontrollers. So far, no one has needed more than 10 time steps but having 20 available would be good. On further reflection, I know how to build the output decode logic onto your 100-step sequencer and that's probably the best way to do it but I keep thinking there was also a circuit topology that used the second 4017 for counts 10-19 instead of the way you've shown where it's the next more significant decimal digit (10's). Either way, if you revisit 4017 circuits, these might be good material.

      @KJ6EAD@KJ6EAD Жыл бұрын
    • @@KJ6EAD I see what you are saying, yes! I like the idea of using 4017's to simulate light patterns. I used one some time ago (together with a diode OR gate) to simulate traffic lights :) Interesting idea about having 0-9 on the first counter, and 10-19 on the second one. I suppose you could just hook up Q9 to the Clock Inhibit pin of the second counter. If you are interested in "outside the box" applications of the CD4017, also check out my code lock that uses these: kzhead.info/sun/a8WMYspsm3WjdYE/bejne.html

      @FriendlyWire@FriendlyWire Жыл бұрын
    • @@FriendlyWire Ah, yes, I haven't used the 4017 in a while so I'd forgotten about the clock enable. I'll have to pull up the data sheet and refamiliarize myself. I've done the traffic light (American pattern of course) with diode OR gates. I even have a party decoration traffic light about 10" tall that I'm going to animate with the circuit and appropriate LED clusters to replace the ridiculous random incandescent bimetallic blinker lamps that it had. I've also made alternating triple flash "police lights" both with integrated 3-input OR gates and with diodes. I don't want to take up any more of your time so there's no need to respond unless you want to.

      @KJ6EAD@KJ6EAD Жыл бұрын
    • @@KJ6EAD Always happy to exchange ideas! :)

      @FriendlyWire@FriendlyWire Жыл бұрын
  • which editing graphics software your using ???

    @dineshkumarr5027@dineshkumarr5027 Жыл бұрын
    • I use DaVinci Resolve, and for animating the graphics I create still images in GIMP and just show them one frame at a time.

      @FriendlyWire@FriendlyWire Жыл бұрын
  • I might have misunderstood but I think the Carry out is high from output 1-5 only. Thats how my 4017 works.

    @christiannielsen3863@christiannielsen38633 жыл бұрын
    • That is interesting, thank you for pointing it out! I need to check this. In the datasheet it says "the carry-out completes one cycle every 10 input cycles" so I thought it just goes high and low at the transition from 9 to 0. But for cascading ("rippling") the counters together it makes no difference I think.

      @FriendlyWire@FriendlyWire3 жыл бұрын
  • @jimwall-rm9ze@jimwall-rm9ze5 ай бұрын
    • Thank you :)

      @FriendlyWire@FriendlyWire5 ай бұрын
  • Maybe you could use a rs flip flop which is set by the "and" condition q1.6 and q2.2. For reset you use another "and" condition q1.1 and q2.1 🤔 Unfortunately I don't have the opportunity to test this, but I would be very curious to see the result 😊 Sorry for the grammar, i'm not a native speaker 😅

    @Metalfish0815@Metalfish0815 Жыл бұрын
    • Thanks, Simon! Can you clarify what you mean by q1.6 and q2.2? I am always interested in improving the designs presented in the FriendlyWire videos :)

      @FriendlyWire@FriendlyWire Жыл бұрын
    • @@FriendlyWire q6 of ic 1 und q2 of ic 2 I could have written that a little better 😅

      @Metalfish0815@Metalfish0815 Жыл бұрын
    • Sry I meant q0 of ic1 and q5 of ic2 😁 The reset condition is q0 of ic1 and q0 of ic2 In that case you can be sure the reset signal stays as long as both ic's has been reset

      @Metalfish0815@Metalfish0815 Жыл бұрын
    • @@Metalfish0815 I like that! You would still need an additional chip (the RS flip flop) but you could ditch the 555. Also, you would need more gates for more chips to AND them all together into your RS flip flop, or you need AND's with multiple inputs, and that may become a bit cumbersome. But it's a good idea to do it. I kind of liked this 555 solution because it reminded me of the old reset circuits in computers from the 70's, but that's the great thing about doing KZhead: there are always more and interesting ideas that you didn't think of :) Thanks Simon, and have a great weekend!

      @FriendlyWire@FriendlyWire Жыл бұрын
  • This is really cool and helpful, but as a CS person I hate that reset circuit. Fixing a race condition with a timer never works long term. This should be a latch that unlatches after both resets happen.

    @requiredaccount8019@requiredaccount80192 жыл бұрын
    • Thank you! Can you explain a bit more what you think could go wrong?

      @FriendlyWire@FriendlyWire2 жыл бұрын
    • @@FriendlyWire The 4017 clock and the reset chip clock are independent. If the 4017 clock is significantly slowed down, the reset hold time may no longer be long enough to cover the second reset, depending on how the 4017 reads that pin (presumably on the rising edge of the clock signal). It would be better to create a latch on the output of both 4017s that makes sure both get reset before moving on. Basically, always control the variable you want to control directly, don't try to use a side-effect that just happens to work in a given particular case.

      @requiredaccount8019@requiredaccount80192 жыл бұрын
    • ​@@requiredaccount8019 Thank you for explaining it! I am not sure if I agree, though :) Looking at 11:21, I am not sure what you mean by second reset. The AND gate only triggers if both inputs are high, which is only ever one state (not two independent ones). The reset hold time is also independent of the clock speed, and it can be adjusted by C9/R23. In this circuit, what could go wrong in your opinion if the clock speed is very slow? When I tried it by hand the clock speed can be as slow as you want, it always resets properly, so I am a bit confused :)

      @FriendlyWire@FriendlyWire2 жыл бұрын
  • how does the reset circuit produce the initial start up pulse when the reset pin isnt connected to VCC? as i understand it you need to make the reset pin high to activate the IC so if the reset pin isnt high on startup how can the output go high?

    @thediamondnightingales9623@thediamondnightingales96232 жыл бұрын
    • Good question! The capacitor C9 is uncharged at the beginning, so the TRIGGER input of the NE555 is at 0V. This activates the output of the NE555, so that the output of the NE555 is on for a brief period of time while C9 charges up. You can read more details about this reset circuit in chapter 6 of the companion article: www.friendlywire.com/tutorials/cd4017/#ch6 , and I also have a detailed video on the NE555 if you are interested: kzhead.info/sun/n5mFqqmKoZ2rq2g/bejne.html I hope that helps, let me know if anything doesn't make sense, I am happy to help :)

      @FriendlyWire@FriendlyWire2 жыл бұрын
    • @@FriendlyWire i understand the operation of the timer, however, i dont understand how the ic is able to switch the output on at startup if the reset pin isnt tied high. At startup wouldbt the reset detect a low signal and therefore holding the ic at a low output regardless of the trigger pin seeing 0V?

      @thediamondnightingales9623@thediamondnightingales96232 жыл бұрын
    • @@thediamondnightingales9623 Oh, I see. Yeah that's a good observation. I think that C4 provides a short pulse that pulls the NE555 out of the reset mode at startup.

      @FriendlyWire@FriendlyWire2 жыл бұрын
    • @@FriendlyWire do you think that on startup maybe as the IC initialises that the output produces a slight output pulse just as all the transistors turn on? But because you catch that pulse on the reset then the ic locks on until the threshold is activated? If thats the case then this circuit is even more clever than i originally though, see in my software, the initial pulse doesnt simulate (probably because its operating under ideal conditions), so i think this theory is potentially true. What do you think?

      @thediamondnightingales9623@thediamondnightingales96232 жыл бұрын
    • ​ @FriendlyWire i have ran some experiments through breadboard and PCB prototyping on the reset circuit (i know i seem obsessive lol) and all of my results seem to point to that when power is connected initially, pin 3 very briefly goes high because of the internals "booting up", therefore when you feed that into the reset you can take advantage of the ICs startup and lock the output high temporarily whilst the RC network reaches 2/3 VCC in which the output goes off and locks off, very clever design youve found there mate, simple, cheap and highly versatile for performing a systemwide reset

      @thediamondnightingales9623@thediamondnightingales96232 жыл бұрын
  • Just explain about what is pull up and pull down resistor with practical....could you?

    @wingsofmind@wingsofmind2 жыл бұрын
    • Hello :) Pullup and pulldown resistors are used when a digital input would otherwise be left "floating." In our example here, at 1:41, the CLK input of the CD4017 is such an input, and R11 is our pulldown resistor. We want the counter to count up by 1 when we press the button S1. But without R11 the CLK input of the counter would bot be connected to anything, it would "float." So by adding R11 the input is still connected to ground when no button is pressed. When R11 is pressed then a small current flows through R11, but because R11 has a high value of 4.7kilo ohms the current is not much, only 1mA, so the resistor does not heat up or anything. This is why a pulldown resistor like this one should be a larger value. Let me know if that makes sense or if you have any questions :)

      @FriendlyWire@FriendlyWire2 жыл бұрын
  • Hello, please how do i count backwards? is there a way? thanks

    @themechatronicsguy9727@themechatronicsguy97272 жыл бұрын
    • The CD4017 cannot count backwards, unfortunately. What range do you want to cover? The CD4510 can count up and down, and also has a preset function.

      @FriendlyWire@FriendlyWire2 жыл бұрын
    • @@FriendlyWire Oh, thank you, i'll check out the CD4510

      @themechatronicsguy9727@themechatronicsguy97272 жыл бұрын
    • @@themechatronicsguy9727 Happy to help! Can I ask, what range of numbers do you want to cover? Counting from 9 backwards to 0, or something more complicated?

      @FriendlyWire@FriendlyWire2 жыл бұрын
    • @@FriendlyWire I want to count up by pulsing the ic and down back to 0 from any number, like count up to 5, then back to 1, then up to 3, then down to 2.

      @themechatronicsguy9727@themechatronicsguy97272 жыл бұрын
    • @@themechatronicsguy9727 Oh, I see! I was thinking that maybe it would be possible to just count in one direction and think of it as "counting down." The CD4510 is a pretty good choice in that case! :)

      @FriendlyWire@FriendlyWire2 жыл бұрын
  • I let the IC cycle through 8 steps with just the 555 (no buttons for next step or reset), but every time I power up the circuit, it does one cycle perfect and then skips the first output Q0 every time. How can I fix this?

    @ebbewertz3417@ebbewertz34172 жыл бұрын
    • Thank you so much for your feedback! That is indeed strange and should not happen. So let's figure out what's wrong! :) First, can you disconnect the NE555 and just reset it manually? Does that work reliably?

      @FriendlyWire@FriendlyWire2 жыл бұрын
    • @@FriendlyWire a manual reset does work, that's why it also works the first loop when it's turned on. I think the problem is that it takes the reset signal also as a 'next step' signal since the clock is high when the reset pulse is high, and thus skips the first step after every (automatic) reset. But I don't know how. I also put a capacitor in parallel with the diode that resets, so the reset pulse get shorter but that didn't work either. It keeps doing. 123-23-23-23-23-23... Instead of 123-123-123.... Edit- I just realized that a capacitor doesn't make the pulse shorter so it wouldn't work for sure. I thought that I could swap the ground connection on the clock enable pin for a pulldown resistor and then connect reset to clock enable so that it ignores the clock while resetting but that also doesn't work. Is there anything else I could try?

      @ebbewertz3417@ebbewertz34172 жыл бұрын
    • @@ebbewertz3417 Thanks for the additional details! The counter increases only after a positive pulse on clock, that is, when clock goes from low to high. If clock stays high nothing should happen. This is a bit strange, I need to think about that. When I built the circuit it certainly worked, so I did not give it any second thought. /edit: Are you using the circuit with the NE555 reset circuit? Or without it?

      @FriendlyWire@FriendlyWire2 жыл бұрын
    • @@FriendlyWire I only use one 555 for a clock pulse, I reset it by just putting a diode between the last output and the reset pin. Maybe it's because I have a slightly different ne555 clock circuit: I have a 10k resistor on pin 7 and a 100k potentiometer between pin 7 and 2, and after all the 2 capacitors and for the rest nothing else. This is giving me a nice stable pulse so that's good I guess, but I still think the problem is the 555 because if I just use a pushbutton as a clock, the 4017 loops all steps just fine. *C12 = 10u, C11=100n, C10=/

      @ebbewertz3417@ebbewertz34172 жыл бұрын
    • @@ebbewertz3417 Your NE555 circuit sounds fine, though. The only difference between NE555 clock source and the pushbutton one is probably the speed. Does the same problem occur with the NE555 running at a very low speed?

      @FriendlyWire@FriendlyWire2 жыл бұрын
KZhead