• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » Digital Dice Circuit using Arduino Uno

Digital Dice Circuit using Arduino Uno

Last updated on 4 November 2025 by Admin-Lavi Leave a Comment

Want to roll dice without touching it?

Make Digital Dice using Arduino Uno and with a LCD screen.

Press the button to get random number 1 to 6.

It works like real dice but uses electronics.

This is a simple and easy circuit.

Its a fun project for beginners.

Arduino Coding:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);
int buttonPin = 2;
int buttonState = 0;

void setup() {
  lcd.init();
  lcd.backlight();
  pinMode(buttonPin, INPUT);
  lcd.setCursor(0,0);
  lcd.print("Electronic Dice");
  delay(2000);
  lcd.clear();
}

void loop() {
  buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {
    int number = random(1,7);
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("You Rolled:");
    lcd.setCursor(6,1);
    lcd.print(number);
    delay(1000);
  }
}

Circuit Working:

Digital Dice Circuit Diagram using Arduino Uno

Parts List:

Component NameQuantity
Resistor 10k 1/4 watt1
Arduino UNO1
16×2 LCD Display1
LCM 1602 IIC Module1
Push Button Switch (SPST)1

Through the above circuit diagram.

When button is not pressed then pin 2 is LOW.

This happens because of 10k resistor.

LCD shows nothing or last number.

When button is pressed then 5V goes to pin 2.

Arduino reads HIGH signal.

Arduino makes random number from 1 to 6.

LCD shows that number as dice result.

When button is released then it waits for next press.

Formulas with Calculation:

Below is the basic formula for Digital Dice Circuit using Arduino Uno.

Pull-down resistor keeps pin low when button not pressed.

Formula is: R = (Vcc – Vinput) / I

here,

  • Vcc is 5V
  • Vinput is 0V
  • I is 0.5mA (safe limit)

So R = (5 – 0) / 0.0005 = 10k (approx).

This value matches the 10k resistor used in circuit.

How to Build:

To build a Digital Dice Circuit using Arduino Uno follow the below steps for connection:

  • Gather all the parts as shown in circuit diagram.
  • Button one side connect to 5V
  • Button other side connect to pin 2
  • 10k resistor connect between pin 2 and GND.
  • LCD I2C Module VCC pin connect to 5V
  • LCD I2C Module GND pin connect to GND
  • LCD I2C Module SDA pin connect to A4
  • LCD I2C Module SCL pin connect to A5

Conclusion:

This Digital Dice Circuit using Arduino Uno is easy to make.

It works like electronic dice.

We learn how button works.

We can see how LCD shows number.

Arduino makes random number.

Its good for beginners which helps to practice coding and circuit.

We can add sound or LED for more fun.

References:

Arduino Digital Dice

Filed Under: Arduino Projects, Indicator Circuits

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « Smooth Servo Rotation Circuit with Arduino and Potentiometer
Next Post: Obstacle Detection Circuit with 555 Timer and Ultrasonic Sensor »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar




Categories

  • Alarm Circuits (35)
  • Amplifier Circuits (67)
  • Arduino Projects (66)
  • Audio Circuits (101)
  • Automobile Circuits (19)
  • Battery Charger Circuits (54)
  • Free Energy (13)
  • Heater and Temperature Controllers (11)
  • High Voltage (1)
  • Indicator Circuits (44)
  • Inverter Circuits (16)
  • LDR Circuits (24)
  • LED and Lamps (131)
  • Meters and Testers (30)
  • Motor Controllers (19)
  • Oscillator Circuits (35)
  • Power Supply Circuits (94)
  • Remote Control Circuits (8)
  • Security and Protection (26)
  • Sensors and Detectors (100)
  • Solar Circuits (23)
  • Timer Circuits (33)
  • Transistor Circuits (68)
  • Transmitter Circuit (15)
  • Tutorials (8)
  • Water Level Controller (4)

Recent Posts

  • IR Transmitter and Receiver Circuit using 555 and 4017 IC
  • Automatic Street Light Circuit using Arduino
  • Smart Street Light Control Circuit
  • Obstacle Detection Circuit with 555 Timer and Ultrasonic Sensor
  • Digital Dice Circuit using Arduino Uno

Recent Comments

  1. Henrik Arboe Jensen on Adjustable Voltage, Current Power Supply Circuit using Transistor 2N3055
  2. Admin-Lavi on FM Transmitter Circuit (100 meters range)
  3. DEVINDER SINGH on FM Transmitter Circuit (100 meters range)
  4. Admin-Lavi on Constant Voltage, Constant Current Battery Charger Circuit
  5. Bill on Constant Voltage, Constant Current Battery Charger Circuit

Copyright © 2025 | New Circuit Ideas