Fads to Obsessions and Beyond...




Free domain for life, exceptional technical support, website transfer

Digital 'Tally' or 'Event' Counter

A digital 'tally counter' or 'event counter' is constructed. The counter has 3 decades (i.e. 0-999) and is constructed using 7-segment LED displays. A CD4553 BCD Counter in conjunction with a CD4511 BCD-to-7 segment driver forms the basis of the event/counter circuit.

The calibration of a tipping bucket raingauge requires counting 'tips' (i.e. voltage pulses or switch closures) resulting from rainfall collecting on a funnel surface directed onto a 'see-saw' pivoting switch (the 'tipping bucket'). When the collected amount of rainfall (determined by the incident rainfall intensity and surface area of the funnel) causes the 'see-saw' to tip, this produces typically a voltage pulse via a reed switch or similar. The actual calibration involves pouring a known volume of water onto the collection funnel, and counting the resultant number of 'tips'.

The calibration is 'best' performed by allowing the known volume of water to enter the funnel over a period of time corresponding to the expected rainfall intensities of interest. This can be easily accomplished using a dropper bottle type arrangement which 'drips' water onto the funnel over time. However, manually counting the 'tips' is tedious and time consuming (if mimicking low rainfall intensity), so a simple event or digital counter was desired to perform this task (which also gave the benefit of allowing other field tasks to be accomplished while this was being done).

There are many approaches to constructing the desired event or digital counter. A microcontroller type approach (using a Microchip PIC or similar) potentially has the benefit of a lower part count and enables the incorporation of additional features such as time stamping events, storing/logging results etc. However, this would require a relatively expensive microcontroller chip and time to develop software to handle switch debouncing, multiplexing of LED displays etc.

Since the 'event counter' and numerical display (via 7-segment LED display or similar) type functionality is an ubiquitous requirement of many applications, there are a variety of components widely and cheaply available for these roles. In particular, 'simply wiring together' the combination of a CD4553 3-digit BCD (binary coded decimal) Counter with a CD4511 BCD-to-7 Segement LED driver produces the desired functionality (with the necessary LED displays, some switch debouncing and a power supply). Circuits for this arrangement are widely available (1) and even with producing a PCB is only a weekend project (which when this project was being constructed, the weekend before a field trip was to commence was the only time available).

The event counter as constructed simply allows counting of contact closures (either by the dedicated switch or via connection to an external source), that is, function as a digital 'tally counter'. If this project was to be constructed again (and additional time was available) additional functionality such as up/down counting could be incorporated. Alternatively, a microcontroller approach would enable possible 'time stamping' of when events occurred and storing of data for later output.

The circuit is built around the CD4553 3-digit BCD (binary coded decimal) Counter which provides the necessary functionality to count and store input pulses and enable display control of the count. The CD4553 works in conjunction with the CD4511 BCD-to-7 Segement LED driver. The CD4511 provides the functions of a 4-bit storage latch, an BCD-to-seven segment decoder, and an output drive capability. Three individual common-cathode 7-segment LED displays are used for the output display. Switch debouncing is provided by NAND Schmitt triggers (CD4093 provides four NAND gates of which two are used).

7-Segment LED Display's

A single 7-segment LED display consists of seven LED's (each shaped as a short bar) arranged in a rectanglar fashion, which when illuminated together in certain patterns, form the digits from 'zero' to 'nine' (i.e a single digit of a 'number'). There is an eighth LED to give the decimal point if necessary (not used in this application).

Each of the 7-segment LED displays have a common-cathode in the version used in this particular circuit. The following diagram (from the datasheet of the particular LED displays used) shows how the various segments (labelled 'a' to 'g') on the LED display are arranged and connected to the various pins. For example, to form the digit representing '7' segments 'a', 'b' and 'c' would need to be illuminated simultaneously (ie, pins 10, 9 and 8).

  • 7-segment LED Display7-segment LED Display

    Silver Membership registration gives access to full resolution schematic diagrams.

    7-segment LED Display

The CD4553 and CD4511 provide the necessary functionality that enables an input digit (in the form of binary coded decimal format) to be translated into the necessay segments being illuminated on a connected 7-segment LED display.

BCD to 7-Segment Driver (CD4511)

The CD4511 converts an input 'number' (binary coded decimal in the range 0 to 9) to the correct 'segments' that need to be illuminated on a 7-segment LED display that represent the number as a 'digit' on the display. The truth table given in the CD4511 datasheet demonstrates how this is done. For example, for an input number '7', which in BCD is 1110, i.e. 22 + 2 1 + 20 which equals 4+2+1=7, and corresponds to inputs C, B and A being '1' in the truth table or equivalently pins 1, 2 and 7 being 'high' (~5V).

