1

I have made an 8x10 LED matrix, controlled using a CD4017 decade counter and Arduino. A simplified schematic is shown below: Simplified LED matrix schematic

In the real version, there are 8 Arduino pins, and all 10 outputs of the decade counter are used (I have only shown a 4x4 for simplicity). The way it works is, for every clock pulse from the Arduino, the decade counter moves the output along by 1. This grounds one of the 10 columns of LEDs via the 2N3904 NPN transistors. At the same time, the LEDs that light up are controlled by turning on/off the relevant Arduino pins. By switching between columns quickly, the LEDs appear constantly on to the eye.

My problem is that the LEDs are pretty dim. I attribute this to the fact that the Arduino has to do a decent bit of processing for the display, meaning the LEDs can spend quite a lot of time off. I have tried to minimise this in code, but although it has had an effect, the LEDs are still dim. Also, the Arduino's power delivery using the digital pins is somewhat lackluster. How could I make the LEDs brighter? I was thinking of having an external power supply, and use the Arduino pins to instead control power delivery from this using transistors, but I have had trouble selecting a transistor for this to work. As far as I know, the LEDs are just standard 5mm LEDs, but I can't find any datasheet for them. I purchased them here.

Any help is appreciated.

J. Barker
  • 11
  • 1
  • Can't you measure the current with a scope and 10 Ohm resistor? But with 10% duty cycle, what do you expect? You can get much brighter LEDs . I have some 20 candella ones – Tony Stewart EE75 Jul 13 '20 at 19:11
  • @TonyStewartSunnyskyguyEE75 Although I'm not expecting great brightness, I also have a 7 segment display that I made using the same sort of system (I realise it's not very practical, but it was fun to design and cheaper than what was available) and that runs much brighter, presumably because I only had 2 LEDs powered at a time by each pin. This leads me to believe that if I could improve power delivery, I could get these LEDs in the matrix significantly brighter, but transistors seem to be much more complicated to choose and use than I anticipated. – J. Barker Jul 13 '20 at 19:28
  • 1
    Logic Supply voltage, LED colour, intensity are large variables. You can make small improvements only . e.g. PN2222A, change 1K to 220. The design requires constant current in each segment and adequate voltage for each digit. This does neither. – Tony Stewart EE75 Jul 13 '20 at 19:35
  • @J.Barker Where do you get the idea that there are two or more LEDs powered by an I/O pin? Only one of the BJTs driven by the 4017 Johnson counter at a time. So for a given I/O pin sourcing current, only one LED can be on. Or am I misreading your schematic? – jonk Jul 14 '20 at 06:05
  • @jonk my bad, I seem to have made an error. – J. Barker Jul 14 '20 at 10:32
  • Each pin only powers 1 LED, but the Arduino has to power multiple LEDs at a time – J. Barker Jul 14 '20 at 10:40
  • @TonyStewartSunnyskyguyEE75 Would this setup work? (I have omitted the rest of the circuit): https://imgur.com/YG3L9FP – J. Barker Jul 14 '20 at 10:44
  • No. The segments need current limit by series R and fixed voltage with fixed voltage for each digit regardless of number of segments active. MAX7219/MAX7221 – Tony Stewart EE75 Jul 14 '20 at 13:11
  • @J.Barker okay. And given that you said four is only for an example but that there are more, you should also consider the maximum port load. I/O pins are arranged by port and the sum of the currents for a port also has a maximum -- usually shown under a heading like "absolute maximum specifications" in the datasheet. And that isn't a number you should count on. It really is an absolute maximum. – jonk Jul 14 '20 at 15:44
  • 1
    @J.Barker Also, if you are really getting into LED matrix driving you have two very distinct and different approaches. One is to use specialized ICs for the purpose. They are widely available and very good. But they are also boutique and may change in availability as the market evolves. Another is to use discrete BJTs/MOSFETs and learn how to make those systems work "fairly well." They won't out-perform the consistent precision you can get from an IC, but you really don't need consistent precision, either. The advantage here is that some discrete parts will always be around and multi-sourced. – jonk Jul 14 '20 at 17:05
  • 1
    @J.Barker The basic idea for any quality *discrete* matrix driver system (outside of myriad optical issues, which is a whole other topic) is that you need a high-side or low-side switching circuit and a current sink or source circuit. With those two understood well and boxed up in mind, you can focus on other factors related to construction, layout, and those optics issues. Most any MCU will then also work fine, too. So you can try out something else for a new project without much worries about brightness issues. – jonk Jul 14 '20 at 17:10
  • I would suggest that you reconfigure your matrix design to use the CD4017 to drive high side switching (using an PNP transistor) instead of low side switching. then to turn on a LED, you set it's corresponding arduino pin to LOW (HIGH would be the LED is off). – Kamprath Aug 03 '20 at 22:24

0 Answers0