Sunday, December 27, 2009

2 Digit 7 Segment Up/Down Counter





Using my limited background in electronics I have completed a fun little project. In my online research, there are quite a few forum posts and discussions about creating these type of simple counters. Ideally you could set all of this up using an AVR and save alot of real estate, but the IC's are cheap and there's no programming required. Here's what you need:


1 - 2 digit Common Cathode 7 segment display ( or 2 single digit CC displays)

1 - CD4093 - Quad 2-input NAND with Schmitt trigger inputs

2 - CD4029 - Binary/Decade Up Down Counter IC

2 - CD4511 - 7 segment display driver IC

2 - momentary switches normally open

1 - 2 position toggle switch

2 - 4 pole DIP switches (optional)

1 - 7805 voltage regulator

~10 - 10Kohm 1/4W resistors

2 - 100Kohm 1/4W resistors

14 - 330ohm 1/4W resistors

1- big breadboard


The DIP switches are optional. They are used to preset the digits you start at after a reset. The count increment is fixed as 1. I don't know how to change that. Anyway, you can check out my youtube video of the counter and the attached schematic to show you how it lays out.


The CD4093 basically acts as a switch debounce. Without it, the display just rapidly counts over and over.


The key to having this work is to trigger the "first" digit (i.e. the ones place) and connect the first CD4029 Carry Out pin to the Clock (trigger) pin of the "second" (i.e. the tens place) CD4029. It's not rocket science but you may find it useful.


All the parts cost me less than $3.00 and it was pretty fun


Post any comments or questions and I will try to help.


Here's a couple of useful links:


http://www.kpsec.freeuk.com/components/cmos.htm Full Data of 4000 Series CMOS chips
http://www.kpsec.freeuk.com/counting.htm Theory of counting circuits
http://www.avnet.com/ Cheap way to get the parts.

13 comments:

  1. I want to duplicate this project only with a blue display. I am having trouble finding the parts from the website you listed. Any help would be great.

    ReplyDelete
  2. I did not understand why the 7805, because cis is cmos! I
    I'm wanting to use a 9 volt battery, what do you think?

    ReplyDelete
  3. dear mr. roznerd i have some problem about this stuff... can we talk on yahoo messenger together with camera so you can see whats the problem is? it just wont proceed to the counting...when ever i click on the trigger. plus the DIP switches when i switch on the dip the displays are correct.. plz talk me in my yahoo messenger its fly3modie@yahoo.com

    ReplyDelete
  4. JR - I can try to help you via comments here or if you want to post a youtube vidoe and link me on it that's cool. I don't have a webcam or yahoo account. I woundn't worry too much about the DIP switches at this point, just triple check your work with the schematic, because I think you might just have some small mistakes on your wiring or something.

    ReplyDelete
  5. Thanks, this filled in the missing pieces to a project I'm trying to build.

    ReplyDelete
  6. thanks roznard i appreciate that you replied and yes i did make a mistake and done on remedying it thanks a lot.. after the project is done i will post a video of the project it self... the counter is only a part of the project thats why it isnt finished until now XD

    ReplyDelete
  7. we want to use a bigger seven segment display here, and the 7805's 5V supply isn't enough to make it light up. do you know how to modify the circuit so that enough voltage will run through the bigger seven segment displays and light them up??

    ReplyDelete
  8. I am confused about quantity of 10K resistors. Do you need the ones that go to dip switches if you dont install the switches?

    ReplyDelete
  9. How would you do this on circuit wizard?
    (The circuits program)

    ReplyDelete
  10. Your post really helpful for my Display Driver IC Market Research and Development.

    ReplyDelete
  11. This is just what I was looking for thanks. A couple of Q's what is your power source. What are the spec on capacitors c1 &c2 and where do pins 4 and 9 on 7 seg display go to. These might be obvious Q's but I'm a bit of a novice

    ReplyDelete
  12. i have the same problem as jr...whenever i click the trigger it just wont proceed

    can i also use a toggle switch in replace to the momemtary switch ? ? will it continuously pulse over and over again ?

    ReplyDelete
  13. This is an amazing information found here... I really enjoyed it. Thanks very much for sharing it.
    Business Research

    ReplyDelete