Up/Down Johnson Counter

dl324

Joined Mar 30, 2015
16,943
The first entry that I got when I googled Johnson Counter showed one with three flip-flops and no debounce.
It has been established in post #11 that the OP didn't want a Johnson Counter.

He doesn't want any counter because it would require significant glue to implement the bar graph output he wants.

Multiple people have suggested a bidrectional shift register, but the suggestions are being ignored.
 

WBahn

Joined Mar 31, 2012
30,076
The first entry that I got when I googled Johnson Counter showed one with three flip-flops and no debounce.
Post a link to the circuit, if possible. The debounce could be intrinsic in the circuit or, like many example circuits, the debounce isn't shown because the purpose of the circuit is to show the logic involved.
 

AnalogKid

Joined Aug 1, 2013
11,055
It doesn't have the output decoding like a CD4017, but yes, that is the basic form. It requires a power-on reset for stable operation.

ak
 

AtriumXP

Joined Aug 5, 2017
9
The purpose of the counter is to keep track of an in-game mechanic in an RPG game
Hi, I came here looking to do something potentially similar... stumbled onto the thread while searching if anyone posted about it before.

I found this incremental counter on Ali Express:
(link)

Anyhow, I was hoping to use that display to track a player's life total for Magic:the Gathering. The implementation was to install one into each of several table spots... basically, each player has a display and two buttons to tap (+1 life, or -1 life) and the display would track the life total.

It seemed like this display might be easier for you to use, if we could have someone weigh in on exactly how to get it working (how to wire the inputs, how to access it for any necessary programming, etc.).

If I'm mistaken, or if you just prefer to build from scratch, please accept my apologies as I'm not looking to hijack the thread. But if this could help serve your purpose, I'd love to hear what others have to say about it. I'll lurk here a bit and if it turns out this doesn't apply, I'll make a new thread to ask about it. Unfortunately, I'm a complete beginner for all things electronics and circuit-related. :)

Either way, good luck with the project!!
 

eetech00

Joined Jun 8, 2013
3,958
Hi, I came here looking to do something potentially similar... stumbled onto the thread while searching if anyone posted about it before.

I found this incremental counter on Ali Express:
(link)

Anyhow, I was hoping to use that display to track a player's life total for Magic:the Gathering. The implementation was to install one into each of several table spots... basically, each player has a display and two buttons to tap (+1 life, or -1 life) and the display would track the life total.

It seemed like this display might be easier for you to use, if we could have someone weigh in on exactly how to get it working (how to wire the inputs, how to access it for any necessary programming, etc.).

If I'm mistaken, or if you just prefer to build from scratch, please accept my apologies as I'm not looking to hijack the thread. But if this could help serve your purpose, I'd love to hear what others have to say about it. I'll lurk here a bit and if it turns out this doesn't apply, I'll make a new thread to ask about it. Unfortunately, I'm a complete beginner for all things electronics and circuit-related. :)

Either way, good luck with the project!!
Hi

If you want to build your own...An up/dn counter using a CD40192B and 7 segment display(s) should work for this..how many digits?

note: probably should be a new thread...
 

AtriumXP

Joined Aug 5, 2017
9
Sorry if I'm causing confusion...
I'm not looking to build my own version of the counter I posted - I wanted to see if the pre-built counter posed an elegant solution to his project (inexpensive, compact, easy to install).

If it does suit his need, I'd absolutely benefit from others describing how to wire it up (presuming two buttons/toggles... one for incrementing, one for decrementing).

I was planning to monitor the thread to see if that works, and failing that, I am planning to make a new thread for it.
 

solecize

Joined Apr 10, 2018
5
Hello- I would like to do something similar to the OP using discreet LEDs and NOT using a 7-segment display. I’ve looked at Johnson counters (discreet LED position changes eg; 100000 becomes 010000) or if there is something else that would work it could also work like a volume up/down LED indicator- either would work. I’ve also seen decade counters using the 4017 IC which count up, but not down.

I would really like this to be small so an Arduino is out. I could use a PIC micro controller, but would rather use inexpensive components that I could reproduce about 20 units without too much effort. Low voltage/small batteries would also be nice (3.7v).

However the method for making a Johnson counter subtract, or move in reverse escapes me, and anytime I find a counter that is up/down it’s usually for a 7-segment display. For ergonomics and ease of use it would be great to push an up button to incriment and a down button to decrement a single row of LEDs.

