What's wrong with my modulus 12 counter?

Thread Starter

Arjune

Joined Jan 6, 2018
234
That wouldn't cause the count on the hours counter to change.

You have typos in the counter and decoder parts. If you correct them, you won't have others pointing that out.
I corrected cd4010 & cd4011 to cd4510 & cd4511. Thanks.
 

Thread Starter

Arjune

Joined Jan 6, 2018
234
The devil and aliens are making sure that your 50 years old (!) 555 oscillator overloads the 5.5V supply with its 400mA supply current pulses each time the output switches. Instead a Cmos 555 clock oscillator should have been used.
I'm pretty sure I'm using a CMOS 7555 to set the clock.
 

Thread Starter

Arjune

Joined Jan 6, 2018
234
I knew that they were typos. Others might not be so kind, so I thought it best to let you make the corrections.
I didn't mention how I interfaced one clock stage with the next so I included a schematic. The circuit goes between 1 modular 60 counter for seconds to1 modular 60 counter for minutes and from the minutes counter to the modular 12 hours counter. Could this circuit put two pulses instead of one from the minute counter to the hour counter causing the modulus 12 counter to make an error to advance two counts instead of 1 after 60 minute? I can't tell if there is an error with the minutes counter. Or the problem is really missing bypass capacitors at the power pins of 1 or more ICs? When I set the clock with the100 hz 7555 oscillator in the seconds input the clock advances properly up or down; even the modulus 12 counter switches correctly like about 1 count every 40 seconds.
 

Attachments

dl324

Joined Mar 30, 2015
16,846
I don't see how that circuit could cause problems.

One way to eliminate the lack of bypass capacitors as a potential problem is to tack one on the power leads of every chip.
I can't tell if there is an error with the minutes counter.
I'll trace the logic when I get some time.
 

dl324

Joined Mar 30, 2015
16,846
@Arjune You are a master slinger of gates. I finally had to enter your circuit in a simulator. I didn't see anything strange with the hours counter. Still working on making up/down work for the minutes counter.

If you interested, I can help you simplify the logic. Unless your obfuscation serves a purpose.
 

Thread Starter

Arjune

Joined Jan 6, 2018
234
I don't see how that circuit could cause problems.

One way to eliminate the lack of bypass capacitors as a potential problem is to tack one on the power leads of every chip.
I'll trace the logic when I get some time.
I'm sorry if I obfuscate you, that is unintentional. It pleases me greatly when you said you'll trace the circuit. I don't know how to do that but I guess you would use a computer application right. Thanks for making me feel great about logic gate design dl324. I have extra circuit boards I ordered of the clock and I'm hoping I don't have to change the design of the circuit. I built 3 similar clocks and all three of them have the same problem of the hour counter advancing two steps sometimes. My paranoia tells me that the clock is trying to protect itself or guard itself from some type of anomaly
 

dl324

Joined Mar 30, 2015
16,846
I don't know how to do that but I guess you would use a computer application right.
I entered them in a simulator called Digital Works. It's a free simulator, but I had to create my own parts for most IC's.

Here are the two counters with simplifications that are possible:
Hours:
1585363193486.png 1585363316676.png
Minutes:
1585363216901.png 1585363367447.png
Thanks for making me feel great about logic gate design dl324.
Your logic worked; that's what counts.
I built 3 similar clocks and all three of them have the same problem of the hour counter advancing two steps sometimes.
I didn't find any logic issues. The counters are synchronous, so glitches in decode can't be the problem.

Does the hour counter always misbehave the same on all three clocks? Is it the same count and in the same direction?
 

Thread Starter

Arjune

Joined Jan 6, 2018
234
I entered them in a simulator called Digital Works. It's a free simulator, but I had to create my own parts for most IC's.

Here are the two counters with simplifications that are possible:
Hours:
View attachment 202644 View attachment 202646
Minutes:
View attachment 202645 View attachment 202647
Your logic worked; that's what counts.
I didn't find any logic issues. The counters are synchronous, so glitches in decode can't be the problem.

Does the hour counter always misbehave the same on all three clocks? Is it the same count and in the same direction?
I know they're all misbehaving the same way in the up direction but I'm not sure on what count.
 

dl324

