Help with programming an LED knight-rider scanner!

Thanks for the quick reply! ive been wanting to do this forever, and since im stuck at home sick, i thought id give it a shot! i updated the original post with more info!

Get a TLC5940 LED controller chip and use the basic example program (which just happens to be a "Larson Scanner" - which is what they're called).

The chip makes sure all your LEDs are running at optimal power and protects your Arduino from the stress of charlieplexing.

Hippynerd:
Charlieplexing is a great way to control a lot of LEDs, but using LEDs with built in resistors might be an issue, since you will be always using 2 resitors anytime you try to light an LED.

Not if the resistors are in parallel - which they will be if they're "built in".

fungus:
Get a TLC5940 LED controller chip and use the basic example program (which just happens to be a "Larson Scanner" - which is what they're called).

The chip makes sure all your LEDs are running at optimal power and protects your Arduino from the stress of charlieplexing.

I will look into one of the chips! I also want to learn how to do it with just the LEDs for practice too.

fungus:

Hippynerd:
Charlieplexing is a great way to control a lot of LEDs, but using LEDs with built in resistors might be an issue, since you will be always using 2 resitors anytime you try to light an LED.

Not if the resistors are in parallel - which they will be if they're "built in".

Do you suggest i try something else then?

fungus:

Hippynerd:
Charlieplexing is a great way to control a lot of LEDs, but using LEDs with built in resistors might be an issue, since you will be always using 2 resitors anytime you try to light an LED.

Not if the resistors are in parallel - which they will be if they're "built in".

Thats curious, why would you build a resistor in parallel with the LED?

If you use the TLC chip, you will only be able to run 16 per chip, and you will also need some other parts (a couple resistors and a cap per chip). If you want to run 18 LEDs, then you will need 2 TLCs, 4 resistors, and 2 or maybe 4 caps. You will also probably want to use some kind of circuit board to hold all these parts.

its a lot of extra stuff to learn and build, but you get the benefit of PWM, so thats kinda cool, if you want that feature.

another way to do it is to serialize each LED with its own chip. It uses a lot of parts, but its easy to expand/contract the number of LEDS.

Multiplexing uses no extra parts, but it is more complex wiring, its sort of a trade off.

Zakc:
I will look into one of the chips! I also want to learn how to do it with just the LEDs for practice too.

Be my guest...

PS: A good Larson Scanner fades the LEDs out when the scan passes them. Charlieplexing makes fading difficult.

Zakc:
Do you suggest i try something else then?

No, playing with LEDs is always a good thing.

You might want to spend some time reading up on C++ programming, too. Learn about loops and stuff.

Hippynerd:
Thats curious, why would you build a resistor in parallel with the LED?

fungus:

Hippynerd:
Thats curious, why would you build a resistor in parallel with the LED?

LMGTFY - Let Me Google That For You

oh i didnt build it, i just bought a bundle of them from Radio shack, thinking it would make my life a bit easier!

Hey there everyone, this is my first post

Did you read this post at the top of this section?

Any good reason why not?

@fungus, why in parallel?

AWOL:
@fungus, why in parallel?

I never said 'parallel', that was Hippynerd.

AWOL:

Hey there everyone, this is my first post

Did you read this post at the top of this section?

Any good reason why not?

I did read the first post? but i re-read it to see why you asked that, and saw that i forgot to use the code tag in my original post, sorry about that!

fungus:

AWOL:
@fungus, why in parallel?

I never said 'parallel', that was Hippynerd.

I was quoting you when I had said that. You suggested that the resistors will be in parallel, you put the word will in italics to emphasize that correct?

Also, the google search didnt really answer my question. Is it too difficult to type a whole sentence to explain why?

Hippynerd:
I was quoting you when I had said that. You suggested that the resistors will be in parallel, you put the word will in italics to emphasize that correct?

Also, the google search didnt really answer my question. Is it too difficult to type a whole sentence to explain why?

How can you get two resistors in series when they're inside the LEDs and the LEDs are in parallel?

fungus:

Hippynerd:
I was quoting you when I had said that. You suggested that the resistors will be in parallel, you put the word will in italics to emphasize that correct?

Also, the google search didnt really answer my question. Is it too difficult to type a whole sentence to explain why?

How can you get two resistors in series when they're inside the LEDs and the LEDs are in parallel?

Hippynerd:

fungus:
How can you get two resistors in series when they're inside the LEDs and the LEDs are in parallel?

They're not inside the LEDs.

I re-drew the schematic with the resistors inside, in series, and it would only use one LED and 1 resistor at a time. It seems to me that would also be true if the resistors were in parallel with the LED. It would seem to me that if you are going to put the resistor inside the LED, you would put it in series to limit current, but it would be fixed to a specific voltage. I dont understand why you would put it in parallel though.

Hippynerd:
I re-drew the schematic with the resistors inside, in series, and it would only use one LED and 1 resistor at a time.

Right. Now go back and read your posts.

Hippynerd:
It seems to me that would also be true if the resistors were in parallel with the LED.

Why on earth would anybody do that?

Yes, i re-read my posts, I dont know why, but I re-read it for you.

I was wondering why anyone would put the resistor in parallel, because you said:

"Not if the resistors are in parallel - which they will be if they're "built in". "

That leads me to believe that you know that the LEDs are in parallel (like thats how they always do it), I've never used those kinds of LEDs, but I would imagine the resistor would be series.

Hippynerd:
Yes, i re-read my posts, I dont know why, but I re-read it for you.

I was wondering why anyone would put the resistor in parallel, because you said:

"Not if the resistors are in parallel - which they will be if they're "built in". "

I was replying to your post about resistors in series.

If the resistors are inside the LEDs they'll be in parallel (with each other), just like the LEDs.