smaller analogwrite values for pwm'ing ledstrip

Hi,

I can dimm or brighten a ledstrip using the analogwrite function from 0 up till 255.

But, I noticed that brightening from the lower numbers (lets say from 0 up to 40) is making more difference than going from 200 up to 255.

I would like to dimm/brighten a ledstrip more graduate/accurate so it would not be visible to the eye.

Is it possible to divide the 5v for pwm into more levels (from 0 up to ?) ?

I wish I could analogwrite smaller values than integers :slight_smile:

Hope someone can help me out here with some tip / tricks...

from 1 to 40 you are increasing the power by a factor of 4000%.
From 200 to 250 you are increasing power by a facor of just 25%
This is why the difference less noticeable.

KenF, is it somehow possible to increment smaller?

I want the analogwrite 1 to be even smaller....so like you say,,incrementing just 1% at a time...

No you can't but you could do the opposite. Instead of adding 1 to increase the value could double it instead. This might give you values that appear more regular 0,1,2,4,8,16,32,64,128,255

(note use 255 instead of 256)

I understand what you mean, but let me explain why I ask. A ledstrip is used in a bird cage. Because those cages are not that big, going from 0 to 1 is already too much.

Is there a totally different way to do this technically? (not just thinking about programming or a arduino...but using pwm and mosfets ?)

Any suggestions who to ask or where to look ?