Help change 6-sided dice circuit to 20-sided

Click For Summary
SUMMARY

This discussion focuses on modifying an existing 6-sided electronic dice circuit to function as a 20-sided dice. The original circuit utilizes a 4017 Johnson counter, which counts from 0 to 9 and resets. Two primary methods for achieving the 20-sided functionality are proposed: chaining a second 4017 counter to count tens, or using shift registers that allow for a continuous count without looping back. Both methods present unique challenges, particularly in timing and output manipulation.

PREREQUISITES
  • Understanding of 4017 Johnson counter functionality
  • Familiarity with shift registers and their operation
  • Basic knowledge of electronic circuit design
  • Experience programming microcontrollers, particularly PIC microcontrollers
NEXT STEPS
  • Research how to chain multiple 4017 counters for extended counting
  • Learn about shift register configurations and their applications in digital circuits
  • Explore programming techniques for generating random numbers using PIC microcontrollers
  • Investigate oscillator design for optimal performance in electronic circuits
USEFUL FOR

Electronics enthusiasts, hobbyists modifying dice circuits, and engineers interested in digital circuit design and microcontroller programming.

Engineering news on Phys.org
mishima said:
I'm looking for input as to how I could modify this:

http://www.electronicdesignworks.com/circuits/electronic_dice/electronic_dice.htm

so that it does a 20-sided dice instead of a 6. Thanks.

Do you understand how the 4017 is being used as a random number generator?

Do you have experience programming microcontrollers? Using a PIC might be the easiest way to generate 20-bit random numbers...
 
Well I guess 20 bits will not be necessary... The circuit consists of two parts an oscillator producing 0 and 1 (high and low voltage) really fast, and a Johnson counter that is running in circles by this oscillation, and it stops when you release the button. The Johnson counter would normally run from 0 to 9, but it is folded back onto itself so it resets to 0 when reaching 6. I hope you understand the circuit this far. The problem is, that going above 9 is not straight forward as the counter will restart at 0. The two ways to get to 20 easily that I see:

1) I think the counter is made for chaining. So you can connect a second counter to the carry output that counts tens. You would connect the third output of the counter for tens to both reset inputs and reset the counter once it reaches 20. The die would then count from 0 to 19. Another disadvantage of this setup is that the diode for tens turns on and off slower then the one for ones and depending on the oscillator speed it might be too slow and you might be able to manipulate the output by good timing.

2) the second way to do it are shift registers. They are very similar to Johnson counters, but they don't loop back. If you put one bit in at the first input it moves on every cycle and you can loop it back from the last chip to the first so it runs in a circle. The most tricky part is getting the first bit in. If you are lazy you can just say that the rolled number is the number of LEDs that are on. Put the input of the first shift register on high and let the 20th output reset the shift registers.
 

Similar threads

  • · Replies 53 ·
2
Replies
53
Views
10K
Replies
12
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K