Pages: [1] 2   Go Down
Author Topic: Flickering on LED Array  (Read 1388 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Please, check this video on YouTube.

I have an LED Array powered by Arduino.
The code blinks only the first column. Notice how the other two columns on the right have flickering LEDs on the same two rows with the first column. If an LED is not on the same row with the blinking column, no flickering is noticeable. Counting rows from the bottom - in the first column the blinking rows are 3 and 4, and the same rows in the second and the third column have flickering when the first column blinks, but row #2 in the second column and row #1 in the third column doesn't have that flickering.

How can I eliminate that flickering?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27427
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Post your code & schematic to start.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Please, before I do that, let me put the question differently: is it true, that the more LEDs in a row you have in ON state the dimmer each one of those ON in the row will be?
Logged

Offline Offline
Sr. Member
****
Karma: 12
Posts: 381
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please, before I do that, let me put the question differently: is it true, that the more LEDs in a row you have in ON state the dimmer each one of those ON in the row will be?

In depends completely on how you are doing things.

We really can't help you without a lot more information. Start with the code and the schematics, and it'll save us all a lot of time.
Logged

Do not IM me. I will not respond. Ask questions in the forum.

NSW Australia
Offline Offline
Faraday Member
**
Karma: 93
Posts: 3720
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I notice various resistors on the breadboard, but none clearly connected to the display in operation.

Unless you are using a MAX7219 or similar purpose-designed driver chip - and I am pretty sure you are not - you must have resistors for whichever of the rows or columns that are being driven simultaneously whilst the other dimension is selected, otherwise you will be overloading the Arduino even more dangerously than you probably need to be to cause this effect.

If you have removed resistors in an attempt to increase the brightness, you have completely misunderstood the need for buffer transistors in the dimension opposite to where the resistors must be.

Go get a MAX7219 and learn how to use it.  smiley-grin  Seriously, this is the only sensible and dead easy way to drive a small number of these matrices.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 179
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is how I would have pictured the flickering led's from noise. I am not sure, I have never seen it, but check your capacitors, or put some in...
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

My apologies for leaving the topic. My problem was in the walking bit which was travelling the columns. After I'd switched it to walk the rows I had no problems with dimming rows (and columns) any more. This post helped me to understand that.

Quote
The resistor must be in the line that only takes the  current for one LED. If it were otherwise then the brightness of the LEDs would change depending on how many LEDs are on at any one time.

The same blog post says:

Quote
If you want to drive a matrix with an arduino you must use an external driver for the current source or current sink. Despite some tutorials suggesting otherwise, you will over stress the arduino by many times above  the absolute limit if you try. These tutorials (one on the official Arduino site) are very bad and will eventually destroy your Arduino although you might think it works for some time eventually the Arduino will fail.

But it doesn't say how to understand that you are about to over stress the Arduino. How to calculate the amount of current which is needed to be sunk/sourced? I have an LED array with two shift registers in series - one for the rows and the other one for the columns.

The question on that topic looks very similar to what I'm facing. 595 are separated, but that seems like the only difference. ULN is discussed there to sink the current.

Quote
But my concern is the current flow through 595 at the top if I turn on all LEDs in a row since 8*20mA = 160 mA which is over the ~35 mA capacity of the 595.

Where do the numbers come from?


To Paul__B
I notice various resistors on the breadboard, but none clearly connected to the display in operation.
The resistors are connected to the LED rows.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27427
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Where do the numbers come from?
Typically, one uses current limit resistors to allow max current of 20mA/LED as that is the max continuous current for many LEDs.
If you have a multiplexed matrix with shift registers and ULN2803, then one would expect all the anodes to be driven together while 1 cathode at a time is enabled.
8 LEDs, all on, = 20mA * 8 = 160mA.
Datasheet for 74HC595 has absolute max limit on the VCC and GND pin of 70mA.  If all 8 outputs are HIGH and current limit resistor allows 20mA per output, than a lot more current is requested than the chip supports. Resistors should be changed to only allow 8-9mA per output.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What I have now is two 74HC595 in series and 220 Ohm resistors on each of the LED array rows. I don't have ULN2803 on my circuit.

Resistors should be changed to only allow 8-9mA per output.

Does that mean that if I have stronger resistors, I don't have to have ULN2803? What's ULN2803 purpose in there, then?

As a separate question. I have it all powered from Arduino's USB -> 5V pin. I want to change that to 3 AA batteries -> 5V pin. The voltmeter showed around the same voltage in both cases. Do I have to account for the change somehow?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27427
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How about a schematic?  3rd request.
Are you saying you have '595 to rows of anodes, and 2nd '595 to columns of cathodes?
Are you planning to turn on more than one anode and one cathode at a time?
Any more than that and you are overstressing the cathode-driving '595.
The ULN2803 would a high ciurrent buffer for the output of the cathode '595 to allow current sinking of 8 LEDs, and 1/8 rows multiplexing vs 1/64 LEDs multiplexing.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27427
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

4.5V or 5V, both are fine for a power source.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Sr. Member
****
Karma: 8
Posts: 260
Supernova Software - Quality Software Since 1985!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I watched your video three times and I'm not sure what the issue is. Are you saying the lights on the right should not be fading when the ones on the left come on?

A schematic would really help here. There's lots of these LED matrix projects out there, and they are slightly different - maybe a link to the project you are doing, if it shows the wiring? Then, we should check your actual wiring and make sure it matches up. If the project is posted on the web somewhere, please post the links.

Is it this?  https://www.sparkfun.com/products/682
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is what I was working on and what I had questions about:
http://sealemar.blogspot.com/2014/02/binaryclock-hardware.html
http://sealemar.blogspot.com/2014/02/binaryclock-binary-clock-diy.html
Logged

NSW Australia
Offline Offline
Faraday Member
**
Karma: 93
Posts: 3720
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Something very odd about your schematic.  It shows pushbuttons connected to Vcc but no pull-down resistors.

Of course, the proper way to connect the pushbuttons, is to ground and use the "INPUT_PULLUP" function, but I cannot see how your project even works with the configuration as it is shown.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Of course, the proper way to connect the pushbuttons, is to ground and use the "INPUT_PULLUP" function, but I cannot see how your project even works with the configuration as it is shown.

Thank you Paul for spotting that error. It was on schematics only. Push buttons are connected to Atmega and grounded. And on Atmega internal pull up resistors are set as per westfw. I've made changes to schematics on the blog post and in the GitHub project.
Logged

Pages: [1] 2   Go Up
Jump to: