Shortest pulse duration

What is the shortest pulse length of the output pins of a Arduino Duemilanove. I want to know this so I can determine how precise I can control the colour of RGB LED's.

The answer to your question will not help you. As you have a 16MHz clock the shortest pulse is one clock pulse high or 0.0625 uS.

However they eye can only perceive about 64 to 128 levels of brightness so the question of precision of control is irrelevant. Try googling “just noticeable difference”

However they eye can only perceive about 64 to 128 levels of brightness so the question of precision of control is irrelevant.

Where did he say that a human eye was to be involved in the project? Invalid assumptions make airplanes fall out of the sky and such. Perhaps he is actually doing perceptual levels of the eye research and needs smaller timing intervals than you assumed? As they say, "it is a good answer, but possibly not appropriate for the question". :)

I indeed do not really need such short pulses, but probably an hundredfold of it. But because I want to control all the RGB LED's individually, I have to split the LED's up in four groups which will be turned on after each other. Also all the three colour of a RGB LED can't be turned on at the same time. So if I want achieve 8-bit colours, I should be able to have 256 intensities for every colour of every RGB LED. 4*3*256=3072 pulses per round. And I want around 50 to 60 rounds per second, so one pulse should take: 1/(60*3072)~6µs

@zoomkat

Where did he say that a human eye was to be involved in the project?

well:-

I can control the colour of RGB LED's.

Is quite a good clue because an RGB LED only outputs a quality called colour when it is being perceived by an eye. When it is being sensed by another sensor then it is not a colour but three distinctly separate wavelengths of electromagnetic radiation. They only blend together to give a quantity called colour because of the receptors in a retina being processed by a brain. True I did jump to a conclusion about the human bit. Just like I am jumping to the conclusion you are a twonk.

@Fibonatic

Also all the three colour of a RGB LED can't be turned on at the same time.

Why not? You are describing multiplexing, there is a whole lot more to that than just generating a pulse. Have you considered the multiplexing ratio, that is the on to off ratio of the LEDs independent of brightness control. That is going to cut down your maximum brightness considerably.

And I want around 50 to 60 rounds per second,

Why? If you don't tell the full story we can't give you the full answer.

I have tested the rgb led's previously and that it turned out that only colour at the time could be on (maybe it has something to do with that the rgb led has a common cathode)

And I thought that 50 to 60 rounds per second would be nice, because our eyes would be fooled for sure, but probably 25 rounds per second should do the job as well.

And how I explained it, it indeed looks a little bit like multiplexing. But I want to control 26 RGB LED's with a Arduino Duemilanove (which has 14 ouput pins) And the first idea that came up was to control every led individual but because I don't have that amount of pins I considered to divide it in to multiple groups. And to reduce the number of pins needed for one led I came up with the idea of a little circuit, which should give this as result: pin1 | pin2 | R | G | B 0 0 0 0 0 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1

The only problem of all this is that I need a lot more electronics to control a bunch of LED's, because I need to have access to 78 AND-ports, 52 NOT-ports and a way to switch between the different groups (two of 7 RGB LED's and two of 6 RGB LED's)

And I was also thinking to use some condensers to give the LED's some more power when the other groups are controlled.

True I did jump to a conclusion about the human bit. Just like I am jumping to the conclusion you are a twonk.

If a "twonk" is somebody that calls BS on responses that are off target for the question, you may be getting close to a correct conclusion! :)

Can I be a twonk, please please.

My 4 year old grand daughter told her first joke yesterday:

Why was the nose sad?

Because nobody picked it...... 8-)

Since you're wanting to drive many simultaneously, perhaps a better approach would be to use external PWM drivers. That way the Arduino doesn't have to run in tight loops toggling outputs on and off at precise intervals, it can just push the desired values out to the PWM drivers and let them modulate the LEDs until the value needs to change.

Could you perhaps explain a little more what your project is about? It's hard to provide advice when the problem hasn't been fully explained.

Jon Practical Arduino: www.practicalarduino.com

" Maybe in order to understand mankind, we have to look at the word itself: "Mankind". Basically, it's made up of two separate words - "mank" and "ind". What do these words mean ? It's a mystery, and that's why so is mankind." - Deep Thoughts by Jack Handy

Could you perhaps explain a little more what your project is about? It's hard to provide advice when the problem hasn't been fully explained.

I at first bought these LED's to use in a artistic lamp, which I had to make at school. But I just (not) made the deadline for it; the 'not' because I did finish the lamp, but it didn't worked. I didn't feel like to get it working, so I decide to build them in to a custom computer case I'm building. So I can for example show my cpu or hdd usage, temp or time with it.

But I also heard on another forum that I do can use a matrix system without losing the light intensity by increasing the voltage (because a LED should be able to handle a higher voltage for short moments)

I thought that 50 to 60 rounds per second would be nice, because our eyes would be fooled for sure

That depends on how they're to be used. Some people can see CRT monitor (remember those?) flicker at above 70Hz, and at 50 or 60Hz, you'll certainly see effects if you blink or move your head rapidly.

by increasing the voltage (because a LED should be able to handle a higher voltage for short moments)

Well it is more current you give them. One way to give them more current is to increase the voltage but you can also reduce the current limiting resistor.

Moving your head rapidly you will see it not being a blur but being separate images but it is only rapid head movement that will do that. I have found that anything over 30 per second is good enough, but a lot depends on total ambient light levels and the contrast between the LEDs and ambient light.

One way to give them more current is to increase the voltage but you can also reduce the current limiting resistor.

And how can I reduce the current limiting resistor? I am not sure what the highest current is what the LED's can handle, because this is what the datasheet of the RGB LED says: Peak-point current PWM, Ton=1 ms Duty 1/20 180mA

And how can I reduce the current limiting resistor?

By making it smaller at design time and building it with smaller resistors.

I am not sure what the highest current is what the LED's can handle,

That is what the data sheet is telling you it can handle 120mA for no longer that 1mS and then when it has done that you can't do it again for another 20mS. So to get at other figures you say half things. So for half the current 60mA it could handle it for 2mS and don't do it again for another 20mS. Or if you want to do it every 10mS then you can only handle a 1mS pulse at 60mA. And so on.

Ok that makes it a lot clearer.
But to raise the current I’ll have to use an increased voltage. But according to the datasheet the Peak inverse voltage is 5V. Is this also the max. voltage I should put on the LED’s?
And is it correct to say that a LED is a invariable resistor?
So the max current will be: R=U/I

  • Red: 1,8V/20mA=90[ch8486]
    @5V I=5/90=56mA
  • Green&Blue: 3,8V/20mA=190[ch8486]
    @5V I=5/190=26mA
    So the red LED should be able to be turned on for 1ms and then should be turned of for 10ms and the same for the blue and green LED but then they should be turned of for only 5ms.