Mastermind With an 8x8 RGB LED Matrix

588

8

2

Published

Introduction: Mastermind With an 8x8 RGB LED Matrix

Required parts: Basys3 FPGA

8x8 RGB LED Matrix by GEEETECH

9V battery

2N3904 transistors (x32)

1K resistor (x32)

100 Ohm resistor (x1)

50 Ohm resistor (x1)

The LED Matrix is a common anode matrix with 32 total pins. The common anode means that each row is controlled by just 1 pin while each column is controlled by 3 - one for each color. The controlling for this will be done with the 32 PMOD I/O ports on each end of the board.

Step 1: Step 1: Connecting the Transistors

Connect the 32 1K resistors to the center pin of the transistors. This is the "Base" pin of the transistors and will receive the signal from the basys board.

Step 2: Step 2: Connecting to the Board

Connect the outputs of the board to the other end of the resistor as shown. JXADC => Red, JA =>Green, JB => Blue, JC => Row/Power. This is how the board controls which row/column/color is turned on. Each pin turns on or off the corresponding transistor allowing current to flow from power or to ground from that particular transistor.

Step 3: Step 3: Connecting to the Matrix

This is where the 8 anode side transistors and 24 cathode side transistors begin to differ.

While facing the flat side of the transistor the pin order is emitter, base, collector. The 24 cathodes of the matrix must be connected to the collector pin of 24 transistors and the 8 anodes need to be connected to the emitter pin of the other 8 transistors.

I recommend color coding each of the wires going to the matrix itself to make it easier to debug. This particular matrix has 16 pins at the "top" ( the side I designated as top was the side with the lettering on it) and 16 pins at the "bottom". At the top the 8 pins follow this order (left to right) : Blue7:0 Read7:0

bottom : Row7:4 Green7:0 Row3:0

My color code - Blue: blue and purple

Red : red and orange

Green : green and yellow

Row : black,white,brown, and grey

Step 4: Step 4: Power and Ground

I'll start with grounding the cathode side transistors. Each emitter pin on these will be connected to the battery's ground but the 8 red grounds need to have an extra 50 Ohm resistor between them and the battery's ground.

I connected these grounds to the rows along the outside of the bread board because it was convenient (if you choose to use a bread board)

The power however must be connected to the collector pin of the 8 transistors. An 100 ohm resistor must be placed between the power and the transistor because of the LEDs.

Step 5: Step 5: Programming the Board

Here are all of the VHDL files you'll need to program it! Good luck!

Just make sure that MAIN.vhd is the top module

Special thanks to Bryan Mealy for the clock divider and the finite state machine template.

Share

    Recommendations

    • Woodworking Contest

      Woodworking Contest
    • Clocks Contest

      Clocks Contest
    • Planter Challenge

      Planter Challenge
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    2 Comments

    Mastermind is an amazingly strategic game, using both standard logic and reverse logic. Interesting setup in your project. Thumbs up!