Tutorial 19: Arduino Dice




In this tutorial you will build a dice that is shaken by holding the button in and thrown by releasing the button. The shake, throw and number thrown are animated and displayed on a seven segment display.

A 74HC595 IC is used to interface the 7-segment display to the Arduino, using only 3 Arduino digital pins.Tutorial 19 Arduino Dice




Prerequisites

Know how to use a DIP IC, e.g. from tutorial 17 – Electronic Dice. Read about seven segment displays.

Components

QtyPartDesignatorNotesType
110k resistor (brown – black – orange)R91/4W 5% or betterResistors
8470 Ω resistors (yellow – violet – brown)R1 to R8
1100n capacitorC1Non-polorized capacitorCapacitor
174HC595U174HC595 IC (16 pin DIP)Semiconductors
1Common cathode 7-segment displayS1Common cathode 7-segment display, e.g. DMR14C from SunLED, or similar
1Push button switchSW1Can also use a wire link to simulate a switchSwitch

Circuit Diagram

The circuit diagram is shown below. The seven segment display could have been directly interfaced to the Arduino, but by using the 74HC595, only 3 Arduino pins are used.

Find more information about interfacing the 74HC595 IC to the Arduino in the Serial to Parallel Shifting-Out with a 74HC595 article from the Arduino website. The circuit diagram uses the same Arduino pins as this article and the switch is wired the same as the Arduino Button example.Tutorial 19 Arduino Dice SchematicThe suggested sequence for building the circuit is:

  1. Insert the 74HC595 IC into the breadboard and hook up its power and ground pins to the top and bottom breadboard rails.
  2. Insert and wire up capacitor C1 (100n).
  3. Insert the 7-segment display.
  4. Insert the 470 ohm resistors.
  5. Wire the resistors to the 7-segment display.
  6. Wire the resistors to the 74HC595 IC.
  7. Wire pin 10 of the IC to 5V.
  8. Wire pin 13 of the IC to GND.
  9. Connect the push button switch and R9.
  10. Wire the switch to the Arduino.
  11. Wire the 74HC595 to the Arduino

 

For more dtail: Tutorial 19: Arduino Dice




Clip to Evernote

Leave a Comment

(Spamcheck Enabled)

Read previous post:
Thermostats Finder ensure a thermal comfort to your devices
Thermostats Finder ensure a thermal comfort to your devices

Thermal comfort is, when a temperature in a house is 21-24 °C and a relative humidity is .... No, sorry,...

Close
Scroll to top