Counter circuit from 0-9 then 9-0

Thread Starter

franzolivar

Joined Aug 3, 2024
8
Hello, I have been busy with school and personal life, so I hardly had anytime for the project. But recently, things slowed down and I actually had the opportunity to work with this again. I tried all of your suggestions and this is the result I arrived upon.
I quickly ditched the idea of designing the circuit from scratch, since I found out that it is very time consuming, as I do not have the time right now. Perhaps some other time, when I have more leeway with my responsibilities. Though I have designed the decoder quite easily, since it requires little effort and knowledge. I have trouble with designing the other components on a gate level, since I am lacking in the fundamentals, such as k-mapping. Please let me know of any insights you guys might have, as feedback is important for learning.


schematic .png


P.S. Please let me know if I can further simplify this circuit, or if there are conventions that I have not followed.

Cheers!
 

Ian0

Joined Aug 7, 2020
13,158
You could use a 4017, followed by a 74HC74, which toggles on the last output.
Then a pair of quad 2:1 multiplexers that swap output 1 with output 8, output 2 with output 7, output 3 with output 6 and output 5 with output 4 depending on the state of the 74HC74 output.
 

Thread Starter

franzolivar

Joined Aug 3, 2024
8
You could use a 4017, followed by a 74HC74, which toggles on the last output.
Then a pair of quad 2:1 multiplexers that swap output 1 with output 8, output 2 with output 7, output 3 with output 6 and output 5 with output 4 depending on the state of the 74HC74 output.
I am a bit confused. In what aspect will your suggestion improve the circuit? Will this be simpler than what I implemented? I don't quite follow your thought process on this, especially on the pair of multiplexers....
 

MisterBill2

Joined Jan 23, 2018
27,683
It can be done with two CD4017's and ten OR gates to be driven by the ten outputs from each counter. the other two OR gates will be needed to inhibit the signal from the zero count output of the other counter.
And if the older type "super bright LEDs are used they can be driven directly from the CMOS gate outputs if the logic can be run on 12 volts. They might even be bright enough if 5 volt power is used.
 

dl324

Joined Mar 30, 2015
18,379
had the opportunity to work with this again
Why don't you start by trying to describe what you're trying to do. It certainly isn't an up/down counter.

The schematic you posted is too difficult to read. The colors are terrible and you've gone too far with connect-by-name. It would probably be easier to read a netlist.

1726236982179.png
From the above, I can see that you have a floating input on the 4510 and aren't using a current limiting for the LEDs.

The JK FF symbol is dumb. You don't use ~Q1 *and* a bubble together.
 

MisterBill2

Joined Jan 23, 2018
27,683
Why don't you start by trying to describe what you're trying to do. It certainly isn't an up/down counter.

The schematic you posted is too difficult to read. The colors are terrible and you've gone too far with connect-by-name. It would probably be easier to read a netlist.

View attachment 331552
From the above, I can see that you have a floating input on the 4510 and aren't using a current limiting for the LEDs.

The JK FF symbol is dumb. You don't use ~Q1 *and* a bubble together.
Certainly the JK FF symbol is totally not the way it is normally done, with set on top or to the left, with all the other INPUTS on the left, and the outputs to the right, and reset on the bottom.
But driving LEDs directly from 5 volt CMOS is what I have found worked quite well. But a resistor would be required if a higher supply voltage is used.
 

Thread Starter

franzolivar

Joined Aug 3, 2024
8
Why don't you start by trying to describe what you're trying to do. It certainly isn't an up/down counter.
Yes it isn't. What I am trying to do is an LED chaser type circuit going back and forth using counter ICs and a decoder. I tried to design it on a gate level at first and found it too difficult, that is why I transitioned to using readily available ICs.

The schematic you posted is too difficult to read. The colors are terrible and you've gone too far with connect-by-name. It would probably be easier to read a netlist.

The JK FF symbol is dumb. You don't use ~Q1 *and* a bubble together.
I apologize. I just printed this out of NI Multisim and I have no idea how to make a schematic up to standard, I don't even know the standard for schematics. Also, the JK FF symbol is just the way it is on the software, and I can't change it. Also, I have no idea what a netlist is, but I have read the term and I am familiar with it.