Note that the CD4511 also has inputs for Lamp test (LT), blanking (BI), and latch enable (LE) inputs are used to test the display, to turn-off or pulse modulate the brightness of the display, and to store a BCD code, respectively.

The CD4553 provides the necessary circuity to convert a 'number' into BCD format necessary for connection to the CD4511 (as well as event/pulse counting functionality).

3-Digit BCD Counter (CD4553)

The CD4553 consists of three BCD counters that are cascaded synchronously with a latch to store the result. This means a value in the range of 0 to 999 can be counted and stored (on overflow returns to 0). The signal lines Q0 to Q3 (pins 5 through 9) output a BCD value that represents each digit. Since three digits are required to respresent the full possible range of values, the output lines DS1 to DS3 (pins 1, 2 and 15) enable multiplexing of the BCD signal output lines to output one BCD digit at a time.

The frequency of the multiplexed output is given by the capacitor connected across pins 3 and 4 (which with 1nF is approximately ~1kHz). The output lines DS1 to DS3 are therefore rapidly switched in sequence, which in turn connects the cathode of each 7-segment LED display via a BC557 transistor. This then enables each 7-segment LED display to be enabled at the correct time to display the correct digit.

Switch Debouncing

The momentary push-button switches used on the clock and reset lines are 'noisy' and will cause multiple 'counts' if not debounced. There are numerous ways to provide 'debouncing' for switches (an appropriately valued resistor + capacitor can perhaps be sufficient), but in this case the '100%' effective option of using NAND gates (from CD4093) was taken.

Note: Image loading can be slow depending on server load.

  • Digital Counter SchematicDigital Counter Schematic

    Silver Membership registration gives access to full resolution schematic diagrams.

    Digital Counter Schematic

Note: Image loading can be slow depending on server load.

  • Digital Counter - PCB All Layers

    PCB All LayersPCB All Layers

    Silver Membership registration gives access to full resolution schematic diagrams.

    PCB All Layersr

  • Digital Counter - PCB Bottom Copper

    PCB Bottom CopperPCB Bottom Copper

    Silver Membership registration gives access to full resolution schematic diagrams.

    PCB Bottom Copper

  • Digital Counter - PCB Top Copper

    PCB Top CopperPCB Top Copper

    Silver Membership registration gives access to full resolution schematic diagrams.

    PCB Top Copper

  • Digital Counter - PCB Silk

    PCB SilkPCB Silk

    Silver Membership registration gives access to full resolution schematic diagrams.

    PCB Silk

Qty Schematic Part-Reference Value Notes
Resistors
6R1 - R62701/4W, 10% 
1R710k1/4W, 10% 
3R8 - R1010001/4W, 10% 
1R11 - R15100k1/4W, 10% 
Capacitors
1C11nFceramic 
2C2,C3100nFelectrolytic 
Integrated Circuits
1U1CD4511CD4511 datasheet
1U2CD4553CD4553 datasheet
1U3CD4093CD4093 datasheet
Transistors
3Q1-Q3BC557small signal 
Miscellaeous
1BAT1battery holder2 x AA size
1J1connector 
3LED1 - LEc37 Segment Display 
2SW1,SW2Push Buttonmomentary contact 
1SW3Toggle Switch 
Description Downloads
3-Digit Digital Counter Bill of Materials Text File Download

The video below demonstrates testing of the circuit after soldering the various items onto the PCB.

The digital counter is a relatively simple project and no particular difficulties, other than the usual care and attention required when constructing any electronic circuit, should be expected.

From the various photographs it will be noted that IC sockets have been used, instead of soldering the IC's (CD 4553 etc) directly onto the PCB. This is done as IC sockets are inexpensive and cannot be damaged be excessive heat during soldering (well, within reason!). This then avoids potential trouble with damaging IC's during soldering, and also enables easy removal of an IC if necessary.

Something to note about the CD4553 is that maximum count rate is dependent upon power supply voltage and is typically 1.5MHz at 5V, 5MHz at 10V and 7MHz at 15V. This is not a concern in this particular application, but if this project was to be extended to act as a frequency counter/meter, may need to be taken into consideration.

The enclosure was custom made from 3mm perspex. which was cut and folded (after heating along an aluminium bar placed appropriately) and then 'glued' with perspex solvent. The encloure was designed so that buttons could be mounted directly onto the PCB, and the front and back of the enclosure formed the battery compartment.

Comments/Questions

No comments yet.

Add Comment/Question

Only Logged-In Members can add comments

"If we could sell our experiences for what they cost us, we'd all be millionaires".

Please donate any amount to help with hosting this web site.

If you subscribe (only $2/annum) you can view the site without advertisements and get emails abouts updates etc.

X

Sorry!

Only logged-in users with correct Membership Level can download.


Membership starts at only $2, so join now!