I’ve just published this article showing the difference between Analog and PWM light trails when performing light panting photography using an RGB flashlight - Antsonamelon RGB Critter BT. The article includes a few photos showing the difference between these settings.
Nice compararion, awesome!
Do you know the PWM frequency of the light?
Analog is definitely something I want as a goal if I ever make a Hue Driver upgrade
when a flaw becomes a feature…
I don’t have the equipment to test the PWM (my Opple 3 doesn’t work well with RGB lights).
The driver tech is a bit of secret, but I think the Analog driver may still use PWM but at a very high frequency.
Very true. The RGB Critter having both PWM and Analog options is very useful.
I wonder if you get a similar fronds adapter for Anduril 2 based lights…The “strobe” and “party strobe” modes are adjustable in frequency, and the multi individual colors, but not sure about the max brightness…
Interesting, I’m thinking if 31khz would still be visible on photos… and it’s not that complicated to have this selectable ![]()
But this is max I can get with an attiny85
I’m pretty sure 31kHz would not be visible. I can’t see any PWM in light trails with the Convoy S2+ running Biscotti which I think is 9/18kHz.
Nice!! I may be able to get 31khz, 3.9khz, 488hz, 122hz and 30hz
The slower PWM rates sounds pretty fun, will test this soon!
It worked! Had to increase the MCU freq to 8mhz but now it goes from 8x faster to a ridiculous 30hz PWM (:
I’ll update the Hue Driver thread
Yeah, usually people can’t see more than 10 kHz or so… though it can still sometimes be detected visually if you have a very thin edge illuminated and it is moving very quickly. I generally try to run things as close to 20 kHz as possible, since that is neither visible nor audible. Above that is overkill.
Of course, constant current is usually preferable… but constant current drivers are harder to make.
I’ve tried to ensure most of my firmware is compatible with the needs of light painters, and have sought feedback from stephenk in particular a few times. However, that isn’t the primary purpose of most of what I make, so light painting is a secondary priority. A dedicated device made specifically for it will typically work better.
I had a lightsaber project which was designed more along the lines of what a light painter would need… but I haven’t been able to get any hardware vendors to actually produce it, so the project didn’t get very far and hasn’t been touched in years. Would love to revive it someday though, and get it into actual products. I built it so the user can design their own colorful lighting patterns, in a manner similar to designing sounds on a synthesizer. Like, combine basic waveforms in a variety of ways to produce a “patch”. Then build a small library of patches to use for different lighting effects.
If developed further, I think it could be pretty neat. But my early prototype had some pretty big limitations that I’d want to fix. Most notably, I was only animating at about 60 fps, which was nowhere near fast enough. In a new version, I think I’d want to increase it to 1000 fps for smoother effects. (it’d be ~20 kHz PWM or constant current, so no visible pulsing… but could change color 1000 times per second for smooth fades and a variety of slower pulsing effects)
Thanks for the information and reasoning around the 20khz number!
But for a attiny85 running 3 channels, I don’t have intermediate options between 4khz and 32khz so I went overkill as default.
At 4khz the noise was really annoying if anything was not well tight.
I never saw any PWM with my own eyes though…
I may be weird, but I find 4 kHz PWM hard not to see. It’s slow enough to see individual frames when I’m not looking for it.
To give a better idea, I managed to get pictures which show how a couple of PWM speeds appear to me by eye. The first is at 488 Hz, and the second is at 4.5 kHz. (edit: 488 Hz, not kHz)


On attiny85 I generally use 15.625 kHz. 8 MHz clock, 512 cycles per pulse, 8-bit PWM in phase-correct mode. Fast PWM mode is twice as fast, but you can’t fully turn the LEDs off or turn them all the way on. It always does a pulse, even at level zero, and it always turns off for a moment even at level 255. But phase-correct has neither of those issues. The 8-bit resolution isn’t great, but you can increase the effective resolution by using a hybrid of PWM and DSM (delta sigma modulation). Basically, it’ll oscillate between the 2 closest levels and the averaged result has an in-between brightness. Examples are in the Anduril repository.
I used attiny85 with 4 channels in my lightsaber. One channel each for red, yellow, green, and blue. But the 4th channel needed software pulse control instead of hardware PWM, because it doesn’t have a 4th channel built in. So the yellow channel was a little glitchy at times. Timing was jittery. For anything new, I’d recommend a newer MCU too, like avr32dd20.
surely…
For sure!
I only picked attiny85 because I knew I would be able to hand solder those and I was already familiar with reflashing attiny13a drivers ![]()
Hue driver was my second PCB attempt, now that I reflowed some ADXL335 in LFCSP-16 package I definitely would consider a more modern MCU.
Getting some more PWM bits would be awesome!