Modulus 60 circuit not counting properly

Thread Starter

Arjune

Joined Jan 6, 2018
354
The attached circuit worked good in the past, it counted from 00 to 59 minutes and then 00. In the new construction, In reverse it counts properly, from 59 to 00 and then 59 minutes. But I recently made another counter on another same PCB design copy and it counts from 00 to 60 minutes in forward mode instead of 59 minutes. I tried to troubleshoot it but can't find the problem. I swapped the ICs and still get the wrong count. Can someone take the time to analyze my schematic and possibly tell me what fault may be on the circuit board (something I missed soldering or something I shorted on the circuit board with soldering). I checked for continuity from solder joint to solder joint and it checked ok but I still could have missed something. Note: On the double pole double throw switch in the schematic, connecting the two poles to the bottom position causes the circuit to count up and connecting the switch up causes the counter to count down. There are two cd4510 up/down counters, 1 cd4071 OR gate IC, and 1 Cd4081 AND gate IC. On the transistor Inverter, instead of two 10K resistors and one 1K resistor at the collector, I used 2 47Ks and 3.6K respectively to reduce current. I used 2 cd4511 at the output of the CD4510 for the display. A second board with the same parts is working fine. This one has fill zones with copper-I don't think that is at issue. A second question: what should I compare with this board to the faulty board to possibly find my fault.

I'm hoping the pdf are large enough to read easily. This project was created with design spark. I no longer have design spark because I am using Linux.
I included a hand drawn circuit that is simplified -- the one with the word 'refined' in the filename.
 

Attachments

Last edited:

Ian0

Joined Aug 7, 2020
13,097
I can't say that it's the easiest diagram to read.
My guess is that you have a race hazard, the reset pulse timing is critical in comparison to the clock edge. If one is nanoseconds earlier it counts to 59 and if it is nanoseconds later it counts to 60. The timing depends on how long it takes the logic gates to react and possibly the transistor.
I suggest that you review how you are resetting the counter on 60 so that it doesn't have a potential problem.
You might be better off with a counter with synchronous preset and reset.
 

Thread Starter

Arjune

Joined Jan 6, 2018
354
I can't say that it's the easiest diagram to read.
My guess is that you have a race hazard, the reset pulse timing is critical in comparison to the clock edge. If one is nanoseconds earlier it counts to 59 and if it is nanoseconds later it counts to 60. The timing depends on how long it takes the logic gates to react and possibly the transistor.
I suggest that you review how you are resetting the counter on 60 so that it doesn't have a potential problem.
You might be better off with a counter with synchronous preset and reset.
If you are correct, I gather that I can add a small capacitor somewhere to ground to slow down the switching somewhere so it counts to 59 and not 60. If I am right, what is your response? Where would I put the capacitor?
 

Ian0

Joined Aug 7, 2020
13,097
Your hand-drawn diagram is much better than the other two. I can see what is going on.
What happens if you connect pin 10 of the AND gate to RESET and ignore the transistor/AND-gate/diode circuitry? After all, if ever the MSD display shows 6 it needs resetting, regardless of what is happening on the LSD.
 

Thread Starter

Arjune

Joined Jan 6, 2018
354
Your hand-drawn diagram is much better than the other two. I can see what is going on.
What happens if you connect pin 10 of the AND gate to RESET and ignore the transistor/AND-gate/diode circuitry? After all, if ever the MSD display shows 6 it needs resetting, regardless of what is happening on the LSD.
Isn't the LSD 6 and not MSD? I can't try what you are suggesting because the board is already soldered. I don't think I have a timing problem because my 5 other modulus 60 counters works OK. I'm thinking that a solder connection has not been made on the board somewhere.
 

Ian0

Joined Aug 7, 2020
13,097
Isn't the LSD 6 and not MSD? I can't try what you are suggesting because the board is already soldered. I don't think I have a timing problem because my 5 other modulus 60 counters works OK. I'm thinking that a solder connection has not been made on the board somewhere.
60: MOST significant digit is 6, LEAST significant digit is 0.
If the MSD has reached 6, then it doesn't matter what the LSD is.
You could have a bad connection, but it could also be a timing problem - they often show up if you have made a change which you think is insignificant.
How long does the counter stay on 60 before it resets to zero? Is it a full minute?
 

Thread Starter

Arjune

