Simple Rgb Pwm Led Controller
No microcontroller, just four opamps/comparators
Two things I really like are op-amps and minimalism, and because I haven’t found this circuit anywhere on the internet, I’m sharing it here. This circuit generates overlapping (more-or-less) trapezoidal waves, which, when used to drive an RGB LED strip, create a nice cyan-magenta-yellow transition. It’s all powered by a single 12V supply. The circuit should also work with just comparators instead of op-amps.
How it works
The part of the circtuit which alternates the colors is basically a loop of three inverting integrators, which behaves like a loop of three inverters with a lot of delay:
By connecting a (roughly) triangular wave instead of a constat
voltage to the + pin of the comparators, we can charge the
capacitors using PWM. The same signal used to charge the capacitors is
the PWM output. Simple as that:
I used two LM358 dual opamps for my prototype build, along with IRFZ44 MOSFETs, which are rather overkill for what I’m driving. The circuit works just fine, although it might need some adjustment of the intensities of individual colors. The generated waveform definitely does not conserve preceived brightness, which becomes obvious especially in darkness, but it’s fine for what I need.