-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PCA9685 LED Driver maximum brightness dips #329
Comments
I can confirm that. There are multiple solution to solve this. Since I also don't like the curve on the low intensity, I just made an other curve that never go to 4095, but stop at 4094... A better way is probably to do something like this (but I did not tried it) |
btw, it should be if(rawBrightness > 0x0FFF), since it's it should work correctly with rawBrightness = 0x0FFF... |
Hmm, I had something like this initially but I thought i had fixed it... I use my led drivers for "peak-meter"-style led indicators and never noticed something weird with them. But I guess those are flickering all the time and such an error would easily go unnoticed. @ch-nry Not sure if I understand you correctly. |
@TheSlowGrowth : I don't understand the problem : if "rawBrightness" is >= 0x1000, then the full on bit will be set, and the led will be on forever. if "rawBrightness" == 0x0FFF , then draw_buffer_[d].leds[ch].off = (on + rawBrightness) & (0x0FFF); Without the full on bit, the led can't be switch on permanently, since if on == off, the led is off all the time. All in all, the control of the led is from 0 to 4096, I.E from 0x0000 to 0x1000, and not from 0x0000 to 0x0FFF. well, I'll have to test to see if I'm right, but since I've made more modifications to this file, it's not on my todo list. |
Yeah, I usually end up having almost all of the LEDs scaled to not go fully bright anyway, so I don't notice it on any of the bigger projects I've worked on, but I noticed it on some of the DaisyExample projects, and with oopsy.
This doesn't really explain it because it stays less bright then, say, the next value in the gamma corrected brightness. Once the value is set to 0x0fff the driver sets the bit, and nothing should toggle it off. Also, I don't think we should change the Honestly, I'm also not really opposed to just adjusting the map to a max of |
I don't understand what you say. anyway, I tested and all my solutions works. But if you are ok with the led being at a maximum of 4095/4096, then the function can be simplified to (this is what I use) :
(edited for formating) |
since we are discussion about this driver, I know it's not related, but I also made an other modification to this file :
in order to increase PWM frequency to it's maximum. It did not change anything visually, but did reduce flickering when you film your device... Also, the last part of this file look wrong since buffer 1 is assigned a 9 bit value :
|
Hah, I thought it was me but indeed the LEDs on the field do a little "dip" just before you reach the maximum value. Should've looked for this ticket earlier, as I was contemplating reporting it myself (but also figured it's a bit of a minor issue). Not exactly sure how the PR from @beserge fixes this, but it would be a nice "low hanging fruit" to finally get resolved in libDaisy. |
I noticed this a while ago, and I guess totally forgot to make an issue. Just want to be clear this is not new or related to the minor change in #327
It seems like when an LED is set to its maximum value it actually dips in brightness a little bit. I first noticed this on the Daisy Field, but I have since noticed it on a few custom boards as well.
I haven't really had a chance to investigate it yet, but it can be fairly noticeable in certain settings. So I want it to be documented.
I suspect it might be the result of having the on/off times being super close to each other. I don't recall experiencing this issue with old pre-daisy PCA9685 code that I have, but it's been a while since I've looked at the differences between what we have now and some of my 2-3 year old C drivers.
@TheSlowGrowth have you noticed this behavior on your end as well? I know you've used this led driver quite a bit as well.
The text was updated successfully, but these errors were encountered: