-
Notifications
You must be signed in to change notification settings - Fork 13
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
How to reduce flickering? #37
Comments
i'm assuming this is V3.x hardware? flicker is related to the flash rate. the overall current draw is proportional to the flash rate and the energy per flash; so generally, you get a lower flash rate and more visible flicker with lower overall current draw and extended runtime. you won't have much luck in software; you can only change the flash rate there. what you need to do is change the pulse width, which is set by the '123 one-shot. the R and C in the published BoM were chosen to create a pulse width that translates into a current pulse close to the peak LED efficiency. if you reduce the R, you can generate a shorter pulse, which will generate a dimmer and shorter LED pulse. this will allow you to turn up the blink frequency, reducing flicker, while still maintaining a lower current draw. you will lose a little bit of efficiency here for two reasons. first, you won't be driving the LED near the peak efficiency current. but, take a close look at the LED efficiency curves -- you can cut the LED current in half or more without effecting the efficiency that much. that will let you drive it with more than twice the frequency, reducing flicker. the second efficiency loss is larger, and that is due to the overhead of waking up the PIC and generating the pulse for each flash. if you crank up the frequency to reduce flicker, you'll be losing more efficiency to this overhead. there isn't much you can do about this. so, my recipe for reducing flicker at lower current draw is to reduce R3 in the V2.x circuit. this will decrease the pulse width and the peak LED current. once this is done, you can increase the pulse rate in software, and the flicker will be reduced. if you want accurate run-time estimates, you'll need to calibrate the current draw. my suggestion would be to solder a through-hole resistor on the board in place of R3. use long leads for testing. once you find a resistor that gives you the flicker vs current draw you like, you can solder on an SMD resistor permanently. i might try a value of half the initial R3 value as a start. then, play with flicker frequency, either by running the calibration code and python script, or just tweaking the pulse frequency table to your liking. you might want/need to go up or down in resistor value from there. if you really want to be scientific about it, leave one copy of the circuit as-is, and use it as a comparison reference. at these light levels, it's easy to fool yourself, especially if the changes are somewhat subtle. i think this is all i got, but i'm going to leave this issue open for a bit because i'm interested to see where you get with this. good luck! EDIT: if you only have parts bought for the project, you could solder another identical R3 resistor right on top on the one on the board. that would cut the resistance in half. EDIT: i was thinking of the unpublished V4.0 in the efficiency discussion above. there's not too much overhead involved in increasing the pulse frequency in V3.x. |
Hey Ted! Awesome, thanks so much for the response :) I did not expect one. As I'm using SMD, I might try to figure out a bodge by solering a resistor on top of the existing one to reduce the resistance. Yay, 0402's! :) I was going to possibly redesign this at the expense of efficiency. I'll try to take some measurements once I find a very-dim option. Ditching the monostable was what I was eyeing, and I noticed the everled fork with an Attiny13A which can approach 1uA standby. This would be taking a step towards your V2.0 I believe which is just a mosfet controlled directly by a GPIO. For now, I have 18 of these to play with and fix up in time for Christmas presents. I will definitely report back! |
It works! I am down to 2.5K on R3. I'm using 1 mH inductor and the Cree XPEBGR-L1-0000-00F02 LED. I will order some 1K resistors to see how low I can go. I would love to optimize the BOM slightly, the LED is the biggest contributor to cost. I guess it's the price to pay as the brighter LED's translate to higher efficiency/savings at low power? My use case is for nighttime to prevent smashing into something in the bedroom. Will make great gifts! |
cool. what frequency are you running them at, and what's the current draw? if you can put a scope on the led/inductor, i'd be very interested to see the waveform there. the current pulses must be very short and low |
Here's my
I've got a 1K resistor for R3 now and I think that's what I will go with. |
If you want me to mail you one, happy to do so just let me know |
I'm trying to get rid of flicker which happens in the lower half of the brightness options for my specific hardware.
I've been trying fairly unsuccessfully to make this happen in software. The closest I've gotten is setting PWM1 phase to 2, which then makes everything really really dim. Which is almost what I want, but then really cuts down on the range I can choose.
Any tips on how to do so would be apprieciated.
The text was updated successfully, but these errors were encountered: