Go Down

Topic: Random noise in 8x8 LED Matrix with TLC5940 Mux? (Read 7377 times) previous topic - next topic

dc42

#15
Oct 05, 2011, 11:41 am Last Edit: Oct 05, 2011, 11:43 am by dc42 Reason: 1
From your scope trace, it look like the oscillation is occurring when any one of 3 of your FETs are turned on, but not when the other 5 are turned on. Can you post a scope trace of the signals on the gate and drain of the FET that is 4 time slots further along from the one you originally posted? That one looks to be the worst.

I presume you have the BLANK inputs of all of the 5940s securely connected either to ground or to an Arduino pin that has been configured as an output by a call to pinMode?
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Grumpy_Mike

Quote
so it's hinting me toward a problem with the TLC Mux library.

No this is a pure hardware problem, it is nothing to do with the software. Software can't produce high frequency oscillation like his.

itoa


From your scope trace, it look like the oscillation is occurring when any one of 3 of your FETs are turned on, but not when the other 5 are turned on. Can you post a scope trace of the signals on the gate and drain of the FET that is 4 time slots further along from the one you originally posted? That one looks to be the worst.


Sure, I'll post a series of images of the gate/drain traces of all 8 fets when i get home in order.


I presume you have the BLANK inputs of all of the 5940s securely connected either to ground or to an Arduino pin that has been configured as an output by a call to pinMode?


BLANK input is connected to pin 10 as illustrated by the library shown here: http://students.washington.edu/acleone/codes/tlc5940arduino/img/breadboard-arduino-tlc5940_close.png

dc42

One other thing I spotted is that your mosfets are not intended for logic-level gate drive. The data sheet suggests that with 4.5v to 5v gate drive they will probably switch on sufficiently if the current they have to switch is no more than 1A - which should be more than enough for 8 LEDs. However, it will vary between devices. A scope trace should show whether they are switching properly.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

itoa

Okay, so I finally got the chance to sit down for a couple of hours and poke around at this mess.

First things first - the oscillation problem seems to have been fixed by a little wire cleanup. I originally threw the circuit together pretty rapidly and when I saw the expected output I thought that everything was working just fine. This was however not the case.

I did notice some issues after the oscillation was gone - when the gate was high after being low, the drain was slowly decaying to 0V...



I thought to pull the gate up to +5V with some 270 ohm resistors I had lying around. This seemed to work as intended:



I then noticed this didn't resolve any issues. So I decided to use some pull the drain down to 0V using 10K ohm resistors:



Wow! Exact symmetry. I was very happy to see that this worked. (Although I am curious as to whether or not this is a safe design.)

And for comparison, a drain with a pulldown and a drain without a pulldown:



I am still at a loss as to why the FET isn't going back to 0V as I thought it would... can this please be explained?

However, after I fixed the issue, I'm still getting strange ghosting/flickering effects. I will try to implement the code suggested in the other thread and see if that alleviates any issues.


One other thing I spotted is that your mosfets are not intended for logic-level gate drive. The data sheet suggests that with 4.5v to 5v gate drive they will probably switch on sufficiently if the current they have to switch is no more than 1A - which should be more than enough for 8 LEDs. However, it will vary between devices. A scope trace should show whether they are switching properly.


My final board is a 40x32 RG Led display (Working as intended, manually poked around and such) Right now I'm only using the red channel of one of the 8x8 matrices - so it definitely is an issue...
(with multiplexing, one row with all on = 80 LEDs - 20mA * 80 = 1.6A)

I also have these p-channel FETs: http://www.fairchildsemi.com/ds/FQ/FQP7P06.pdf - if these will also not work can you inform me on what kind of FETs I should be looking for? I am still new to the DIY electronics scene and splurged on a lot on now useless parts when I started this project :(

Grumpy_Mike

So it was a layout issue after all.

Quote
So I decided to use some pull the drain down to 0V using 10K ohm resistors

That didn't actually resolve anything it was just a cosmetic improvement. When the FET is switched off the drain is in effect floating which is why you see that slope on the scope. By adding a 10K pull down you provided a path to ground for your scope input, it makes the traces look like you expect them to be, but it is only an expectation. You can remove this resistor and have the circuit work just the same only it doesn't look as pretty on a scope.

itoa


So it was a layout issue after all.


Yeah, although I'm still not sure what is causing it... I'm having much more sporadic oscillations on my soldered perfboard to the point where all of the LEDs on the display board are flashing at random (even when no code is running) - that board currently has 24 FETs/2 decoders on it - going to desolder that down to 8 FETs and 1 decoder and get things looking the same as they do on the breadboard before scaling it up.


When the FET is switched off the drain is in effect floating which is why you see that slope on the scope. By adding a 10K pull down you provided a path to ground for your scope input, it makes the traces look like you expect them to be, but it is only an expectation. You can remove this resistor and have the circuit work just the same only it doesn't look as pretty on a scope.


Thanks for the explanation. Wasn't aware that the drain floated when switched off - learning something new every day  :D

Grumpy_Mike

Decoupling is your friend, if you are using perf board or strip board then you can use surface mount decoupling caps as they are the best.

With strip board make sure you don't have long strips of track attached to a pin that act as antenna.

Go Up