LED GURUcosycom.com
PAGE 145 OF 150 · PROJECTS

Build a Dice with LEDs

Seven LEDs show the faces of a die.

LED SYMBOLTriangle points from anode to cathode; the arrows show light leaving the part.

The face layout

Seven LEDs are arranged like a die face: four corners, two middle sides and a centre. Wire them in four groups to need only four outputs.

  • Group A: one pair of opposite corners.
  • Group B: the other pair of corners.
  • Group C: the two middle-side LEDs.
  • Group D: the centre LED.

Faces

  • 1: D
  • 2: A
  • 3: A and D
  • 4: A and B
  • 5: A, B and D
  • 6: A, B and C

Give every LED its own resistor. Choose a random number from 1 to 6 when the button is pressed, using the press timing or an unconnected analogue pin to seed it, and flash random faces before settling on the answer.

REMEMBER
Four groups light all seven LEDs for every face.

Try it yourself

Sketch the circuit on paper first, calculate the values, then build it on a solderless breadboard using a low-voltage supply. Measure with a multimeter before you make anything permanent.

Explore LED clocks, stopwatches and electronics at cosycom.com.

Watch: COSYCOM channel videos

www.youtube.com/@cosycom