Random Number Generator
This is a game which you can play with your friends for entertainment or to earn money during fun times. Random number generator based game which uses flip flop circuits using 555 timer I.C, 4033B counter I.C and seven segment display. It is a gambling game having three displays of numbers and in which counter I.C generates number with the clock input to it and the speed of rotation of number display is controlled by timer I.C. At three different displays the numbers are generated at different speeds by controlling the clock signal to the counter I.C. In this game you have to stop the 3 displays at same number which depends upon the luck.
Components required for the game
COMPONENT Value Quantity I.C 555 3 4033B 3 Resistors 1k Ω 3 1 M Ω 3 470 Ω 21 Capacitors 0.01μF 1 0.1μF 2 1 μF 1 Toggle switches 3 LED 1 7- Segment LED (Common Cathode) 3
About individual components:
The 555 I.C used to create accurate delays and oscillation pulses into the circuit. This I.C can be used in different mode in the circuit depending upon the need of the circuit by changing the capacitor and resistor combination with the different pins of the I.C. Some modes are Astable, Bistable, MonoStable. We will discuss only the Astable mode here as in this mode the timer I.C is being used in circuit. (for more detail see 555 timer )
This is eight pin I.C whose pin no.1 is at ground level. Pin no. 2 is trigger pin and its voltage is 1/3 of +VCC which is given to pin no. 8. Output is obtained from pin no.3. Pin no. 6 is threshold pin whose voltage normally is 2/3 of +VCC but in this circuit we short 2 and 6 pin and attached with pin no 7 by a resistance of 1MΩ. Pin no.4 is RESET pin, when RESET goes low, the flip-flop is reset, and the output goes low.
A low-impedance path is provided between discharge (pin no. 7) and ground and the output become low. Here, we are connected pin 4 with pin 8 to give +VCC and Resistance of 1KΩ is connected between VCC and the discharge pin (pin 7) and another resistance (1MΩ) is connected between the discharge pin (pin 7), and the trigger (pin 2) and threshold (pin 6) pins that share a common node.
Hence the capacitor (of micro Farad) is charged through 1KΩ and 1MΩ resistances, and discharged only through 1MΩ, since pin 7 has low impedance to ground during output low intervals of the cycle, therefore discharging the capacitor. In the Astable mode, the frequency of the pulse stream depends on the values of resistances and capacitors. So, it behaves as RC circuit while discharging and gives the frequency and the frequency can be changed by changing either value of resistance or capacitor.
In this circuit we are using this IC as for trigging or giving pulse to the counter. After using this IC as Astable we do not need of any clock for counter circuit, attached to the output (pin 3) of IC. As stated earlier that when the RESET is low output is low and when it is given the high signal then it initiate the pulse hence if we put a switch between RESET and +VCC then as a result, when the switch is OFF then no pulse will be generated by IC and when it is turned ON, pin no. 4 got the signal, the voltage goes through 1K resistance (as there is high impedance b/w pin 7 and ground) so it starts to generate pulse and these pulses are obtained from pin no. 3.
This is 16 pin I.C of counter and decoder for seven segment display in a single package. As for random number generator we need counter which counts from zero to nine and again to zero with the pulses flip flop signal to it along with we have to display the number on seven segment display so it is perfect package for this project. This I.C also found its application in timer/clock circuits.
It counts the number (give the next digit) when the pulse is given to it at it pin 1 (clock pin). A high signal to its RESET pin (pin 15) makes the counter clear and with the next signal to clock, it will start from the beginning. Pin number 6, 7,9,10,11,12,13 are pins to seven segment display input.
Seven segment display:
This is array of seven LEDs connected in pattern to display the digits form 0 to 9 in the circuit. LEDs are labeled as a, b, c, d, e, f, g in pattern as shown in figure. They could be common anode or common cathode display. Common Anode display works with the negative signal to the pins of the display and the anode of all the LEDs are common and have to provide with positive voltage and vice versa in case of common cathode Seven Segment display. In this circuit we need common cathode as the output of the 4033 I.C is positive according to each pin of display.
This is circuit of single random number generator in which numbers are generated at speed of discharging of the capacitor of 555 IC across resistor R1. By changing either the capacitor or the resistor. So in remaining two circuits we are going to change the value of the capacitor to give different speed and this game will be like the first time period is 1 sec,
τ=RC= 1MΩ x 1μF = (1x10^6) x (1x10^-6) = 1 sec
Similarly, second will be at 0.1 sec (1MΩ and 0.1 μF) and third will be 0.01 sec (1MΩ and 0.01μF).