RGB LED Controller

Thread Starter

iONic

Joined Nov 16, 2007
1,662
The one question I have, and I think I know the answer already, is...can I get by with just one 555 instead of three? I think I can, given the frequency does not need to be adjusted independently. Yes, LM339 Pin 3 to VCC & Pin 12 to GND. Oh, and YES, original circuit from Wendy(I believe).

PWM-FF-VDC.JPG
 

danadak

Joined Mar 10, 2018
4,057
Are you capable of using UP ? Writing some simple C code ? This is
a natural for ATTINY85 or PSOC or Microchip, do everything inside
one chip, including all the timing.


Regards, Dana.
 
Last edited:

danadak

Joined Mar 10, 2018
4,057
This is another natural for ATTINY85 or PSOC. Below is example where a user
created a custom component using chip internal resources. This could have
been done with standard catalog of onchip resources, using 3 PWMs, but
doing the custom approach minimized internal HW needed. Very efficient.

This is one chip, low end, except for R's and LEDs.

You would write code to control the PWM values to control the mixing.

Project attached.


Regards, Dana.
 

Attachments

Thread Starter

iONic

Joined Nov 16, 2007
1,662
Are you capable of using UP ? Writing some simple C code ? This is
a natural for ATTINY85 or PSOC or Microchip, do everything inside
one chip, including all the timing.


Regards, Dana.
I knew you'd show up here! But I welcome it as this is a logical solution to this type of design. I have some opensource code that does the Duty-cycle adjustment, but I think the freq is set too low(IMO) for lighting applications.

I will read up on the Op-Amp relaxation oscillator though. Sounds interesting.
 

Attachments

Thread Starter

iONic

Joined Nov 16, 2007
1,662
Something like this? Not sure how to vary the freq. aside from varying R1. But R2 & R3 have effects of freq. also
ro.JPG
 

Marc Sugrue

Joined Jan 19, 2018
222
Something like this? Not sure how to vary the freq. aside from varying R1. But R2 & R3 have effects of freq. also
View attachment 169289
The resistors and capacitor will affect the frequency theres a example here which may help. Read the notes also as it attempts to clarify things.

http://www.analogzoo.com/2015/01/relaxation-oscillator-design/

Using their equation f=1/(2×R1×C1×ln((1+k)/(1-k)) you can calculate the frequency. Alternatively if you have a frequency in mind then pick a value for R OR C and calculate the unknown

R1 = 1/(2×F×C1×ln((1+k)/(1-k))
C1 = 1/(2×F×R1×ln((1+k)/(1-k))

Where k=R2/(R2+R3)

As a start fix k by using some 10k for R2 & R3 as their example

All circuit references are from their example

Note that if there was a symeretrical negative rail the equation simplifies a little
 
Last edited:

Marc Sugrue

Joined Jan 19, 2018
222
I don't think that will work with a comparator instead of an op-amp. It needs a pull-up. The link in the post above shows the adjustment to use a comparator.
I completely agree, I'd assumed the chosen comparitor had a internal pullups as that is how it was being used in the original circuit.
So iONIC to clarify the comparitor you are using is what's known as an open collector and needs a resistor between the output of each channel and vcc to give any signal. Alternatively a op amp with reasonable slew rate would also produce the desired effect.
 
Top