Joined Jan 6, 2018
354
60: MOST significant digit is 6, LEAST significant digit is 0.
If the MSD has reached 6, then it doesn't matter what the LSD is.
You could have a bad connection, but it could also be a timing problem - they often show up if you have made a change which you think is insignificant.
How long does the counter stay on 60 before it resets to zero? Is it a full minute?
I don't have the skill to answer that. Can I add an RC delay trap to the first cd4510's clock input at pin 15 (This counts from zero to 9). This will enable the second cd4510 to switch faster with the clock signal (switch to 6 then reset to 0 faster than the first one). If I am thinking right, what would the values be for the R (resistor) and C (capacitor to ground from R). I would have to break the clock signal wire to the first cd4510 and add the RC trap that would delay the clock to this IC.
 

eetech00

Joined Jun 8, 2013
4,704
The attached circuit worked good in the past, it counted from 00 to 59 minutes and then 00. In the new construction, In reverse it counts properly, from 59 to 00 and then 59 minutes. But I recently made another counter on another same PCB design copy and it counts from 00 to 60 minutes in forward mode instead of 59 minutes. I tried to troubleshoot it but can't find the problem. I swapped the ICs and still get the wrong count. Can someone take the time to analyze my schematic and possibly tell me what fault may be on the circuit board (something I missed soldering or something I shorted on the circuit board with soldering). I checked for continuity from solder joint to solder joint and it checked ok but I still could have missed something. Note: On the double pole double throw switch in the schematic, connecting the two poles to the bottom position causes the circuit to count up and connecting the switch up causes the counter to count down. There are two cd4510 up/down counters, 1 cd4071 OR gate IC, and 1 Cd4081 AND gate IC. On the transistor Inverter, instead of two 10K resistors and one 1K resistor at the collector, I used 2 47Ks and 3.6K respectively to reduce current. I used 2 cd4511 at the output of the CD4510 for the display. A second board with the same parts is working fine. This one has fill zones with copper-I don't think that is at issue. A second question: what should I compare with this board to the faulty board to possibly find my fault.
A couple of thing I noticed missing in your circuit:
1. There should be bypass caps (0.1uf) across the supply pins of each IC to prevent noise and keep the supply "stiff".
Additionally, add a 100uf cap across the main supply.
2. The CD4510 input pins that are "switched" (PE, U/D) should be pulled up or down with a resistor, as appropriate, to prevent them from floating and spurious triggering.

This is standard practice for digital design. If you don't do this, erratic operation will surely occur.

I'm hoping the pdf are large enough to read easily. This project was created with design spark. I no longer have design spark because I am using Linux.
You might try installing wine on linux. Then install DSPCB.
 
Last edited:

Thread Starter

Arjune

Joined Jan 6, 2018
354
A couple of thing I noticed missing in your circuit:
1. There should be bypass caps (0.1uf) across the supply pins of each IC to prevent noise and keep the supply "stiff".
Additionally, add a 100uf cap across the main supply.
2. The CD4510 input pins that are "switched" (PE, U/D) should be pulled up or down with a resistor, as appropriate, to prevent them from floating and spurious triggering.

This is standard practice for digital design. If you don't do this, erratic operation will surely occur.



