Friday, August 21, 2015

New Instructable

I put up an Instructable on the raygun, mostly to collect the basics of the build in one place. And it got an editor's pick.

I'm of two minds about that. My first reaction is the world is being unfair in my favor. I look at the other work people are doing, and I look at all my mistakes and my sloppy, unhelpful Instructables, and I'd say pick someone else to honor.

But then I did a search for other people doing AVR projects. And a lot of good work, but it is odd that so far every single LED fader project I've seen continues to use power darlingtons as switches (well, sometimes MOSFETs), and usually resistors as current limiters, and the clock-cycle hog of Arduino's digitalWrite() function when doing software PWM (instead of direct writes to the port). And nary a one of them includes a gamma function.

Okay. I've seen a better gamma; I'm using a crude, hand-drawn look-up table. I've seen someone who calculated it properly -- and if running on a fast enough processor, you can do the calculation on the fly. My current gamma table is also hand-optimized for "Piranha" RGB's and doesn't look right on the 1- watt-and-up "cree"s.

Also, I'm probably the only person crazy enough to calculated fractional changes using a long INT, allowing a single gradual fade from one specific color mix to another. (Which makes the key line a rather daunting "if (gamma[BYTE(long INT)] == PWM_clock)) ...")

No comments:

Post a Comment