Glitching TLC5940

Can you explain that in a bit easier to understand English? My English is not that good.

Note that this is only the power supply to the anodes of the leds, it's not powering the arduino/tlc's and it's only connected to each other through the ground

It is probably that the regulation on the power supply is different for the different voltages

The regulation on a supply is a measure of how stable the voltage is as more or less current is drawn from it, and how much ripple there is on top of that voltage.

If your power supply has a variable voltage it is likely that the change in voltage as the current changes is going to be different at different voltages. It is likely that at 12V this is worse on your power supply than it is a few volts either side of it. This is not unusual for a variable power supply.

What is the current rating of your suppiles? And how much current do you expect the LEDs to draw?

The regulation on a supply is a measure of how stable the voltage is as more or less current is drawn from it, and how much ripple there is on top of that voltage.

If your power supply has a variable voltage it is likely that the change in voltage as the current changes is going to be different at different voltages. It is likely that at 12V this is worse on your power supply than it is a few volts either side of it. This is not unusual for a variable power supply.

So that would mean the glitching comes from the led power source, and thus I need to decouple that power source instead of the TLC's?

and thus I need to decouple that power source instead of the TLC's?

No the TLCs are where the damage is being done, decouple them tightly and don't let the interference in.

James. Thanks for the correction. I was under the impression from what I've read on-line that several TLC5940's would draw too much power from the Arduino (not to power the LEDs but for the chips themselves).

Since the boards I always use aren't genuine Arduino's, I power the TLC5940's from the same 5v source that drives the boards themselves and just assumed that was correct.

Thanks,

Brad.

[quote author=Brad Burleson link=topic=99196.msg744968#msg744968 date=1333250873]
James. Thanks for the correction. I was under the impression from what I've read on-line that several TLC5940's would draw too much power from the Arduino (not to power the LEDs but for the chips themselves). [/quote]
You can't always believe what you read online. Most people don't understand how LEDs work, let alone the TLC5940. You have to look to the data sheet to understand.

I'm still waiting for the new TLC's to arrive.

In the meanwhile I encountered something interesting.
When I use the power source from the led's to power a walkietalkie, and broadcast with it, I can hear a noise-frequencie which matches the pattern of the leds..
Is there anything useful i can do with that? :stuck_out_tongue:

I've received new TLC's and tried most of the suggestions, but there's still glitching:

Stuff is acting even weirder:

void loop()
{
  for (int channel = 0; channel < NUM_TLCS * 16; channel++) {
    Tlc.set(channel, 4095);
      Tlc.update();
  }  
  delay(1000);
  for (int channel = 0; channel < NUM_TLCS * 16; channel++) {
    Tlc.set(channel, 0);
      Tlc.update();
  }  
  delay(1000);
}

You are updating the TLCs way too often. Set your values and then update once (after the for loop sets all the values).

Ah, that explained a lot, but it's still glitching for a bit now..

By the way, i connected a 7805 to power the tlc's, but the wire from the 5v-out from the arduino was still connected to the powerlane in the breadboard, and now the 7805 is powering the arduino through the 5v out pin on the arduino. Can that cause any damage or anything?

Inevitableavoidance:
Ah, that explained a lot, but it's still glitching for a bit now..

Can you post a hardware schematic of how you wired the TLC5940?

Inevitableavoidance:
By the way, i connected a 7805 to power the tlc's

Not necessary, but I understand why you did.

Inevitableavoidance:
the wire from the 5v-out from the arduino was still connected to the powerlane in the breadboard, and now the 7805 is powering the arduino through the 5v out pin on the arduino. Can that cause any damage or anything?

This is undesirable when the Arduino is being powered on its own. With either USB or Vin/Barrel jack, there is already 5V present on the 5V pin. You are causing two regulators (either inside your PC or the arduino regulator) to fight with the external 7805.

7805 stuff aside, please post a schematic of how you wired the TLC5940.

Pretty much exactly like this: http://tlc5940arduino.googlecode.com/svn/wiki/images/breadboard-arduino-tlc5940.png
But with a 100nF capacitor between vcc and ground next to the TLC's, and 10uF at the power in on each breadboard. The TLC's are all on a separate breadboard.

Inevitableavoidance:
Pretty much exactly like this

Any differences?

Did you follow the directions to modify tlc_config.h and make sure TLC5940.o is deleted afterwards?

Yes, I did.

And I don't know how, but the glitching disappeared..!

I'll leave it as it is for now, and i hope there won't be any glitching in the final bigger project.. :slight_smile:

and make sure TLC5940.o is deleted afterwards?

You haven't had to do that for several releases now because the libraries are automatically compiled every time.

The glitching is back, the difference is that the power source is giving me one Volt extra atm.
The led's were only getting 2.5mA because they were getting insufficient voltage.. so i upped it a bit.

How is this affecting the TLC's..?

At the moment the TLC's are being powered by the arduino, which is powered by usb. The anodes of the strings of 4 leds are connected to the (variable) 12v supply.

There's no glitching whatsoever, even without capacitors, if I power the power supply down to ~11v.
There's a lot of glitching, even with capacitors, when I power the power supply up to ~12v and above.

Are there any more things I can try to get it to work..?

The led's were only getting 2.5mA because they were getting insufficient voltage.

So what current had you set the TLC5940 for?

There's no glitching whatsoever, even without capacitors, if I power the power supply down to ~11v.

I assume that is because you are switching very little current.

There's a lot of glitching, even with capacitors, when I power the power supply up to ~12v and above.

I presume this is because the current being switched is larger and it is generating interference and you have insufficient decoupling on the supply to cope.