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.