Issues with CD40110B

Thread Starter

matgube

Joined Nov 16, 2023
30
Hi all,
Foreword: I'm (really) new to electronics, this is my first project.
I'm trying to get a simple counter working with a CD40110B + 7 segment led. After smoking some components I got to a setup that seems to work BUT sometimes it skips a number, e.g. from 4 to 6. Both up or down.
I tried replacing the buttons and the counter, but no luck. The 5V supply seems stable, it's rated for 30W.
I'm using this schematic with additional 330 Ohm resistors inline each segment input.
1700134965994.png

Buttons: Adafruit buttons
Digit: Wurth WL-T7DS 7 Segments Display THT Single Digit T7DS056SC
Counter: CD40110B

Any idea of what the issue could be?

Thanks
Matt
 

k1ng 1337

Joined Sep 11, 2020
1,038
Try rebuilding the circuit on another breadboard with different jumpers. If not that, its probably due to switch bouncing. Try out a few debounce circuits.

Once you did that and the problem still is a pattern that never changes like always skipping #5, the IC is probably cooked.
 

Thread Starter

matgube

Joined Nov 16, 2023
30
Apologies, I forgot to mention I switched the breadboard too. The number skipped is random.
I'll try with the debouncing circuits, thanks.
Matt
 

Ya’akov

Joined Jan 27, 2019
10,235
Welcome to AAC.

Your circuit is almost certainly suffering from switch bounce. This is very normal and is a mechanical phenomenon. The switch will sometimes close, the bounce, and close again.

The general solution is to select an appropriate capacitor to act as a low pass filter. Since the capacitor will charge up and takes time to discharge, transient off-on pulses will not be seen by the IC.

The capacitor (and a discharge resistor) have to be chosen for the correct RC time constant. For the circuit. There are many tutorials online for debouncing. Read a little and come back with any questions,
 

MrChips

Joined Oct 2, 2009
34,809
Read up on what is switch bounce and ways to overcome it.
There are basically four techniques that can be used:

1) Simple RC filtering
2) RC filtering with Schmitt trigger gates, also with NAND gates
3) SPDT pushbutton with S-R flip-flop circuit
4) Software

Since your application is all hardware, you can ignore (4).

Solution (1) in its simplest form

1700149300751.png

One of many versions of Solution (2)

1700149450352.png


Solution (3)

1700149013002.png
 

Thread Starter

matgube

Joined Nov 16, 2023
30
Hello, quick update. I got some caps but no matter what I tried to do it did not work. If anything, things got worse with a cap.
I replaced the IC once more, used a button scavenged from somewhere else but no luck.
At this point the only thing I can think of is either the breadboard or the power supply. I'm using a phone recharger-style adjustable supply, maybe that's the issue? I ordered a proper one and we'll see.
Thanks
 

Thread Starter

matgube

Joined Nov 16, 2023
30
Btw, until now I went with trial and error to pick a cap value.
I know the high level theory, but how can I assess the time constant I need to calculate RC?
Thanks
 

Thread Starter

matgube

Joined Nov 16, 2023
30
The one in the first post, but with 330Ohm resistors on each segment line.
Where should I take the time constant from, the datasheet of the counter?
Thanks!
 

MrChips

Joined Oct 2, 2009
34,809
The one in the first post, but with 330Ohm resistors on each segment line.
Where should I take the time constant from, the datasheet of the counter?
Thanks!
R is the value of your pullup resistor.
C is the value of the capacitor.

Try,
R = 100kΩ
C = 1μF

You need to show your circuit, even a photo of a hand drawned one.
 

Alec_t

Joined Sep 17, 2013
15,118
Try connecting (using short wires) a decoupling capacitor (~1-10 uF) between the + and - supply pins of the IC, as close to the IC as possible.
 

Thread Starter

matgube

Joined Nov 16, 2023
30
So... at the end it seems that this configuration is quite stable, am I doing something wrong? Does it mean my power supply is not great?
1700490768556.png
 
Top