4 channel Light saber driver design, may the light be with you.

I just realized the tiny25/45/85 might not be able to do full 4-channel PWM. Wikipedia’s summary lists it as “2 x 2 (sharing 3 pins)” with a note attached: “4 pins are usable, but only 3 unique generators can be attached. The 4th pin would be the inverse of OC1B on the 3rd pin.”

So, if I understand correctly, it can independently operate channels 1+2+3 or 1+2+4, but not anything involving 3+4 unless I don’t mind them being inverted from each other. When one is on, the other is off. I think.

With a RGBA emitter, maybe I could set it up so that opposite colors (blue+amber) are on channels 3 and 4, since they should theoretically never be on at the same time. And then flip a MCU flag somewhere to tell it which one is active at any given time, on the assumption that I never want both active simultaneously.

Or perhaps only use 3 channels; a pretty full rainbow can still be made from just R+G+B.

Or maybe do RGBW in a way where it is either in a color mode or white, but not both.

Or maybe RGBA with red+amber on the shared pins, and a restriction that they must always have inverse power levels.

Or maybe try to use a tiny84, which has more channels (and more pins in general).

Or maybe do soft PWM on channels 3+4 (or just 4?), but that’s going to look a bit weird (especially on an e-switch driver) because the pulse lengths won’t be as fast or as consistent. Probably would work best on RGBW with soft PWM on white, which would make irregularities merely look like a shimmer.

I think I’ll probably have to test some ideas before I figure out what works. The simplest is to do only RGB.

Not capable of four independent PWM channels?

Oh… :weary:

Well, I’m sure you’ll figure something out. I’d be for using the blue and amber on 3 and 4 and never having them activated together. But, of course, it’s your light saber! :smiley:

Wait… Dr Jones driver definitely uses pwm on all four colors. I can infinitely adjust each color separately including white and yet blend them all to be on at the same time. So there must be a way, no?

Yeah, he uses a different MCU.

He uses the atiny85.

Sorry, I got my RGBW’s crossed… I was thinking of tterev3 for some reason, even though you said DR Jones. :person_facepalming:

Edit: The Dr Jones RGBW driver uses software PWM.

Ok. I wasn’t aware of the difference. Is software pwm an option for us?

Yes, if somebody writes the code. That would be TK in this case. :wink:

Ahh… So, TK…? :wink:

Or, maybe you could talk DR Jones into tweaking his firmware for this new board. He may do that for a decent price. But, an open source solution would allow us to carry it forward and make changes and tweaks to our liking and to fit future boards, etc.

I’ve been trying to get ahold of him but he hasn’t been around the forum for a while and I don’t have any other contact info for him. I would be willing to pay for a completed rgbw firmware that I could use on self built drivers. Idk if he would’ve good with that though?

His driver firmwares are proprietary code. But, he used to sell pre-flashed MCUs. I would think he’d be willing to make a tweaked version for a new board if there was enough demand. How different is your board from his self-designed RGBW driver? If it’s basically the same, or not much different, his code may already work for you. It would be nice if you could get in touch with him. But, like I said above, it would be even better if someone came up with an open source RGBW firmware that was as nice as DR Jones or tterev3 code.

Here’s the DR Jones firmware website.

Ya. For me, his existing firmware is great! If I had the choice I would change the mode to clicks configuration, but if I could get an MCU from him as, I would be thrilled. I have one of his drivers left and I plan on removing the programmed MCU to place on my own driver layout. I’m working on a multilayered driver to power 4 XML rgbw led’s as well as one xpg3 high cri led. It will control three banks of 7135s and one fet channel for the white. I’m going to parallel the xpg3 along with the four white dies. When testing, I can get 4amps to the xpg3 and 1amp to each white die when in parallel.

At first, I was planning on using an escutcheon modified BLF d80, but room was very very tight. I found a way to pack it in with a custom driver design, but I finally surrendered to the pk26 as a host. After receiving the pk26, I’m still not certain it will work out. Even if it never works out, it’s been fun thinking about a 40w rgbw pocketable flashlight. (40w for about 40sec that is :slight_smile: )

TK, if you want his driver board minus the MCU for testing, let me know.
(Edit: that is, dr jones driver board I am referring to.)

I found this instructable for software PWM. I’m not near versed enough to know what this entails, but the instructable gives a little hope for another good four individually addressable PWM controlled driver.

Wow! Thanks LightRider!

I would love to see some action here. TK? …Have you got anything to report? …TK? …Anybody?

I got kind of ninja’d by other parts of life for a few months.

Also, um, I don’t actually have any driver boards to print and build. Texas_Ace, do you have these up on oshpark? I didn’t see the saber driver listed there.

I never heard back from you on weather it was ok and what you wanted so I didn’t bother uploading it in case it needed changes. lol

If you think it will work for you I can upload it.

I think it’ll probably work. If you’re willing though, it’d also be nice to have one with a pin and pad for an e-switch instead of the voltage divider. I think I can probably use the inverted VCC method for measuring voltage, and an e-switch likely makes the interface easier to navigate.

Or I could maybe use the 4th PWM pin for an e-switch, and use only three colors. I’m not sure how much value there is in adding a 4th color channel, and it should be fairly easy to stick the switch wire into one of the vias on pin 2 or 3.