Debounce

You are not logged in.

Please Log In for full access to this page.

Welcome to Module 2! In Module 1, you built a cascading decade counter that counts from 0-99. You might have noticed that sometimes when you pressed the button once, the counter jumped by 2 or even 3 numbers. This wasn't a problem with your circuit – it's a real phenomenon called button bounce, and in this exercise, you'll learn how to fix it! By the end of this exercise, you'll understand why buttons bounce, how to visualize the problem, and how to solve it using a debounce circuit.

NOTE: Throughout this course, all the switches that serve as clock pulses must be debounced to avoid unwanted behaviour, especially in this module.

Demonstration of switch bounce causing unwanted count increments
Demonstration of a basic debounce circuit fixing the bounce

1) Understanding Button Bounce

What is Button Bounce?

When you press a mechanical button, you might think the connection happens instantly and cleanly. In reality, the metal contacts inside the button physically bounce against each other several times before settling into a stable connection.

Inside a button: metal contacts bounce when pressed

This bouncing happens incredibly fast – usually within 5-50 milliseconds – but it's fast enough that electronic circuits can detect each bounce as a separate button press. Think of it like dropping a basketball. When the ball hits the ground, it doesn't just stick – it bounces several times before settling. Similarly, when you press a button, the internal contacts bounce several times before making stable contact.

If a button bounces 5 times when you press it once, how many times will a counter increment?

Why This Matters

For simple circuits like turning an LED on and off, button bounce doesn't matter – the LED just flickers for a few milliseconds, which you probably won't notice. But for counting circuits, each bounce is registered as a separate count. This is why your cascading decade counter from Module 1 sometimes skipped numbers!

2) Observing Button Bounce

Let's see button bounce in action using the CD4026 cascading decade counter you built in the previous module.

Spurious Increments Test

  1. Ensure your CD4026 counter circuit is powered ON and currently displays a number.
  2. Connect a basic tactile button directly to the clock input (Pin 1) of your first CD4026, with a pull-down or pull-up resistor (whichever way you originally wired your manual trigger).
  3. Press the button carefully and repeatedly.
  4. Observe the 7-segment display closely as you actuate the switch.

You should notice that occasionally, a single press causes the counter to jump by 2, 3, or even more numbers! This unpredictable behavior is the direct result of the button contacts physically bouncing.

When observing your CD4026 counter, what is the clearest indicator that button bounce is occurring?

3) Building a Debounce Circuit

To fix button bounce, we need to "smooth out" the bouncing signal so that multiple bounces are treated as a single button press. We do this with an RC circuit – a combination of a Resistor and a Capacitor.

Now let's build a proper debounce circuit for your button. You'll need:

  • 1 × 10kΩ resistor
  • 1 × 10µF capacitor

Electrolytic Capacitors and Polarity

Electrolytic capacitor with polarity markings

The 10µF capacitor you'll use is an electrolytic capacitor. Unlike resistors, these capacitors have polarity – they must be connected in the correct direction or they can be damaged. Electrolytic capacitors have two legs:

  • Positive leg (anode): Usually longer, connected to higher voltage
  • Negative leg (cathode): Shorter, has a stripe with minus signs (-) on that side of the cylinder, connected to lower voltage (usually GND)

How can you identify the negative leg of an electrolytic capacitor?

The Circuit


1. Turn your power OFF.
2. Connect your button so it spans the middle gap of the breadboard.
3. Connect one leg of the button directly to GND.
4. On the other side of the button (the leg that connects when pressed):
a. Connect a 10kΩ resistor from this pin to 5V (pull-up resistor)
b. Connect the positive leg (longer) of your 10µF capacitor to this pin
c. Connect the negative leg (shorter, marked with -) of the capacitor to GND
5. Connect a wire from this same pin (where the resistor, capacitor, and button meet) to the clock input (Pin 1) of your CD4026.

Breadboard image of a debounced circuit
Breadboard image of a debounced circuit

Why This Works

Pull-up Resistor (10kΩ to 5V):

  • When the button is NOT pressed, this resistor "pulls" the voltage up to 5V (HIGH)
  • This ensures the signal is always in a known state (not "floating")

Capacitor (10µF):

  • Smooths out voltage changes caused by button bounce
  • Creates a gradual voltage rise instead of instant jumps

Button to GND:

  • When pressed, connects the circuit to ground
  • When released, the pull-up resistor brings voltage back to HIGH

In this circuit, when is the clock pin HIGH?


6. Turn your power ON.
7. Test your debounced button! Press it rapidly – the counter should reliably increment by exactly 1 every time.

4) Debouncing Your Cascading Counter

Now that you understand debouncing, let's apply it to your full cascading decade counter from Module 1!

Your counter has multiple buttons:

  • One button for incrementing the count
  • One button for reset

Let's debounce both of them.

Debouncing the Increment and Reset Buttons


1. Turn your power OFF.
2. Build the debounce circuit (10kΩ pull-up, 10µF capacitor, button to GND) for your increment button.
3. Connect the output to the clock pin (Pin 1) of the FIRST CD4026.
4. Build a SECOND identical debounce circuit for your reset button.
5. Connect the output of this second circuit to the reset pins (Pin 15) of BOTH CD4026 ICs.
6. Turn your power ON and test both buttons.

Why Do We Need the Resistor?

You might wonder – why not just connect the button directly between 5V and the clock pin?

The pull-up resistor serves two important purposes:

1. Prevents floating inputs: When the button is not pressed, without a pull-up resistor, the clock pin would be floating – not connected to anything. Floating inputs can randomly pick up electrical noise and trigger the circuit unexpectedly.

2. Limits current: When you press the button, if one side were directly connected to 5V, pressing it would create a short circuit from 5V to GND. The resistor limits the current flow, protecting your power supply.

What is a 'floating input'?

5) Reading Circuit Diagrams

So far, we've used written steps and photos to describe circuits. As circuits get more complex, this becomes confusing. Engineers use circuit diagrams (or schematics) to show how components connect.

Here is the circuit diagram for the debounce circuit you just built:

Schematic diagram of the debounce circuit

Let's break down the symbols:

Symbol Image Name What it means
Resistor The zig-zag line represents resistance to current flow
Capacitor Two parallel lines (sometimes one curved) represent the two plates of a capacitor
Switch/Button A line with a break that can be closed to make a connection
Ground (GND) 0V reference point. All ground symbols connect together
5V/VCC Positive power supply

Reading schematics is a crucial skill in electronics. Instead of showing the physical layout (where things go on the breadboard), schematics show the logical connections between components.

What is the main advantage of a circuit diagram over a photo of a breadboard?

6) Recap

Congratulations! You've learned:

✓ Why mechanical buttons bounce and how it affects counting circuits

✓ How to observe button bounce using your cascading counter

✓ How to build a debounce circuit with a pull-up resistor and capacitor

✓ How to read basic circuit diagrams

✓ How to apply debouncing to multiple buttons

Your cascading counter should now work perfectly, incrementing by exactly 1 with each button press!

Final Submission

Upload a short video (15 seconds) showing your debounced cascading decade counter. Press the increment button rapidly multiple times – the counter should increment smoothly by 1 each time. Then press the reset button to show it cleanly resets to 00.
 No file selected


In the next exercise, you'll begin with the fundamentals of sequential logic - Latches!