A classic digital dice circuit using 555 timer and 7-segment display, showing random numbers 1-6
This is an electronic dice circuit that generates random numbers from 1 to 6, displayed on a 7-segment display. When you press the button, the 555 timer oscillates at high frequency through a counter, creating a pseudo-random number generator. Releasing the button stops the counter and displays the result.
Perfect for learning digital electronics, logic circuits, and PCB design fundamentals!
- True random generation using 555 timer high-frequency oscillator
- Single 7-segment display shows numbers 1-6
- Push-button operation - press to roll, release to stop
- Power indicator LED
- Regulated 5V power supply with LM7805
- Classic TTL logic using 74LS series ICs
- Barrel jack input for easy powering (7-12V DC)
| Parameter | Value |
|---|---|
| Input Voltage | 7-12V DC |
| Regulated Output | 5V (LM7805) |
| Display Type | Single 7-segment common cathode |
| Logic Family | 74LS TTL series |
| Power Consumption | ~50-100mA |
| Board Dimensions | TBD mm |
| PCB Layers | 2-layer |
The circuit consists of 4 main sections:
- LM7805 voltage regulator converts 7-12V input to stable 5V
- Filtering capacitors for stable operation
- Barrel jack connector for power input
- NE555 configured as astable multivibrator
- High-frequency oscillation (~100kHz)
- R-C network sets timing (R10=100k, C4=0.01µF)
- Decade counter generates BCD outputs (0-9)
- Gates (74LS11) configure it to count 1-6 only
- Counts rapidly when button is pressed
- Stops at random number when button released
- 74LS47 BCD-to-7-segment decoder
- Drives SC39-11EWA common cathode display
- Current limiting resistors for LED segments
- Design Tool: KiCad 9.0.2
- Layers: 2-layer FR4
- Standard thickness: 1.6mm recommended
- Through-hole components for easy hand assembly
- IC sockets recommended for 74LS and 555 ICs
See docs/digital_dice.pdf for the complete schematic.
- Bottom left: Power supply (barrel jack, LM7805, capacitors)
- Center: Logic ICs (555, 74LS90, 74LS47, 74LS11)
- Top right: Push buttons and LED indicator
- Right side: 7-segment display
├── README.md # This file
├── LICENSE # MIT License
├── .gitignore
├── digital_dice.kicad_pro # KiCad project file
├── digital_dice.kicad_sch # Schematic
├── digital_dice.kicad_pcb # PCB layout
├── gerbers/ # Manufacturing files
│ ├── *.gbr # Gerber layers
│ ├── *.drl # Drill files
│ └── *.pos # Pick and place
├── docs/
│ ├── digital_dice.pdf # Schematic PDF
│ └── BOM.csv # Bill of Materials
└── images/ # Project images
├── board-3d.png
├── assembled.jpg
└── demo.gif
- U1: NE555D - Timer IC (DIP-8)
- U2: 74LS90 - Decade Counter (DIP-14)
- U3: 74LS47 - BCD to 7-Segment Decoder (DIP-16)
- U4: SC39-11EWA - 7-Segment Display, Common Cathode
- U5: LM7805 - 5V Voltage Regulator (TO-220)
- U6: 74LS11 - Triple 3-input AND Gate (DIP-14)
- R1, R2: 10kΩ resistor (×2)
- R5: 220Ω resistor (for LED)
- R10: 100kΩ resistor
- C3: 0.1µF ceramic capacitor
- C4: 0.01µF ceramic capacitor
- C5: 0.33µF electrolytic capacitor
- D1: Red LED 5mm
- SW1, SW2: Tactile push buttons
- J1: DC Barrel Jack (2.1mm)
- IC Sockets: DIP-8, DIP-14, DIP-16 (recommended)
Total component cost: ~$5-10 USD
- Solder IC sockets first (recommended for easy troubleshooting)
- Add resistors and small capacitors
- Install electrolytic capacitor (watch polarity!)
- Mount voltage regulator (LM7805) with heatsink if needed
- Add barrel jack and switches
- Install LED (long leg = anode, positive)
- Mount 7-segment display last (verify pinout!)
- Insert ICs into sockets (mind pin 1 orientation!)
- Double-check IC orientation before powering on
- Verify 5V output from regulator before inserting logic ICs
- Use IC sockets to prevent damage during soldering
- Power: Connect 7-12V DC adapter to barrel jack (center positive)
- Check: Power LED should light up
- Roll the dice: Press and hold the button
- Get result: Release button to see random number (1-6)
- ✅ Digital logic design - counters, decoders, gates
- ✅ Classic timer circuits - 555 astable configuration
- ✅ Power supply design - voltage regulation, filtering
- ✅ PCB layout - through-hole component placement
- ✅ Schematic capture - proper labeling and organization
- ✅ BCD and 7-segment display interfacing
- ✅ Documentation - clear schematics and assembly guide
This project teaches fundamental concepts:
- 555 timer oscillator circuits
- Binary/BCD counting
- 7-segment display multiplexing
- TTL logic families
- PCB design workflow
Great for beginners in electronics and PCB design!
- Add second 7-segment display for "double dice"
- Include piezo buzzer for sound effects
- Add "hold" function to freeze display
- SMD version for compact size
- Battery power option (9V battery clip)
- Automatic roll mode with timer
This project is open source hardware licensed under the MIT License.
Feel free to:
- Build your own
- Modify the design
- Learn from the schematics
- Use in educational projects
Attribution appreciated but not required!
Vladyslav Hirchuk
GitHub: @SoloScriptSage
Built with KiCad 9.0.2 | Rev 1.0 | November 2025
If you build this project, I'd love to see it! Feel free to open an issue with photos of your build.
