RGB LED Control with Tunable PWM Signals

Опубликовано: 24 Июль 2026
на канале: Ruthsarian
1,010
10

How could one control the color of lightsaber from Galaxy's Edge?

The correct answer is to either build a new blade or gut an existing blade and use neopixel style addressable RGB LEDs controlled by a microcontroller running custom code. The Dead Bothans (https://www.deadbothans.com/) have done this and have instructions and code on their Patreon (  / deadbothans  . The #makerspace channel on the SWGE Discord server (http://swgediscord.com) has a pinned post with a link to instructions written by Wedge that expands upon what Dead Bothans have done.

Seriously, check those resources out rather than watch this video. This video is a rambling mess.

--

For some reason, and I have no logical explanation why, I want to try and preserve as much of the original lightsaber blade as possible while gaining more control over what colors it will display. One method might be to take over the signals that control the RGB LEDs in the blade with a second microcontroller. It could tap into the power rail that drives the LEDs themselves which is a power rail that is disabled once the blade is turned off, meaning the second microcontroller would not consume additional power while the blade is off.

This approach is probably not a good one. One reason being that clash animations would no longer work. Another is that the area inside the lightsaber blade base is so packed with electronics that fitting a second PCB in there isn't going to be easy. Then there's trying to take control of the PWM signals from the stock microcontroller which would require either cutting traces on the lightsaber blade PCB or removing the mosfets from the stock PCB and placing them on the second PCB with microcontroller and then running wires between the two. It's a lot of delicate work that's full of opportunity to destroy the blade.

I have another approach I'm going to try. One I started and abandoned many weeks ago, but recently decided to revive. I will continue towards my goal of a mostly stock lightsaber blade that produces custom colors, yet still behaves in a stock manner.

--

The PWM signal is at 60Hz because the timers in the ATTiny85 used for timing commands like delay() use the same timers that are generating the PWM signals. If I conclude I don't need to use the delay() (or related) functions, then I could increase the PWM frequency to something less likely to cause flicker with cameras, such as 6kHz which the stock lightsaber blades use.

A stock Galaxy's Edge lightsaber blade's duty cycle for single RGB colors (red, green, blue) is 100%, for dual RGB colors (purple, yellow) the duty cycle is 60%, and for all RGB colors (white) it's 50% for each color that is "on".