CD4040 changes pulse rate

Thread Starter

Arjune

Joined Jan 6, 2018
211
I connected one output (pin 1) of a cd4040 to the clock input of another cd4040. I am driving it with a 32 khz oscillator using a Schmidt trigger. I am using pin 6 and pin 9 as output of the second cd4040 and joining them with an or gate to produce two pulses per second and one pulse every 2 seconds. The problem is the rate seems to double sometimes when I power it on and I don't know if there's an anomaly with the cd4040. I want to drive a clock with it that is not usually driven this way where it would pulse two times per second and once every 2 seconds and this should keep the 60 count per minute. Somehow I feel my mind is affecting the count of the cd4040 and I don't know why it behaves this way.
 
Last edited:

djsfantasi

Joined Apr 11, 2010
8,652
What is the format/ file extension of the picture you’re trying to post? That may be why you’re not successful in posting a picture.

Unfortunately, your pdf is rotated to the left. I use a smartphone, so I really can’t see your schematic as it’s sideways. If I rotate my phone the image rotates as well. I guess I could download the pdf and print it. But that’s inconvenient. Sorry.
 

Thread Starter

Arjune

Joined Jan 6, 2018
211
What is the format/ file extension of the picture you’re trying to post? That may be why you’re not successful in posting a picture.

Unfortunately, your pdf is rotated to the left. I use a smartphone, so I really can’t see your schematic as it’s sideways. If I rotate my phone the image rotates as well. I guess I could download the pdf and print it. But that’s inconvenient. Sorry.
I did a screen shot of Kicad as png:sch_pulsar_15-25-40.pngsch_pulsar_15-25-40.png
 

LesJones

Joined Jan 8, 2017
3,897
I think that you do not understand the logical OR function.
This is the output of ORing Q0 and Q2 of the second 4040.
Screen Shot 12-06-22 at 09.16 PM.PNG
You will not simply add the number of pulses as you seem to be describing.

Les.
 

Quail John

Joined Dec 7, 2022
1
One problem is that you are ORing the output of a counter whose bits do not change at the same time so you might get output spikes from the OR gate when you don't expect it. Consider the change from Q210=011 to 100. Since the 4040 is a ripple counter, Q0 will go low first, forcing the OR gate output low, then a little later Q2 will go high making the output high, so you just got a negative going output pulse when you didn't expect it. You could maybe register the output of the OR gate with a flip-flop clocked from the same clock driving the counter to eliminate these spikes.
 
Last edited by a moderator:

MisterBill2

Joined Jan 23, 2018
13,722
It seems that the TS needs to replace the quad OR with a quad AND IC. That should do what he us seeking. Or else implement the NOR function with one of the inverters in line with each of the inputs to the OR gate. did not do the map n that, but a NOR does act like an AND. It is worth trying.
 

WBahn

Joined Mar 31, 2012
27,866
What does it mean to have two pulses per second and one pulse every two seconds (on the same signal)? Unless they are shifted in phase, if there are two pulses every second, then there are already pulses every two seconds.

In addition, OR'ing two signals is a good way to generate glitches. In fact, since the 4040 is a ripple counter, you are almost guaranteed to generate a LO glitch when the state transitions from 011 to 100 (as the three lsbs) since the lsb will go LO shortly before the upper bit goes HI, resulting in a HI-LO-HI output of the OR gate. This is an example of a static-1 timing hazard.
 

WBahn

Joined Mar 31, 2012
27,866
It seems that the TS needs to replace the quad OR with a quad AND IC. That should do what he us seeking. Or else implement the NOR function with one of the inverters in line with each of the inputs to the OR gate. did not do the map n that, but a NOR does act like an AND. It is worth trying.
Are you able to discern what he is trying to achieve? I can't, but that might just be me not correctly reading between the lines.
 

MisterBill2

Joined Jan 23, 2018
13,722
I was thinking that the TS wanted a pulse every time Q0 and Q2 were both high. That will be at counts 5 and 8, unless count 7 was decoded to reset the counter.
 

Thread Starter

Arjune

Joined Jan 6, 2018
211
I need to know if the total output pulses would be 60 pulses per minute. My mind has a hard time observing the counting blinking an led at the output of the OR gate and comparing it with my watch. My schizophrenia is telling me that the mass of light is changing and that is why there may be a malfunction of the cd-4040.
 
Last edited:

LesJones

Joined Jan 8, 2017
3,897
You can get 60 pulses per minute (1 Hz ) directly from output Q2 (Pin 6) of the second 4040 without any need to gate any outputs together. To make counting pulses easier count the pulses from Q4 (Pin 3) you should see 15 pulses in a minute on that pin.
This is assuming your crystal is 32768 Hz.
Les.
 

DickCappels

Joined Aug 21, 2008
9,509
Hope you picked up on the hint that you need a 32768 Hz watch crystal to get 1 and 2 Hz pulses (instead of the 38 kHz shown on the schematic).
 

WBahn

Joined Mar 31, 2012
27,866
I need to know if the total output pulses would be 60 pulses per minute. My mind has a hard time observing the counting blinking an led at the output of the OR gate and comparing it with my watch. My schizophrenia is telling me that the mass of light is changing and that is why there may be a malfunction of the cd-4040.
Again, what is it that you are trying to achieve?

Is all you want is something that produces a steady stream of pulses at 60 pulses per minute?

I can't see how that relates to your original spec of wanting two pulses per second and also one pulse every two seconds.

Let's first establish what it is you are trying to accomplish. What is the reason that you are even needing/wanting to build this circuit in the first place? What underlying problem are you trying to solve?
 

Thread Starter

Arjune

Joined Jan 6, 2018
211
I believe the world is controlled by evil and that means controlling the time also so I want to build a circuit to disrupt their operations since they are monitoring me and the circuit will have an effect on this. Cooperating with normal life does not seem to be the present solution. We have diseases and harm occuring around the world and they must be forced to stop what they are doing because they are not doing it voluntarily. I believe my timing of the clock will have a direct effect that is positive on the condition.
 

WBahn

Joined Mar 31, 2012
27,866
I believe the world is controlled by evil and that means controlling the time also so I want to build a circuit to disrupt their operations since they are monitoring me and the circuit will have an effect on this. Cooperating with normal life does not seem to be the present solution. We have diseases and harm occuring around the world and they must be forced to stop what they are doing because they are not doing it voluntarily. I believe my timing of the clock will have a direct effect that is positive on the condition.
Ah, that makes things much clearer. Your original approach will work just fine for what you are doing -- it should work at least as well as any other approach you might try. Good luck.
 

Thread Starter

Arjune

Joined Jan 6, 2018
211
The crystal is 32,768 HZ-sorry I made an error on the schematic. I recorded a video of the circuit into a counter that uses a cd4510 IC and I put my watch next to it for comparison and it seems to be counting okay. Can I post a video file of the display of my counter? I don't know if your site allows a video file directly.
 
Top