@@FriendlyWire - I finished my first attempt about a week ago, and I obviously did something wrong. I would have been amazed if I got that whole circuit right the first time. I might start from scratch and try to be more careful on my next attempt. Wish me luck!
@@thetooginator153 Of course, it always takes more time to do these things in person. I am happy to help, just send me an email or get in touch on social media. We will figure this out! :-)
Hello Marzena, this is a good question. Unfortunately the CD4026 does not have a built-in memory. What you could do is this: simply disable the display by putting pin 3 to ground, then the current consumption should be much lower. Then, if you drive everything via a rechargeable USB bank, for example, it could easily last in standby mode for a few days. How long does it need to keep the memory?
Hi, I understood this and implemented this it works and helps a lot but the problem is I have to run this on simulator on Proteus for my project and Tried alot but Stuck on led display there a-k alphabets in led but in Proteus there is a-g so how to take other inputs can you make a video on it
Thank you for the question, I am glad that the video was helpful. I am not sure if I understood everything :) Can you explain what the problems seems to be?
@@FriendlyWire led common pin is connected to R3(Resistor) and then resistor is connected to ground,but I have to connect led common pin to ground separately after that it starts working 🙂
Hi! I thought it was a common practice to connect a 220-ohm resistor in series with each output of the 4026 IC to its respective LED in the 7-segment display. Why not use that instead?
Hello Darren, I am glad you like the video, and thanks for the question. Yes, the CD4026 can only count in one direction (up). The CD4510 counter, for example, can count up and down, but outputs BCD signal. You would need a CD4511 to convert it into 7-segment. So: instead of the CD4026 you could use a CD4510+CD4511 and then count up and down :) Let me know if it helps!
Thank you for the video on this, its just what I needed! Is there any way to adjust the circuit to use AA batteries instead? I'm looking to put this in something that would be used for a long time and replacing those 9Vs is a pain!
Thank you, I am glad you like the video! Yes, you can use AA batteries, too. I would recommend three AA batteries in series to give 4.5V, and then you can replace the 470 Ohms resistor with a 220 Ohms resistor for the LED. Everything else can stay the same :)
Unfortunately, the CD4026 does not count backwards... But you could count forward and basically subtract it this way, since it always rests back to 0 after passing 9. If you want to subtract a number, call it N, it's the same as adding 10-N. Example: the counter is showing 8, and you want to subtract 4. So, in this example, N=4. This means you have to add 10-N, which is 10-4 = 6. If you increment the timer 6 times, it will show 4 after that, which is what you wanted :) If you want to subtract 1, then you just have to increase the timer 9 times. If you do it really quickly, then it will look like it reset by 1 (the intermediate counts will be almost invisible). Hope that helps!
Hi I have dont this project it works perfectly, but i have a question, instead of push button do i connect Rotary encoder ( Mouse Scroll wheel ) ?? if it is yes, will you please tell the pin out connections, where do connect the mouse scroll wheel button in the 4026 ic ? Thanks
Thanks for the question! A mouse scroll wheel does not generate an on/off output like a pushbutton, there is more circuitry involved to decode the signal of a rotary encoder. So I am not aware of any simple solution for this, unfortunately. Would you be willing to use a microcontroller, or does it have to be the CD4026? I may do a video on how to use rotary encoders with a PIC microcontroller soon.
@@FriendlyWire Thanks for your quick reply, my idea is instead of push button , i would like to use some Rotary encoder like volume control to increase or decrease the count with CD4026,
@@angs7265 I see! Unfortunately I cannot think of any simple solution. It depends a lot on your rotary encoder. But there is another way: you can use a BCD dip switch ( see the one at friendlywire.com/tutorials/buttons-switches-101/#ch6 , or one on Ebay right now, Jan 17, 2023: www.ebay.com/itm/175465827952 ) that has four outputs. Then you can use the CD4511 BCD-to-decimal converter to turn that signal into 7-segment value.
Hey there, it's a common cathode one. If you build this, make sure you add one 470 ohm resistor on each output of the CD4026 (see schematic at 1:23). In the video I just used one 470 ohm resistor at the cathode, but that is not good practice. Hope it helps! If you build this I would love to see a picture, feel free to share on socials @FriendlyWire :)
Hello :) In principle, you can use sensor outputs to count with the CD4026, they just have to be the right voltage levels. Do you have a datasheet/name/link of the proximity sensor you want to use?
@@AnimaladasGraciosas Great, that looks like something we could work with. Do you have a datasheet? Feel free to reach out via email as well, you can find it on the bottom of the website www.friendlywire.com :) Without datasheet it will be hard to guess how to do it.
Hi! I have one question! Shouldn't you put one limiting resistor from each output of 4026 to the anodes of the display, instead of one single resistor from the common cathode to ground? In case multiple LEDs are lit the sums of the currents make a greater IR drop across the single resistor.
Hi Antonio, yes, you are completely right! In practice I find that for these small displays there is not much variation in brightness between a 1 and an 8, though. I did the same for my CD4094 project and it works rather well there, too. In general, and for larger displays, this does not work. Thanks for pointing it out! :)
I was reading the 4026 datasheet and it suggests that LED switching be made via npn transistor and current limiting resistor. How come your circuit (4026 or LEDs) did not overheat?
@@antonioagostinelli9430 It's easy to check: with only one resistor you cannot make it worse, because all LED segments that are ON draw current through it. But the current through the resistor is fixed. If it is, say, 15mA, then two segments get 7.5mA each, 3 segments would get 5mA each, and 7 segments would get slightly more than 2mA each. Hope it makes sense :)
Hey so like if we are making a digital clock ,should we connect 7 similiar resistors or 1 resistor at the end? Using 1 single resistor in the end causes sum of all the 7 currents to go through it and thus increases I^2R losses and increases heating is that what you meant bro?
Thank you for your question! Is it possible that the touch button you use bounces? This could explain why the counter sometimes jumps. Is your reset pin connected to anything? Don't worry, these kind of things are normal and can happen (and happened to me a lot of times, too), but we will find the mistake :)
Hi. Great video. Just one quick question. If I chain six of those to make 6 digits counter is the ceramic capacitor required once per build or once for every IC? Do other IC's also need the capacitor? If yes how do I know what kind and value should I use?
@@taurruth These are sometimes called bypass capacitors. Their value is not so critical, but around 100nF is typical. All logic chips have one of these, to make the circuit more resilient against noise. Under ideal conditions these capacitors are not necessary, but it is good practice to include them, especially if you are using a noisy power supply.
@@taurruth It's good practice, and I have actually had a case, very early on, where I used a dirty power supply and my digital clock just would not work for the life of me. These capacitors saved me, and so I think it's only fair to recommend them to others, too. :)
Hi sir. The tutorial is great and I understand all the cirtuit. But even I had done everything same (yes. even the coordinates of components ) it didnt seem to work. What can be the problem you think? (I checked all components no problem about them) Also. If you answer this, Thank you man youre great
Hello Yusuf, thank you for your interest and your question! I have been there, too, these things can be a bit tricky sometimes. Can you send me a photo of your built? You can either contact me on social media @FriendlyWire or send me an email (my address is at the bottom of www.friendlywire.com). I am sure we can figure this out together! :)
@@yusufkonevi6803 That's great, congratulations! Let us know what it was, maybe somebody else has the same problem and they may find your solution helpful :)
@@FriendlyWire The problem was that the display I installed later was a common anode, not a common cathode, since it was larger. I also have a question: how can I make this counter 2 digits?
@@yusufkonevi6803Oh, I see! Yes, this circuit is for a common cathode display. (But these displays always have the same size, you can only tell if it is common anode or cathode from the type number and/or from experimenting with the module.) You can make it 2 digits like this: connect Carry Out (pin 5) to the CLK pin of the next CD4026. On this next CD4026, connect a 7seg display just as before, and put RESET (pin 15) to ground, Clock Inhibit (pin 2) to ground, and Display Enable (pin 3) to VDD. Let me know if it works! :)
Hi I have a project like this, and I am following your tutorial. I already completed the circuit in my simulation, but I need to reset the sevseg after it reaches the digit 8. This will be use as a scoring device. We are not allowed to use any programmable ICs. Can you help me of some sort?
Hello, thanks for your interest! Glad you find the video useful :-) Yes, this can be done. Just to clarify, when should it reset? At 8 or at 9? Basically you need to check if each segment is in the right state (on or off), and you can do it with logic gates. The resulting output can be sent to the reset pin. Let me know if that makes sense, and if not I can draw a schematic :)
@@FriendlyWire after 8, when i press the button, it should be 0, instead of proceeding to 9. Adding logic gates might complicate the overall circuit, wouldn't it?
@@janedrinesteban5687 Yes, of course it makes it complicated :( But that is the price you pay for using the all-in-one counter+decoder like the CD4026. You could always use a CD4510 and CD4511 combination, where the CD4510 is a BCD counter that is easier to reset, and the CD4511 is the BCG-to-7-segment decoder. For the CD4026 you need to get creative. I will think about it, maybe there is a simpler way, but the brute force approach is this one: connect segments a,b,c,d,f,g to the inputs of a 6-channel AND gate. Connect segment e to an inverter. Then connect the outputs of the AND gate and the output of the inverter to a 2-channel AND gate. The output of that AND gate will fire when the display shows 9.
Good question, but not possible with this chip, it will always reset back to 0. If you want a more custom experience, I recommend the CD4510 BCD presettable up/down counter, and then the CD4511 BCD-to-7-segment decoder to connect it to a 7-segment display.
Unfortunately it won't work with the CD4026 :/ You could invert each signal and then use the common anode display, but you would need another chip for that. It would probably be easier to get a common cathode display in that case.
Hey Saboor, thanks for the question! Yes, you can do that. Add a second CD4026 to the circuit. Connect it to VDD, ground, and the 7seg display the same way. Then, connect the "CO" pin (carry out, pin 5) of the first CD4026 to the "CLK" pin (clock, pin 1) of the second CD4026 counter.
That's a fun little project. Great presentation again, by the way.
Thank you so much, I am glad you like it!
I don’t think anyone could have explained that circuit better! I understood the whole process - thanks to your explanation and graphics. Well done!
Hey, thank you so much, it means a lot. I hope I could inspire you to give it a try and lean some more electronics. Have a great day!
@@FriendlyWire - I finished my first attempt about a week ago, and I obviously did something wrong. I would have been amazed if I got that whole circuit right the first time. I might start from scratch and try to be more careful on my next attempt. Wish me luck!
@@thetooginator153 Of course, it always takes more time to do these things in person. I am happy to help, just send me an email or get in touch on social media. We will figure this out! :-)
The hand drawn bits are adorable.
Ha, glad you like it!
Hi ! Nice tutorial. But, how to make the memory backup after power off ? To display the same number when turned on again ?
Hello Marzena, this is a good question. Unfortunately the CD4026 does not have a built-in memory. What you could do is this: simply disable the display by putting pin 3 to ground, then the current consumption should be much lower. Then, if you drive everything via a rechargeable USB bank, for example, it could easily last in standby mode for a few days. How long does it need to keep the memory?
Thank you for this tutorial ❤
You're very welcome, I am glad it was helpful! :)
Hi, I understood this and implemented this it works and helps a lot but the problem is I have to run this on simulator on Proteus for my project and Tried alot but Stuck on led display there a-k alphabets in led but in Proteus there is a-g so how to take other inputs can you make a video on it
Thank you for the question, I am glad that the video was helpful. I am not sure if I understood everything :) Can you explain what the problems seems to be?
@@FriendlyWire thanks for your response There was a wire missing which was not connected,now it's working
@@MAFIAGAMING-pn6se Perfect, I am glad it's working now! Which wire was it?
@@FriendlyWire led common pin is connected to R3(Resistor) and then resistor is connected to ground,but I have to connect led common pin to ground separately after that it starts working 🙂
Hi! I thought it was a common practice to connect a 220-ohm resistor in series with each output of the 4026 IC to its respective LED in the 7-segment display.
Why not use that instead?
It's much better to do that, you are right. I took a shortcut here, which was not the best idea.
Great tutorial. What if i wanted a second switch that decrease the counter. Would i need a different ic chip. Many thanks
Hello Darren, I am glad you like the video, and thanks for the question. Yes, the CD4026 can only count in one direction (up). The CD4510 counter, for example, can count up and down, but outputs BCD signal. You would need a CD4511 to convert it into 7-segment. So: instead of the CD4026 you could use a CD4510+CD4511 and then count up and down :) Let me know if it helps!
Thank you for the video on this, its just what I needed! Is there any way to adjust the circuit to use AA batteries instead? I'm looking to put this in something that would be used for a long time and replacing those 9Vs is a pain!
Thank you, I am glad you like the video! Yes, you can use AA batteries, too. I would recommend three AA batteries in series to give 4.5V, and then you can replace the 470 Ohms resistor with a 220 Ohms resistor for the LED. Everything else can stay the same :)
Greeat video, but can I ask, "Is there a way to subtract a count from the total?
Unfortunately, the CD4026 does not count backwards... But you could count forward and basically subtract it this way, since it always rests back to 0 after passing 9. If you want to subtract a number, call it N, it's the same as adding 10-N.
Example: the counter is showing 8, and you want to subtract 4. So, in this example, N=4. This means you have to add 10-N, which is 10-4 = 6. If you increment the timer 6 times, it will show 4 after that, which is what you wanted :)
If you want to subtract 1, then you just have to increase the timer 9 times. If you do it really quickly, then it will look like it reset by 1 (the intermediate counts will be almost invisible).
Hope that helps!
Hi I have dont this project it works perfectly, but i have a question, instead of push button do i connect Rotary encoder ( Mouse Scroll wheel ) ?? if it is yes, will you please tell the pin out connections, where do connect the mouse scroll wheel button in the 4026 ic ? Thanks
Thanks for the question! A mouse scroll wheel does not generate an on/off output like a pushbutton, there is more circuitry involved to decode the signal of a rotary encoder. So I am not aware of any simple solution for this, unfortunately. Would you be willing to use a microcontroller, or does it have to be the CD4026? I may do a video on how to use rotary encoders with a PIC microcontroller soon.
@@FriendlyWire Thanks for your quick reply, my idea is instead of push button , i would like to use some Rotary encoder like volume control to increase or decrease the count with CD4026,
@@angs7265 I see! Unfortunately I cannot think of any simple solution. It depends a lot on your rotary encoder. But there is another way: you can use a BCD dip switch ( see the one at friendlywire.com/tutorials/buttons-switches-101/#ch6 , or one on Ebay right now, Jan 17, 2023: www.ebay.com/itm/175465827952 ) that has four outputs. Then you can use the CD4511 BCD-to-decimal converter to turn that signal into 7-segment value.
That was informative
Thanks man
Thank you so much, glad you like it!
Hey quick question, is the 7 segment display is a common cathode or a common anode?
Please answer!
Hey there, it's a common cathode one. If you build this, make sure you add one 470 ohm resistor on each output of the CD4026 (see schematic at 1:23). In the video I just used one 470 ohm resistor at the cathode, but that is not good practice. Hope it helps! If you build this I would love to see a picture, feel free to share on socials @FriendlyWire :)
Any tutorial for CD4026 to display number between 0-12? I want to make 12-hour digital clock without microcontroller.
You will need two CD4026's for that, connect the carry out in of the first one to the clock pin of the next one. :)
Hello, one question if I want to use an inductive proximity sensor, how can I switch it so that it can count me?
Hello :) In principle, you can use sensor outputs to count with the CD4026, they just have to be the right voltage levels. Do you have a datasheet/name/link of the proximity sensor you want to use?
@@FriendlyWire thanks for answering, the sensor is inductive NPN powered by 12v DVC three-wire brown, black and blue
@@AnimaladasGraciosas Great, that looks like something we could work with. Do you have a datasheet? Feel free to reach out via email as well, you can find it on the bottom of the website www.friendlywire.com :) Without datasheet it will be hard to guess how to do it.
Hi!
I have one question!
Shouldn't you put one limiting resistor from each output of 4026 to the anodes of the display, instead of one single resistor from the common cathode to ground?
In case multiple LEDs are lit the sums of the currents make a greater IR drop across the single resistor.
Hi Antonio, yes, you are completely right! In practice I find that for these small displays there is not much variation in brightness between a 1 and an 8, though. I did the same for my CD4094 project and it works rather well there, too. In general, and for larger displays, this does not work.
Thanks for pointing it out! :)
I was reading the 4026 datasheet and it suggests that LED switching be made via npn transistor and current limiting resistor.
How come your circuit (4026 or LEDs) did not overheat?
no wait...disregard this last comment of mine. I was thinking of other 4026 implementations I saw...where no current limiting resistor is used at all.
@@antonioagostinelli9430 It's easy to check: with only one resistor you cannot make it worse, because all LED segments that are ON draw current through it. But the current through the resistor is fixed. If it is, say, 15mA, then two segments get 7.5mA each, 3 segments would get 5mA each, and 7 segments would get slightly more than 2mA each. Hope it makes sense :)
Hey so like if we are making a digital clock ,should we connect 7 similiar resistors or 1 resistor at the end?
Using 1 single resistor in the end causes sum of all the 7 currents to go through it and thus increases I^2R losses and increases heating is that what you meant bro?
Hi! I could not understand but mine just counts till 7 then returns back to 0. Help!
Thank you for your question! Is it possible that the touch button you use bounces? This could explain why the counter sometimes jumps. Is your reset pin connected to anything? Don't worry, these kind of things are normal and can happen (and happened to me a lot of times, too), but we will find the mistake :)
Hi. Great video.
Just one quick question.
If I chain six of those to make 6 digits counter is the ceramic capacitor required once per build or once for every IC?
Do other IC's also need the capacitor? If yes how do I know what kind and value should I use?
Thanks so much! A 100nF ceramic should be close to any CD4026, it's just good practice that removes the possibility of unwanted glitches :)
@@FriendlyWire Do other ICs also require 100nF or other values? If other how do i know what value I should use?
@@taurruth These are sometimes called bypass capacitors. Their value is not so critical, but around 100nF is typical. All logic chips have one of these, to make the circuit more resilient against noise. Under ideal conditions these capacitors are not necessary, but it is good practice to include them, especially if you are using a noisy power supply.
@@FriendlyWire Thank you. I will use them from now on everywhere until I'm wise enough to know where they are not needed :)
@@taurruth It's good practice, and I have actually had a case, very early on, where I used a dirty power supply and my digital clock just would not work for the life of me. These capacitors saved me, and so I think it's only fair to recommend them to others, too. :)
Hi sir. The tutorial is great and I understand all the cirtuit. But even I had done everything same (yes. even the coordinates of components ) it didnt seem to work. What can be the problem you think? (I checked all components no problem about them)
Also. If you answer this, Thank you man youre great
Hello Yusuf, thank you for your interest and your question! I have been there, too, these things can be a bit tricky sometimes. Can you send me a photo of your built? You can either contact me on social media @FriendlyWire or send me an email (my address is at the bottom of www.friendlywire.com). I am sure we can figure this out together! :)
Problem Solved, Thank you
@@yusufkonevi6803 That's great, congratulations! Let us know what it was, maybe somebody else has the same problem and they may find your solution helpful :)
@@FriendlyWire The problem was that the display I installed later was a common anode, not a common cathode, since it was larger. I also have a question: how can I make this counter 2 digits?
@@yusufkonevi6803Oh, I see! Yes, this circuit is for a common cathode display. (But these displays always have the same size, you can only tell if it is common anode or cathode from the type number and/or from experimenting with the module.)
You can make it 2 digits like this: connect Carry Out (pin 5) to the CLK pin of the next CD4026. On this next CD4026, connect a 7seg display just as before, and put RESET (pin 15) to ground, Clock Inhibit (pin 2) to ground, and Display Enable (pin 3) to VDD. Let me know if it works! :)
Hi I have a project like this, and I am following your tutorial. I already completed the circuit in my simulation, but I need to reset the sevseg after it reaches the digit 8. This will be use as a scoring device. We are not allowed to use any programmable ICs. Can you help me of some sort?
Hello, thanks for your interest! Glad you find the video useful :-) Yes, this can be done. Just to clarify, when should it reset? At 8 or at 9? Basically you need to check if each segment is in the right state (on or off), and you can do it with logic gates. The resulting output can be sent to the reset pin.
Let me know if that makes sense, and if not I can draw a schematic :)
@@FriendlyWire after 8, when i press the button, it should be 0, instead of proceeding to 9. Adding logic gates might complicate the overall circuit, wouldn't it?
@@janedrinesteban5687 Yes, of course it makes it complicated :( But that is the price you pay for using the all-in-one counter+decoder like the CD4026. You could always use a CD4510 and CD4511 combination, where the CD4510 is a BCD counter that is easier to reset, and the CD4511 is the BCG-to-7-segment decoder.
For the CD4026 you need to get creative. I will think about it, maybe there is a simpler way, but the brute force approach is this one: connect segments a,b,c,d,f,g to the inputs of a 6-channel AND gate. Connect segment e to an inverter. Then connect the outputs of the AND gate and the output of the inverter to a 2-channel AND gate. The output of that AND gate will fire when the display shows 9.
@@janedrinesteban5687 Let me know if that helps or if you need more input :)
Where is your explained full vedio, how to work this Circuit properly.
I'm not sure what you mean?
How would I set it to a certain number when it resets?
Good question, but not possible with this chip, it will always reset back to 0. If you want a more custom experience, I recommend the CD4510 BCD presettable up/down counter, and then the CD4511 BCD-to-7-segment decoder to connect it to a 7-segment display.
Jens ich hab dich abonniert, wegen deiner coolen Brille
:D
What If I have common anode display available
Unfortunately it won't work with the CD4026 :/ You could invert each signal and then use the common anode display, but you would need another chip for that. It would probably be easier to get a common cathode display in that case.
@@FriendlyWire thanks for your reply . I had a deadline so used ic7404 (NOT gate) and inverted each output...works fine now
@@vishamv6346 Yup, that woks! Perfect! :)
Awesome video, but I need 2-digit counter for my project. Can you please help me with that?
Hey Saboor, thanks for the question! Yes, you can do that. Add a second CD4026 to the circuit. Connect it to VDD, ground, and the 7seg display the same way. Then, connect the "CO" pin (carry out, pin 5) of the first CD4026 to the "CLK" pin (clock, pin 1) of the second CD4026 counter.
@@FriendlyWire And what about Pushbuttons (Reset & Start)? Do I have to connect pushbuttons with second CD4026 also? If yes, then how?
Please help.
@@FriendlyWire One more question, Do I have to connect all these resistors and capacitors to the second CD4026 also or are these enough?
The K inhet waht hie doe
I'm sorry, I am not sure what you mean, can you repeat your question? :)