Joined Mar 30, 2015
16,846
I know they're all misbehaving the same way in the up direction but I'm not sure on what count.
I can't see anything that would cause an extra count on the hours counter. Is the clock to the hours counter just the reset signal from the minutes counter?
 

dl324

Joined Mar 30, 2015
16,846
I know they're all misbehaving the same way in the up direction but I'm not sure on what count.
Is the problem that the hours count goes from 9 to 1 in the up direction?

I connected the reset from the minutes counter to the hours counter the way I thought you would and found that hours never increments.

In the down direction, the hours counter never decrements.
 
Last edited:

dl324

Joined Mar 30, 2015
16,846
When counting up. When counting down, the preset enable.
My mistake. That fixed counting down, but up still jumps from 9 to 1.

I'll check the wiring again, but the minutes and hours counters worked when I tested them by themselves.
 

Thread Starter

Arjune

Joined Jan 6, 2018
234
Is the problem that the hours count goes from 9 to 1 in the up direction?

I connected the reset from the minutes counter to the hours counter the way I thought you would and found that hours never increments.

In the down direction, the hours counter never decrements.
I only notice the hour count is wrong when it's 1 hour ahead like 6 o' clock instead of 5 o' clock when is five o' clock. It couldn't be going from 9 to 1 because that's more than one hour ahead. I'm not certain what to think about that.
 

dl324

Joined Mar 30, 2015
16,846
I see an unconnected (floating) input, a big no-no in the world of cmos. If it's really like that, it could be contributing to your problem. Maybe it's just not connected on the drawing?
That was due to over aggressive lightening on my part. Here's the corrected image:
ronH.jpg
 

dl324

Joined Mar 30, 2015
16,846
I only notice the hour count is wrong when it's 1 hour ahead like 6 o' clock instead of 5 o' clock when is five o' clock. It couldn't be going from 9 to 1 because that's more than one hour ahead. I'm not certain what to think about that.
Is it possible for you to try the changes marked in red? The boxes indicate connections that should be broken (4 places). Connecting carry out from the previous stage to cin of the following stage is the typical way of cascading when you're using the full count. Connecting the clocks together eliminates problems caused by ripple clocking. I couldn't even leave in the propagation delay from the OR gate.

1585417263510.png

But that doesn't explain the skip you're seeing in the least significant counter. If it's still happening, it'll make the most significant counter jump too. That may give us something to check.
 

Thread Starter

Arjune

Joined Jan 6, 2018
234
I live in an adult home dl324 and they don't allow soldering; unless I go to my mother's home in the Bronx with the clock. But then I wouldn't want to mess up the circuit board. Unless it was a definite solution I would try the change you suggested. The clock could go for days without advancing one step extra in error but still it's very troubling. Maybe the clock is feeling pain and it's trying to protect itself with the extra count error. Maybe my timezone is changing unknown to me. To avoid too much work when I get a chance I would try the .1uF bypass capacitors on the hours counter-maybe at where the power leads go into the board, just one .1 microfarad capacitor per board. Maybe I'll put a capacitor on the power input terminals of the cd4511 decoder board which goes to the hour counter displays. There are two cd4511 for the hour display board and the two displays are on the same board connected. I'm baffled and I just want to minimize work.
 

dl324

Joined Mar 30, 2015
16,846
To avoid too much work when I get a chance I would try the .1uF bypass capacitors on the hours counter-maybe at where the power leads go into the board, just one .1 microfarad capacitor per board. Maybe I'll put a capacitor on the power input terminals of the cd4511 decoder board which goes to the hour counter displays. There are two cd4511 for the hour display board and the two displays are on the same board connected.
Did you happen to install the chips in sockets? They make sockets with integral decoupling caps.
1585435688339.png
 

dl324

Joined Mar 30, 2015
16,846
I did not see any on my sockets.
My point was that if you installed the chips in sockets, you could add decoupling caps by inserting sockets with integral caps into the existing sockets. That would be a way to put a cap on every chip without requiring soldering.

If the problem persists after doing that, I'd focus on the clock coming from the minutes counter. I'd probably use a non-retriggerable one shot to stretch the pulse to see if that helps. If it does, the problem is identified and an acceptable solution can be pursued.
 
Top