Monday, June 27, 2011

Digital Dice


The digital dice presented here acts just like a normal dice. It has six faces (refer Fig. 2) like the normal dice and uses four different logic gate combinations to bring out the six faces of the dice. At the heart of the circuit is a 14- stage ripple-carry binary counter IC CD4060BC (IC1) with built-in oscillator. The logic section is designed around CMOS quad 2-input NOR gate IC CD4001BC (IC2) and quad 2-input NAND gate IC CD4011BC (IC3). The display section is formed by a group of seven LEDs. 
click to enlarge

The circuit is divided into three sections: counter, logic and display. The counter section is built around binary counter IC CD4060BC (IC1). The counter frequency (f) is decided by the in-built oscillator formed by resistor R1 and capacitor C1 as follows: f=1/2.2R1C1. Here, the frequency is fixed at around 2056 Hz. Only the first three outputs of the counter (designated as A, B and C, respectively) have been used in the circuit.
 The counter is designed to reset at the sixth count (110) as only six counts are required for operation. This is done with the help of diodes D1 and D2 and resistor R3, which are connected such that they generate an AND logic. From the table it can be noticed that at the sixth count, the counter outputs A and B hold logic 1 simultaneously for the first time,so by ANDing A and B outputs you can give logic 1 to the reset terminal of the counter at the sixth count, thereby resetting the counter.
 LED2 and LED5 always glow at the same count, as do LED1 and LED6, and LED3 and LED4. Using these three pairs of LEDs and LED7, four logical combinations have been made in the circuit. LED1 and LED6 glow at all counts, except ‘0’ and ‘1.’ Further, it can be noticed that they glow when ‘A’ or ‘B’ is high, hence a NOR gate whose output is A+B according to Boolean algebra will perform the job of operating these LEDs.
 LED3 and LED4 glow at all counts, except for the first three counts, i.e., they glow when either A, or B and C are high. This logic function can be obtained by using an OR gate and an AND gate, but since we are using only NAND and NOR gates in the circuit we make use of two NAND gates and a NOR gate (with A+BC output) to perform this function. LED2 and LED5 glow only at the first and fifth counts. In other words, they glow only when the complement of B and C outputs goes high. This function can be obtained by using two NAND gates such that their output corresponds to the Boolean expression BC or B+C according to De Morgan’s theorem.
  LED7 glows at even counts like 0, 2 and 4. In other words, it glows when the C output is low. This function can be achieved easily by inverting the C output twice using the remaining two NAND gates. The output will also be buffered by these two inverter gates.
 The display section comprises seven LEDs. LED1 and LED6 have common cathodes, as do LED2 and LED5, and LED3 and LED4. The anodes of all the LEDs are tied together to the positive terminal of the battery via resistors R4 through R10, respectively.
 When you place your finger on the touch pad, the oscillator starts oscillating. The counter will start counting at the rate of 2056 Hz and all the LEDs of the display section will appear to glow simultaneously due to the high counter frequency. This high-frequency counting will make the dice foolproof. When you remove your finger from the touch pad, the counter will stop counting and the display section will show any one of the six possible faces with a probability of 1/6. The entire circuit can be powered by a 9V battery as the inbuilt oscillator of the counter IC will not work properly below 7V. Use of CMOS ICs means less power consumption.
 The circuit can be constructed on a general-purpose PCB and housed inside a plastic case with the LEDs arraymounted on the top as shown in Fig. 2. The touch pad can be mounted beside the array.

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More