2

I've been trying to develop this circuit for a multiplexed display with two seven segment digits and five SMD LEDs.

For simplicity, I've only shown one digit (LEDS 1 through 7) and two SMD LEDs (8 and 9). I have the code to write the appropriate data on PORT B and switch on the corresponding LED bank using PORT A.

Although the display works okay, the LEDs and segments seem to glow dimly even when they are OFF (logic LOW on PORT B).

I have tried reducing the value of R3 and increasing R2 but it doesn't seem to help.

Datasheets: 9012, 9013, ULN2003A

multiplexed LED display

try-catch-finally
  • 1,254
  • 3
  • 19
  • 37
Sohail
  • 757
  • 1
  • 8
  • 18
  • 2
    The ULN2003A datasheet mentions a leakage current of 50 to 100 microAmperes. Please share the datasheet of the LEDs you are using: There may be LEDs which have a barely visible glow at that level of current... Many LEDs I have definitely glow visibly at 2-300 microAmperes. – Anindo Ghosh Apr 22 '13 at 08:27
  • 1
    See also this : http://electronics.stackexchange.com/questions/62271/learning-multiplexing-with-leds-transistor-switching-speeds/62303#62303 for another possibility. –  Apr 22 '13 at 09:33
  • Pin 9 on the ULN2003 - have you connected it to somewhere that may cause current flow through the LEDs like +5V? – Andy aka Apr 22 '13 at 09:38
  • @AnindoGhosh. I procured the LEDs from a local vendor :P... No datasheets :( But the solution suggested by Brian seems to work nicely. So evidently, the LEDs do not glow at 100mA. Thanks still... I'd buy LEDs with datasheets next time so this possibility is also taken care of. :) TY – Sohail Apr 23 '13 at 06:53
  • @BrianDrummond. This works!!! I used OFF times of 100us and 1ms as suggested on the other post and the LEDs are completely OFF now. I didn't have to tune the two time periods as well. This works for me. Many thanks. – Sohail Apr 23 '13 at 06:55
  • @Andyaka. I've connected pin 9 to +12V. Probably that's the way it is? To clamp any over-voltage? But even if it were to be connected to +5V, wouldn't that cause the ULN to sink full current (bright fully turned ON LEDs) 'all the time', regardless of the inputs? I am missing the point :( TY – Sohail Apr 23 '13 at 07:03
  • @Sohail Given that you are in Mumbai, India, I suspect you might face some challenges finding any through-hole LEDs with a part number or datasheet :-) I've tried, with resounding lack of success, even for large volume orders. For SMD LEDs, sure, there are options at Lamington Road. – Anindo Ghosh Apr 23 '13 at 09:46
  • 'Resounding lack of success' :-D hmm... Actually I wouldn't dare mention datasheets at Lamington Road and risk being laughed at :-P But whatever... I'll ask for datasheets next time I am there. Thanks! :) – Sohail Apr 24 '13 at 10:54

2 Answers2

4

Your problem is that you need something to drive the Anodes of the LEDs down to GND. I would try the following:

enter image description here

The key is R6, which should carry any possible leakage currents. I would use a value ranging in the order of 4K7 or so, that should be more than enough.

payala
  • 540
  • 2
  • 8
  • pull down resistor? – Relianthe Apr 22 '13 at 16:07
  • yes, indeed it is ;-) – payala Apr 22 '13 at 18:03
  • @payala. I tried something even as low as 1k for R6 but it seemed to have no effect. But the issue was bad timing in the code as Brian suggested. Somehow it all works okay even without the pull-down! O: Thanks still. I'll keep this for future. :) – Sohail Apr 23 '13 at 07:07
  • 1
    Yes, that makes very much sense. I have needed this pull-down thing on some designs with high-brightness LEDs... the glow dimly with even 5uA... its incredible! Glad you solved it! – payala Apr 23 '13 at 08:51
  • +1 this solved a problem I was having with high brightness LEDs in a multiplexed array. Thanks @payala – JYelton Jun 13 '13 at 02:10
0

Are these LEDs glowing due to leakage current? How to prevent it?

it is possible but not likely.

One way to know for sure is to measure the voltage across the resistors in serial with the leds with the input being low.

I suspect that it is an issue of dynamic updating -> the code doesn't do blanking.

dannyf
  • 4,272
  • 1
  • 7
  • 9