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.
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! :)
nicely done! my understanding of electronics is rather shallow so I mostly rely on tutorials when making something and they just rarely explain some of the used components. So the information like "what voltage and why can some component handle" or the way you first show the trouble created by the button and then shoot it with a capacitor instead of just placing it there right away, makes a lot of difference.
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!
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.
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.
@@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 interesting. But doesn't the carry-out switch to high for 5 counts (0-4) and low for 5-9? What you describe would only work if the carry-over would be up for 1 pulse, right?
@@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!
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.
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).
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 :)
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 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 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!
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
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!
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 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 :)
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!)
Thank you so much, Tariq, much appreciated! I just moved and for this reason everything is getting a bit delayed, but my studio is all set up again, and I will start working on a new video very soon :)
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 ❤
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! :)
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 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!
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
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!
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!
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.
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! :)
Hello, thank you for sharing the detail of your work, it is very inspiring! I am trying to make a cascade with 4017 and 4081 (and gates), I have built the circuit more than 15 times, but I have a problem: As the speed of the sequence increases, it loses the order. Some steps are sped up compared to other sequences. Please help, what do you recommend I do?
Hello, I am glad you found it useful! Can you tell me a little bit more about what speeds you are using the circuit with? I have only tested it with manual inputs so far. Happy to help!
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 :)
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 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 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 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 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 I will be building a few circuit once I have a few parts. Thanks again for a very informative video I enjoyed your web page and other video, have a good weekend
@@alanturner1184 Thank you so much! Send me a picture of what you are building, my email is at the bottom of www.friendlywire.com, I'd love to see it :) And don't hesitate to reach out if anything doesn't work, we will figure it out :) And a great weekend to you too!
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?
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: ua-cam.com/video/yBiQuKFuo4s/v-deo.html . Let me know if that helps. If you have any other questions, let me know :)
@@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.
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.
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.
@@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 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: ua-cam.com/video/8aS2f4dCmBI/v-deo.html
@@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.
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.
@@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 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 :)
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 😅
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 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 UA-cam: there are always more and interesting ideas that you didn't think of :) Thanks Simon, and have a great weekend!
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)
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 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 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.)
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.
I use Eagle by Autodesk, but I honestly only use it to visualize the circuits since I like the aesthetics and know how to create new components in that software. Since I do not make PCBs it is mostly a matter of taste for me, for that reason :)
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 :)
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?
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 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 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 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 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?
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?
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: ua-cam.com/video/l5LzERjkux0/v-deo.html I hope that helps, let me know if anything doesn't make sense, I am happy to help :)
@@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 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 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?
@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
@@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.
@@haidarbuilds 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! :)
Impressed by the amount of work that´s been done to make this video. A big thank you.
Thank you, Gerry, I am glad you like it! Have a great day! :)
your circuit wiring is like a work of art!
Thank you so much, Matthew, I am glad you like it!
Wow, what an incredibly well polished video, amazing production quality! And great tempo too!
Thank you, happy you like it!
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.
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! :)
nicely done! my understanding of electronics is rather shallow so I mostly rely on tutorials when making something and they just rarely explain some of the used components. So the information like "what voltage and why can some component handle" or the way you first show the trouble created by the button and then shoot it with a capacitor instead of just placing it there right away, makes a lot of difference.
Thank you, I am so glad you found the video helpful! This is a huge motivation for me to keep going. Electronics is a journey, never give up :)
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!
That's fantastic, congratulations! I would love to see a photo of your finished breadboard :)
Thanks bro. Thanks for the very detailed explanation of the 4017 IC!
Glad you like the video, Adam! Have a great day! :)
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.
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 did it work?
@@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 interesting. But doesn't the carry-out switch to high for 5 counts (0-4) and low for 5-9? What you describe would only work if the carry-over would be up for 1 pulse, right?
Just finished building this circuit and learnt a bunch, so thanks a bunch. 😊
Fantastic! Great job, glad to hear it!!
Great video, super helpful!
Thank you, glad you find it useful! :)
@@FriendlyWire don't stop making beginner friendly tutorials. I am trying to replicate and learn :)
@@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!
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.
Thanks, Arthur! This is to limit the current draw of the capacitor, yes? Good idea! (Schematic is at 5:49, for anybody reading this.)
Awesome video, well explained and very detailed. Got everything I needed to know without wasting any time. Also great production quality
Thank you, Trevor, glad you like it!
incredible explanation 🔥🔥❤️❤️❤️❤️
Wow, thank you so much, I am glad you liked the video! :)
You had a train to catch, slowly man we learn!
Ha, what? I am not sure what you mean :)
Great work Jens. The quality of the video production is really going great. We can see the effort that's going in, thanks.
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).
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.
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 It did feel like mini-epic.
@@jerril42 Haha, thanks :)
you deserve so many more subs. really great video. thanks a lot
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!
I'm going to build a binary clock with this
I would love to see it, make sure to share a photo and tag me :)
Very through and comprehensive overview!
Thank you so much, John!
Awesome video! Neat explanations, circuits and editing, thanks a lot for your work :)
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 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 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!
VERY NICE PIECE FULL CREDIT WHERE ITS DUE THANKYOU FOR THE CONCENTRATED VERY USEFUL TIPS
Thank you very much, Patrick, I am glad you find the video helpful. Have a great weekend!
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
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!
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 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 :)
Great video, I learnt alot. Thanks!
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!)
Keep up the good work
Thank you so much, Tariq, much appreciated! I just moved and for this reason everything is getting a bit delayed, but my studio is all set up again, and I will start working on a new video very soon :)
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 ❤
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! :)
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 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!
Wow! Perfect video! Thanks!!
Thank you, Oliver, I am glad you found it useful! :)
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
Thanks! Won't you get a negative induced voltage when the signal disappears? I would be worried about EM noise.
can i ask how can you make it reverse and forward counter using 2 buttons
With the CD4017 it does not work, it can only count in one direction unfortunately.
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!
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!
Very nice
Thank you! :)
Finally another video! yay!
Glad you like it! This one took me a while, but I am already working on the next one :)
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.
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! :)
Hello, thank you for sharing the detail of your work, it is very inspiring!
I am trying to make a cascade with 4017 and 4081 (and gates), I have built the circuit more than 15 times, but I have a problem: As the speed of the sequence increases, it loses the order. Some steps are sped up compared to other sequences.
Please help, what do you recommend I do?
Hello, I am glad you found it useful! Can you tell me a little bit more about what speeds you are using the circuit with? I have only tested it with manual inputs so far. Happy to help!
Wow a really well done video! Shame that this channel isn't getting any attention from UA-cam overlords! ty for the video man!
Glad you like it, thank you! :)
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 :)
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 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 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 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 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 :)
can you create a separate video on IC 555 timer ? and few simple projects based on IC 555 ?
Already did! ua-cam.com/video/l5LzERjkux0/v-deo.html :)
Great video explained extremely well thank you.
Thank you so much, I am glad you found it useful!
@@FriendlyWire I will be building a few circuit once I have a few parts. Thanks again for a very informative video I enjoyed your web page and other video, have a good weekend
@@alanturner1184 Thank you so much! Send me a picture of what you are building, my email is at the bottom of www.friendlywire.com, I'd love to see it :) And don't hesitate to reach out if anything doesn't work, we will figure it out :) And a great weekend to you too!
Thanks!
Wow, thank you so much much, Brandon!
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?
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: ua-cam.com/video/yBiQuKFuo4s/v-deo.html . Let me know if that helps. If you have any other questions, let me know :)
@@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 Happy to help, and let me know how it goes! :)
@@FriendlyWire I will!
I might have misunderstood but I think the Carry out is high from output 1-5 only. Thats how my 4017 works.
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.
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.
Something tells me you like memes... ;-) Well the general reset is discussed with AND gates in this video, too :)
@@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 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: ua-cam.com/video/8aS2f4dCmBI/v-deo.html
@@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 Always happy to exchange ideas! :)
Thank you very much man
Thank you for your nice comment, and have a great weekend!
which editing graphics software your using ???
I use DaVinci Resolve, and for animating the graphics I create still images in GIMP and just show them one frame at a time.
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.
Thank you! Can you explain a bit more what you think could go wrong?
@@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 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 :)
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 😅
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 q6 of ic 1 und q2 of ic 2
I could have written that a little better 😅
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 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 UA-cam: there are always more and interesting ideas that you didn't think of :) Thanks Simon, and have a great weekend!
you are too good
Thank you so much, that is very kind. I am glad you enjoyed the video! :)
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)
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.
Thanks so much Mate. What a fantastic tutorial. Push button bouncing, haha. I thought I was wiring up a previous project incorrectly. ;-}
Thanks, David, glad you liked it! Yes, this bouncing can drive you crazy at times :)
@@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 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 Have posted on Instagram.
@@davyps8273 Thank you, received! :) Looks amazing!
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.
What application are you using to design circuits?
I use Eagle by Autodesk, but I honestly only use it to visualize the circuits since I like the aesthetics and know how to create new components in that software. Since I do not make PCBs it is mostly a matter of taste for me, for that reason :)
Ok thank you for help
@@hyperek8046 Happy to help, and thank you for stopping by. Have a great day!
Just explain about what is pull up and pull down resistor with practical....could you?
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 :)
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?
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 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 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 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 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?
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?
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: ua-cam.com/video/l5LzERjkux0/v-deo.html
I hope that helps, let me know if anything doesn't make sense, I am happy to help :)
@@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 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 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?
@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
Hello, please how do i count backwards? is there a way? thanks
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 Oh, thank you, i'll check out the CD4510
@@haidarbuilds 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 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.
@@haidarbuilds 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! :)
❤
Thank you :)