Six digits/LEDs would be nice. I’ve seen rotary encoders that do something similar, but I would like the input to be two buttons and not a rotary axis.

I can get more specific, but that generally covers what I’m looking to do.
 

WBahn

Joined Mar 31, 2012
30,076
If you are looking for inexpensive components, why is a PIC not a preferred option?

Have you looked at a bidirectional shift register?
 

solecize

Joined Apr 10, 2018
5
If you are looking for inexpensive components, why is a PIC not a preferred option?

Have you looked at a bidirectional shift register?
The PICs I see are 10xcost of some of the ICs I’m looking at. As I mentioned above I’m making dozens of these, so the cost factor gets a little out of hand.

I’ve looked at bi-directional shift registers but not really sure how the output would work- I’m assuming I need something to drive the LEDs?
 

dl324

Joined Mar 30, 2015
16,943
I would really like this to be small so an Arduino is out. I could use a PIC micro controller, but would rather use inexpensive components that I could reproduce about 20 units without too much effort. Low voltage/small batteries would also be nice (3.7v).
For meaningful suggestions, you need to be more specific.
  1. What does small mean?
  2. What does inexpensive mean?
  3. What LED color(s)?
  4. How bright do you want the LEDs to be? Daylight visibility?
  5. Battery run time?
  6. How much effort is "too much"? Does low reproduction effort imply that you want to make a PC board?
  7. Always dot display, with direction change only at the outside LEDs? Or do you want direction to be alterable at any "count"?
  8. How much are you attached to 6 LEDs? That's an odd number; chips are typically designed for some power of 2 (4 and 8 are common); fewer choices for bi-directional.
Bar display would be easiest to implement with shift registers. Dot display requires extra logic.
 

solecize

Joined Apr 10, 2018
5
Small as in fits in the base of a miniature which is a few mm high (3-6 depending) and about 30mm across (circle)

Green or red LEDs would work

Indoor moderate lighting

The batteries I have are typically coin cells I also have 3.7v lipio at 40 and 100mah I’ve powered a single LED with resistance for several hours- long enough to do what I need. As long as the other components aren’t really drawing much power having one diode lit at a time seems reasonable.

Inexpensive means not 5$ each build for a single component like a pic IF there is something else that works and is available I’m willing to attempt a prototype and production run, but I do not know enough theory to really know what I’m looking for.

Yes a circuit board is something I would be willing to have produced in quantity. Probably no more than 100 assuming I’m capable of prototyping the circuit and getting it all to work on a breadboard first

Alterable at any point (if I’m understanding you correctly) so if I’m at #3 position I can go to either #2 or #4- however if a bar display would be easier then that would probably dictate using a bar display. I’m assuming that a bar display would light the entire set of LEDs up to the current count- like a battery meter or FFT? I may be misunderstanding what you mean by bar vs. dot. I’m assuming discreet LEDs can be wired in a bar arrangement, or do you specifically mean the component bar LED where all the LEDs are built into a single package?

8 LEDs would work
 

solecize

Joined Apr 10, 2018
5
The best I’ve seen is something like this which uses a PIC and a 7 segment LED, but the ergonomics of holding the thing while twisting a knob just aren’t practical.


I know I can fit the stuff I need for a single direction counter in the space, which would also work pretty well, but counting down would be a nice to have.
 

WBahn

Joined Mar 31, 2012
30,076
Inexpensive means not 5$ each build for a single component like a pic IF there is something else that works and is available I’m willing to attempt a prototype and production run, but I do not know enough theory to really know what I’m looking for.
Why do you need to spend $5 for a PIC?

Even Digi-Key, at their inflated prices (inflated for a defensible reason, but inflated none-the-less) sells PICS for well under a dollar in single quantities.

Will something like this meet your needs:

https://www.digikey.com/product-det...IC16F1503T-I-SL/PIC16F1503T-I-SLCT-ND/5169553

It has 11 I/O and will run off 3.7 V.

You can buy 25 of them for under $19.
 

solecize

Joined Apr 10, 2018
5
That could work- most of my experience is with an Arduino, so programming may be tricky. My understanding is that you can program some functionality into a pic using the Arduino IDE, but I’ve never done it. I may have been stuck on using an existing IC with specific function because it’s more or less read the instructions and connect the pins.
 
Top