You might try installing wine on linux. Then install DSPCB.
I tried 47k pull down resistors for pe (preset enable and u/d (up/down) but it did not work and I also tried 470 uf at the power supply and that did not work. There's too much trouble to install 0.1 microfarad capacitor at the powerpins of the ICs. I tried this on a previous board but it did not help. There must be a misunderstanding about surge current and switching with CMOS devices. I think aliens want the circuit to work the way it is working. This indicates that wrong has to be done to the right with my paranoia. The clock controls the truth and that has to be changed. I also think the truth tables control digital electronic circuits undesirably, making them a slave to circuit designs. Mathematics is what controls us like the pyramids in Egypt.
 

Ian0

Joined Aug 7, 2020
13,097
I don't have the skill to answer that. Can I add an RC delay trap to the first cd4510's clock input at pin 15 (This counts from zero to 9). This will enable the second cd4510 to switch faster with the clock signal (switch to 6 then reset to 0 faster than the first one). If I am thinking right, what would the values be for the R (resistor) and C (capacitor to ground from R). I would have to break the clock signal wire to the first cd4510 and add the RC trap that would delay the clock to this IC.
The point at which it corrects itself is crucial to knowing what goes wrong.
 

eetech00

Joined Jun 8, 2013
4,704
I tried 47k pull down resistors for pe (preset enable and u/d (up/down) but it did not work and I also tried 470 uf at the power supply and that did not work. There's too much trouble to install 0.1 microfarad capacitor at the powerpins of the ICs. I tried this on a previous board but it did not help. There must be a misunderstanding about surge current and switching with CMOS devices. I think aliens want the circuit to work the way it is working. This indicates that wrong has to be done to the right with my paranoia. The clock controls the truth and that has to be changed. I also think the truth tables control digital electronic circuits undesirably, making them a slave to circuit designs. Mathematics is what controls us like the pyramids in Egypt.
Nevertheless, you are inviting erratic circuit operation if you do not follow my suggestions....just saying.
 

Thread Starter

Arjune

Joined Jan 6, 2018
354
A couple of thing I noticed missing in your circuit:
1. There should be bypass caps (0.1uf) across the supply pins of each IC to prevent noise and keep the supply "stiff".
Additionally, add a 100uf cap across the main supply.
2. The CD4510 input pins that are "switched" (PE, U/D) should be pulled up or down with a resistor, as appropriate, to prevent them from floating and spurious triggering.

This is standard practice for digital design. If you don't do this, erratic operation will surely occur.



You might try installing wine on linux. Then install DSPCB.
I really would like design spark because it has Auto rooting. I need to load the files I saved in the past with design Sparks so I can edit them but I think it will be a problem with Linux. I have Linux mint 21.3 cinnamon. Can someone guide me through the process of installing wine on my Linux computer and whatever else I have to install I like the exe. of design spark and how to do it because I can't think of the basic way. I never really learned how to search for a file in Linux for a certain program. I'm willing to risk installation of design spark on my Linux computer because I really liked it on Windows 8.1. Windows 8.1 is not supported anymore. I really don't like supporting Microsoft because things are so expensive, like technical support.
 

eetech00

Joined Jun 8, 2013
4,704
I really would like design spark because it has Auto rooting. I need to load the files I saved in the past with design Sparks so I can edit them but I think it will be a problem with Linux. I have Linux mint 21.3 cinnamon. Can someone guide me through the process of installing wine on my Linux computer and whatever else I have to install I like the exe. of design spark and how to do it because I can't think of the basic way. I never really learned how to search for a file in Linux for a certain program. I'm willing to risk installation of design spark on my Linux computer because I really liked it on Windows 8.1. Windows 8.1 is not supported anymore. I really don't like supporting Microsoft because things are so expensive, like technical support.
Hi

I'm not a linux user but there are plenty of videos and help on internet:


Perhaps google "install wine on mint21"

@Moderator
Maybe need a new topic for this?
 

danny1204

Joined Dec 26, 2015
5
If you are correct, I gather that I can add a small capacitor somewhere to ground to slow down the switching somewhere so it counts to 59 and not 60. If I am right, what is your response? Where would I put the capacitor?
I suggest that you redesign the circuit with all digital ICs rather than using discrete components. Be aware not to cascade too many gates for decoding a signal line. This will make the final circuit looks complicated and will cause racing hazards.
 

HasBeen

Joined Jul 28, 2023
30
I haven't looked at the circuit, but your statement about changing the R values around the transistor might be an issue. Increasing the resistance will ideed lower the currents, but will also slow the function that the transistor is supposed to perform. If that transistor is in the part of the circuit that effects your outcome, you may need to speed it back up by returning to the original values.
 

dl324

Joined Mar 30, 2015
18,219
The attached circuit worked good in the past, it counted from 00 to 59 minutes and then 00. In the new construction, In reverse it counts properly, from 59 to 00 and then 59 minutes. But I recently made another counter on another same PCB design copy and it counts from 00 to 60 minutes in forward mode instead of 59 minutes.
You're overloading the outputs.
1718382554196.png
Try swapping the counters from your board that works with the board that doesn't. Make sure you mark where they came from so your original board will continue to work.

If you didn't install in sockets (which I seem to recall from your earlier problems), try using different counters.

If you didn't use sockets on the new board, now would be a good time to start.

Another option is to test other CD4510 and select some that will perform better at out-of-spec conditions.
 

Ian0

Joined Aug 7, 2020
13,097
You're overloading the outputs.
View attachment 324654
Try swapping the counters from your board that works with the board that doesn't. Make sure you mark where they came from so your original board will continue to work.

If you didn't install in sockets (which I seem to recall from your earlier problems), try using different counters.

If you didn't use sockets on the new board, now would be a good time to start.

Another option is to test other CD4510 and select some that will perform better at out-of-spec conditions.
That's the minimum output current not the maximum. Output current doesn't get a mention in the "absolute maximum" ratings, so 4000 gates can't actually be overloaded. The only thing mentioned in "absolute maximum" ratings is the power dissipation.
 
Top