يحاول ذهب - حر

TOUCH TO ROLL: A Decoder-Based Dice

April 2025

|

Electronics For You

Electronic dice, or e-dice, are widely used today, but creating a design replicating the anticipation and randomness of a physical dice roll comes with its challenges.

- DR GEETALI SAHA AND PRIYANSHU PATEL

TOUCH TO ROLL: A Decoder-Based Dice

This device achieves that effect by generating a rolling motion that lasts approximately four seconds, though the duration can be adjusted by modifying the rolling steps.

A 3-to-8 decoder (IC 74LS138) displays a valid dice face, with combinational AOI logic (AND, OR, and INVERT gates) ensuring only valid outputs. Seven individual LEDs, arranged to represent numbers 1 through 6, replicate the appearance of a traditional dice. The ESP32 microcontroller brings the design to life, handling random number selection and creating a realistic rolling effect, making this an excellent case study in digital circuit design.

Fig. 1 shows the prototype with the rolling clock, while Fig. 2 presents a block diagram of the system. Table 1 lists the components required to build this device.

imageThe main components of this device are the ESP32 board and the ICs 74LS138, 74LS260, 74LS04, and CD4075. The truth table for the decoder IC 74LS138 is provided in Table 2.

The ESP32 board is the core of the device. It is used for the following tasks:

Detecting the closure of the path that activates the dice roll.

Introducing a rolling step of a few seconds (four seconds in this case).

Generating a 3-bit random number.

المزيد من القصص من Electronics For You

Electronics For You

Electronics For You

Smart Air Quality MONITORING SYSTEM

Air pollution is a critical concern in modern living environments, particularly in enclosed spaces such as homes, offices, factories, and laboratories, where prolonged exposure to harmful gases presents serious health risks. Continuous air quality monitoring is therefore essential to maintain safe and healthy indoor conditions. Here we detail the design and implementation of a compact, low-cost, smart air-quality monitoring system based on the Arduino Nano platform.

time to read

3 mins

February 2026

Electronics For You

Electronics For You

"We Are Strengthening Supply Chains, Automation, And Talent To Drive Scalable, Sustainable Manufacturing Growth"

In an interaction with EFY’s Nitisha Dubey, Jayaramu N, from Aimtron Electronics shares insights into key government initiatives, sector challenges, and the company’s strategic growth and expansion plans.

time to read

2 mins

February 2026

Electronics For You

Electronics For You

"We Are Growing At 30-40% Annually And Plan To Go For An IPO By 2027"

Is managing diverse customers easy in the EMS sector? In a conversation with EFY's Nitisha Dubey, Ashvin Navadia of Vinrox Technologies discusses how EMS companies address customer complexity and high-mix, variable-volume production.

time to read

2 mins

February 2026

Electronics For You

Electronics For You

Low-Cost 40A, 1200V SOLID-STATE RELAY And VOLTAGE CONTROLLER

Relays are essential components in electronic systems and are widely used in IoT and AC-powered applications to control loads using sensor outputs or low-voltage DC signals. Conventional electromechanical relays rely on a mechanical plunger that physically connects or disconnects AC contacts to perform switching.

time to read

5 mins

February 2026

Electronics For You

Electronics For You

"Investment In Talent And Automation Is Central To Building Scalable Manufacturing"

Is the Gujarat government supporting the growth of the electronics industry? How does Mefron manage skilled manpower and talent challenges? In an interaction with EFY's Nitisha, Hiren Bhandari of Mefron Technologies India Pvt Ltd discusses government support for the electronics sector and Mefron's approach to skilled manpower challenges.

time to read

2 mins

February 2026

Electronics For You

Electronics For You

IndusAlexa And Google Assistant-Enabled IoT CONTROLLER

AI smart speakers and AI-enabled home automation devices are widely adopted and continue to see strong demand. However, achieving seamless integration with a high level of customisation remains challenging, particularly when adding sensors, lights, switches, relay actuators, fans, and bulbs to meet specific requirements.

time to read

6 mins

February 2026

Electronics For You

Electronics For You

DIGITAL GAUGE And SUPER ELEVATION MEASURING System For Railway Tracks

Railway track laying, construction, and maintenance demand precise measurement of the gauge between two parallel tracks and superelevation, that is, the height difference between rails.

time to read

5 mins

February 2026

Electronics For You

Electronics For You

Musical TEMPERATURE ALARM

Monitoring temperature is essential across many applications, from protecting sensitive electronic equipment to maintaining comfortable room conditions. Conventional temperature alarms typically use buzzers or LEDs, providing only visual, monophonic alerts. Here we present a musical temperature alarm that generates a pleasant melody, rather than a simple beep, when a preset temperature threshold is exceeded.

time to read

3 mins

February 2026

Electronics For You

Electronics For You

THE WIDE SCOPE OF AI: Everything Everywhere!

What exactly should AI do for a business? Where does it stop? How do we define the scope? This lack of definition is the problem.

time to read

5 mins

February 2026

Electronics For You

Electronics For You

OVERCURRENT/IDMT RELAY Using Arduino Nano And ACS712 Current Sensor

Overcurrent relays with inverse definite minimum time (IDMT) characteristics are widely used in power systems to protect electrical feeders and loads from overheating under abnormal operating conditions.

time to read

4 mins

February 2026

Listen

Translate

Share

-
+

Change font size