Short back story:
I'm trying to control either a 2x8 or 8x2 RGB array (whichever config works best with as few wires as possible). Since the 4017 didn't produce enough current to drive the rows of the array, it was suggested that I pick up a 2982 source driver. The setup is like this: Arduino clocks 4017, whose outputs go to the inputs of the source 2982 source driver; the source driver outputs go to the 8 rows of the LED array (current config, call it the 8x2); the LED cathode sides go to the 5940 channels.
The numbers:
I'm getting around 14mA through each color of the RGB array into the TLC5940. I've got a 2.1k resistor between pin 20 on the 5940 and ground to limit the current the 5940 sinks to I believe 20mA. The 4017 counter is providing ~4.7V and .008mA to the input side of the 2982 source driver. The 2982 also applies 3.3V to the array row when it's pulsed.
My current "issues":
-
I want higher current through each LED... what is limiting this in my setup?
-
Also, I am getting flicker when an entire column is pulsed in succession at high speed (i.e. no delay() fuction used.... or delay(0)).
I am using an analogRead() to get the voltage from a 500k pot I have connected to the Arduino to test this type of functionality. I am planning on using this method in my project to capture a value that will be used for the color information to be displayed in the array. Right now, I have the value captured being assigned to a delay() function just to slow down and speed up the pulsing of each row of the array (to verify I had things connected correctly and "witness" the POV effect).
Since this project is going in a guitar, and the pot used will be concentrically stacked with a pot that will actually control guitar signal, I am basically limited to 250k being the lowest value of dual-stacked pot I can find.
My current solution (with the above issues) requires 14 data lines going to the array. If I can't figure the flicker issue out and make it not noticeable to the human eye, I will have to reconfigure to pulsing only 2 rows and sinking 8 columns (24 lines) into 2 5940s. This would require 26 data lines, but should theoretically cut the flicker down by 1/4 (and would be conceptually easier for me to program)
The crappy "test code":
#define CLOCK 2
#define pot_source 7
#define pot_pin 7
void setup()
{
Tlc.init();
pinMode(CLOCK, OUTPUT);
pinMode(pot_source, OUTPUT);
Serial.begin(9600);
}
void loop()
{
int n = 0;
digitalWrite(pot_source, HIGH);
n = analogRead(pot_pin);
digitalWrite(pot_source, LOW);
Tlc.set(2, 4095);
Tlc.set(3, 4095);
Tlc.set(0, 4095);
Tlc.set(1, 4095);
Tlc.set(4, 4095);
Tlc.set(5, 4095);
digitalWrite(CLOCK, HIGH);
digitalWrite(CLOCK, LOW);
Tlc.update();
delay(n);
// Serial.println(n);
}
Any clues regarding the flicker or current issue, given the above constraints?
Thanks,
lqbert