Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Boardgame - Control 2D LED Matrix

masterspin11

New Member
I am attempting to create a board game in which a micro-controller turns LEDs on and off in a 8x8 matrix.

Note: I am a complete newbie attempting to learn EE. Please be kind and verbose. Also, be aware that the parts and values used in the schematic below are just place holders for now. Once I understand how to get the circuit to work, I will find out the correct parts and values to use (If this is the wrong way to do it, tell me).

Please refer to the schematic I have below.

Description:
The far left box is some micro-controller. The two middle boxes are 8-bit SiPo Shift Registers. The top shift register controls which columns should be lit. The bottom shift register controls which rows should be lit. The top shift register will only have one output pin as high at a time. The micro-controller will iterate over each column one at a time while communicating to the bottom shift register of which row in that column should be lit.

I utilize 8 NPN transistors to open or close certain rows in a column of LEDs.

Could you please let me know if I am doing anything wrong, any better solutions or tips. This is my first project.

**broken link removed**
 
I can see 3 issues.
1. You have not tied the Reset inputs of the SRs to either 0 Volt or + 5 Volt. The choice between these depend upon whether the SR reset is Active High or Active Low. Check the data sheet.

2. The LED current seems a bit high. I estimated that it will be about 13.5 mA. Normally about 7 mA is sufficient. So change the collector resistors to either 390 or 470.

3. The base resistors are too low. The base current only needs to be about one tenth of the collector current to ensure saturation.
 
I can see 3 issues.
1. You have not tied the Reset inputs of the SRs to either 0 Volt or + 5 Volt. The choice between these depend upon whether the SR reset is Active High or Active Low. Check the data sheet.

2. The LED current seems a bit high. I estimated that it will be about 13.5 mA. Normally about 7 mA is sufficient. So change the collector resistors to either 390 or 470.

3. The base resistors are too low. The base current only needs to be about one tenth of the collector current to ensure saturation.


Well that's good news!! I will calculate all the correct values soon enough. My main worry is that the circuit simply won't work because I don't really understand circuits.

In this setup, if I have multiple LEDs on in a column, will the lights begin to dim?
 
Well that's good news!! I will calculate all the correct values soon enough. My main worry is that the circuit simply won't work because I don't really understand circuits.

In this setup, if I have multiple LEDs on in a column, will the lights begin to dim?
I have thought of 2 more issues & I have some suggestions.

1. I can't see any bypass capacitors on your circuit. You will need a 100 uF electrolytic capacitor & three 100 nF ceramic capacitors (1 near the uC & trhe others near the SRs) across the 5 Volt supply line. You are likely to have some strange results if you don't include these.

2. I doubt whether the SR that sources the current for the LED columns will be able to supply enough current if you have more than a few LEDs switched on at a time. Check the SR data sheet. This partially answers your question re LED brightness.

I have 2 suggestions.
1. You can save your self a lot of wiring if you use 2 Darlington arrays in lieu of the transistors & their base resistors. See the data sheet attached. You will see in the DS that there are several versions - the ULN 2802, ULN 2803, etc. You need the ULN 2803. Note that these have the base resistors inside them. Do you intend to have more than one LED on in a Row ?

2. If I were you, I would start with a small array, say 4 X 4 initially in order to learn the ropes before you attempt the full size one.

The second issue re brightness is that you will need a power supply that can supply sufficient current for when the maximum number of LEDs are alight.

I'll have further suggestions once you answer my questions above. If anything is unclear, just ask.
 

Attachments

If I were designing a digitally controlled 8x8 LED matrix, I'd most likely use a single chip solution such as tha MAX7219 from Maxim Integrated.
Here's a link to more info.
 
If I were designing a digitally controlled 8x8 LED matrix, I'd most likely use a single chip solution such as tha MAX7219 from Maxim Integrated.
Here's a link to more info.
Wow, I honestly had no idea those existed! I will use that in the schematic seeing as it is cheaper and easier solution than what I am doing it
 
1. I can't see any bypass capacitors on your circuit. You will need a 100 uF electrolytic capacitor & three 100 nF ceramic capacitors (1 near the uC & trhe others near the SRs) across the 5 Volt supply line. You are likely to have some strange results if you don't include these.

I am not sure why I would need a bypass capacitor in this circuit. I am guessing they are used to make the Voltage fluctuation more constant in a DC circuit? Could you give me a description of what connects to what because I am not sure on this one.

2. I doubt whether the SR that sources the current for the LED columns will be able to supply enough current if you have more than a few LEDs switched on at a time. Check the SR data sheet. This partially answers your question re LED brightness.

Yep, very true. If I did this manually how would I go about increasing the current supply while maintaining voltage?

I have 2 suggestions.
1. You can save your self a lot of wiring if you use 2 Darlington arrays in lieu of the transistors & their base resistors. See the data sheet attached. You will see in the DS that there are several versions - the ULN 2802, ULN 2803, etc. You need the ULN 2803. Note that these have the base resistors inside them. Do you intend to have more than one LED on in a Row ?

Only 1 LED on in any row. Yes, you are right, it seems Darlington arrays would replace all that. Well spotted!

2. If I were you, I would start with a small array, say 4 X 4 initially in order to learn the ropes before you attempt the full size one.

Definitely


After jbeng's comment it is more economical to go with an IC (didn't know it existed). Though, I will keep updating the schematic because I've learned A LOT in these past few posts!
 
I am not sure why I would need a bypass capacitor in this circuit. I am guessing they are used to make the Voltage fluctuation more constant in a DC circuit? Could you give me a description of what connects to what because I am not sure on this one.

A bypass capacitor goes between some point (typically the Vcc pin on a chip) and ground, to "bypass" any noise around the chip, hence the name. Digital switching circuits tend to generate noise (spikes and other nasty artifacts) on what should be a pure DC line, which can interfere with their proper operation.

Typical value for a bypass cap is 0.1μF.
 

Latest threads

New Articles From Microcontroller Tips

Back
Top