From the above, I can see that you have a floating input on the 4510 and aren't using a current limiting for the LEDs.
What exactly do I do with the floating input? Do I need some type of pull up or pull down network for them and is it necessary? I am a bit confused...

And yes I am not using current limiting LEDs. I am just trying to show that the outputs of the decoder will be used to light up an LED from Q0 to Q9. I just looked at the datasheet and found out that the output current of the CD4514 decoder is around .88 mA at 5V, meaning I have to drive these LEDs using BJTs or something
 

dl324

Joined Mar 30, 2015
18,379
What I am trying to do is an LED chaser type circuit going back and forth using counter ICs and a decoder. I tried to design it on a gate level at first and found it too difficult, that is why I transitioned to using readily available ICs.
@q12x has a Knight Rider thread that might give you some ideas. I posted circuits with 16 and 32 LED versions.
I just printed this out of NI Multisim and I have no idea how to make a schematic up to standard, I don't even know the standard for schematics.
Schematic symbols are more useful if the inputs are primarily on the left and outputs are primarily on the right. This facilitates the preferred left-to-right and top-to-bottom flow. Oldtimers like me prefer monochromatic schematics with a light background and good contrast. We also prefer components to be drawn upright unless it makes more sense to use some other orientation.

Avoid unnecessary whitespace/wire jogs/wire crossings. Point ground down, power up. Don't draw wires over text or symbols.

This what Texas Instruments used in their 1976 databook:
1726586824438.png
the JK FF symbol is just the way it is on the software, and I can't change it.
I use an old version of Eagle and a number of its symbols are dumb. I sometimes use them, but if it makes the schematic unreadable, I make my own variant.

Here's the default *123 one shot and my version:
1726585773584.png
Anyone who has used this device knows you need to connect a resistor to the power supply and a capacitor between 2 of the terminals. The original symbol didn't make it possible to do that in what I think is the typical way. I thought about a better placement for clear, but decided to leave that in the original place.

The only thing worse than a symbol like this is one that uses pin order (LTspice didn't include pin numbers):
1726586242379.png
From this thread.
This is an ugly schematic for so many reasons... At least he turned off the useless grid.
I have no idea what a netlist is, but I have read the term and I am familiar with it.
Here's an excerpt from an LTspice netlist:
Code:
WIRE 176 -112 32 -112
WIRE 336 -112 176 -112
WIRE 496 -112 336 -112
WIRE 640 -112 496 -112
...
SYMBOL nmos 224 128 M0
WINDOW 3 58 54 Left 2
SYMATTR Value IRLZ44
SYMATTR InstName M1
A thoughtfully laid out schematic is much easier to read.
What exactly do I do with the floating input? Do I need some type of pull up or pull down network for them and is it necessary?
All inputs should be connected to something. Since reset is HIGH active on CD4510, you should have a pull down resistor (unless it's connected to an ouput from some other device).
And yes I am not using current limiting LEDs. I am just trying to show that the outputs of the decoder will be used to light up an LED from Q0 to Q9. I just looked at the datasheet and found out that the output current of the CD4514 decoder is around .88 mA at 5V, meaning I have to drive these LEDs using BJTs or something
You can make it look like you know what you're doing if you add them. Someone who omits them gets put in the "doesn't know what he's doing" category.
 
Last edited:

dl324

Joined Mar 30, 2015
18,379
Redraw of your schematic with unconnected inputs circled in red.
1726590599420.png
Since you're designing a back-and-forth display, I took the liberty of reversing the order of the LEDs to avoid a bunch of wire crossings that would have made the schematic more difficult to read. I mirrored IC4B because it's "feedback" from the decoder.

Note that I redrew the timer symbol. Eagle used something about as dumb as what Multisim is using, but not as dumb as the LTspice symbol.
1726591347818.png
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,683
A very simple back and forth chaser would be using anLM2914 dot-graph IC and a simple triangle wave oscillator, which can be done with a set/reset flip-flop (CD4013), two capacitors , and two resistors.
 
Top