Author Topic: How would you make RGB leds fade into each color?  (Read 1750 times)

0 Members and 1 Guest are viewing this topic.

Offline not1xor1

  • Regular Contributor
  • *
  • Posts: 237
  • Country: it
Re: How would you make RGB leds fade into each color?
« Reply #25 on: March 08, 2018, 07:39:42 pm »
but the subject does not require a mere randomness, but a slow fade effect

So? Many chaotic functions are continuous and it's easy enough to pick time constants that are 'slow' in terms of human perception.

ok... you are right
what kind of circuit would you suggest?
 

Offline Cerebus

  • Super Contributor
  • ***
  • Posts: 3341
  • Country: gb
Re: How would you make RGB leds fade into each color?
« Reply #26 on: March 08, 2018, 10:41:06 pm »

what kind of circuit would you suggest?

To quote myself:

I'll leave it to someone who's looked at chaos theory more recently than me to come up with a suggestion.
Anybody got a syringe I can use to squeeze the magic smoke back into this?
 

Offline not1xor1

  • Regular Contributor
  • *
  • Posts: 237
  • Country: it
Re: How would you make RGB leds fade into each color?
« Reply #27 on: March 09, 2018, 04:16:30 pm »

what kind of circuit would you suggest?

To quote myself:

I'll leave it to someone who's looked at chaos theory more recently than me to come up with a suggestion.

I did not know anything about that kind of circuit, but from a quick search with google I got the feeling they are a bit too complicated.
I think it would be easier to produce a sort of fake randomness by just driving the PWM comparator with the sum of multiple schmitt trigger oscillators.
 

Offline Beamin

  • Super Contributor
  • ***
  • Posts: 1140
  • Country: us
  • Now with 50% more estrogen! Testosterone Free!
Re: How would you make RGB leds fade into each color?
« Reply #28 on: March 10, 2018, 06:38:19 am »
if it were not for the tolerance of the components that circuit would produce just a fading white light
by changing the value of the resistors (e.g. 68k, 100k, 150k) the light color would change more frequently
You are right. It depends on the component tolerances to change colour. Standard 10% capacitors will result in a fairly long colour change cycle. There will also be an element of randomness, due to the components' values drifting. Different values could be used for each circuit, to speed up the colour changing. It depends on the desired effect.

That would fit in two eight pin dips? That's an analog circuit right?
1) You didn't state that was a requirement. It's not possible to do it with two 8-pin, non-programmable, generic ICs. It's possible to modify my circuit to use an 8-pin and a 14-pin IC. Use an 8-pin, triple Schmitt trigger IC, such as the 74HC3G14 and the spare comparator on the LM339, as the high frequency Schmitt trigger oscillator. The downside is, it would require more resistors and the 8-pin part would be SMT, as it's not available in a through hole package.
https://assets.nexperia.com/documents/data-sheet/74HC_HCT3G14.pdf

2) What do you think?
Not really an requirements just a circuit I was considering building and I try to stay away from surface mount since I don't make PCB's. I have the boards and HCL H2O2 but not a inexspensive way to etch them. No free spending money at the moment and I don't have room for a laser printer although I do have an inkjet. Thats why I like through hole things.

So how does that circuit work? How does it vary the legth of the pulses or saw tooth waves? The part I can't figure out is not how to make a pwm signal but how you can vary the duty cycle automatically while each partof te circuits waits its turn while te other colors are lit.. '
One part of the circuit doesn't wait for the other. It's three separate low frequency saw tooth generators, controlling three PWM circuits. Due to component tolerances, the saw tooth generators will drift out of phase, causing a LED to light a variety of different colours.


So that circuit would break SPICE if you put it in it? The first time I used SPICE I built a multivibrator and it crashed. I quickly realized that in theory that circuit would never get started. In practice it almost always will. Are there any other spice killing circuits like things with perfect left right symmetry?
What happened to ODE TO SPOT by Data? Seriously I don't remember changing it.
 

Online Hero999

  • Super Contributor
  • ***
  • Posts: 11279
  • Country: gb
Re: How would you make RGB leds fade into each color?
« Reply #29 on: March 10, 2018, 10:09:01 am »
if it were not for the tolerance of the components that circuit would produce just a fading white light
by changing the value of the resistors (e.g. 68k, 100k, 150k) the light color would change more frequently
You are right. It depends on the component tolerances to change colour. Standard 10% capacitors will result in a fairly long colour change cycle. There will also be an element of randomness, due to the components' values drifting. Different values could be used for each circuit, to speed up the colour changing. It depends on the desired effect.

That would fit in two eight pin dips? That's an analog circuit right?
1) You didn't state that was a requirement. It's not possible to do it with two 8-pin, non-programmable, generic ICs. It's possible to modify my circuit to use an 8-pin and a 14-pin IC. Use an 8-pin, triple Schmitt trigger IC, such as the 74HC3G14 and the spare comparator on the LM339, as the high frequency Schmitt trigger oscillator. The downside is, it would require more resistors and the 8-pin part would be SMT, as it's not available in a through hole package.
https://assets.nexperia.com/documents/data-sheet/74HC_HCT3G14.pdf

2) What do you think?
Not really an requirements just a circuit I was considering building and I try to stay away from surface mount since I don't make PCB's. I have the boards and HCL H2O2 but not a inexspensive way to etch them. No free spending money at the moment and I don't have room for a laser printer although I do have an inkjet. Thats why I like through hole things.

So how does that circuit work? How does it vary the legth of the pulses or saw tooth waves? The part I can't figure out is not how to make a pwm signal but how you can vary the duty cycle automatically while each partof te circuits waits its turn while te other colors are lit.. '
One part of the circuit doesn't wait for the other. It's three separate low frequency saw tooth generators, controlling three PWM circuits. Due to component tolerances, the saw tooth generators will drift out of phase, causing a LED to light a variety of different colours.


So that circuit would break SPICE if you put it in it? The first time I used SPICE I built a multivibrator and it crashed. I quickly realized that in theory that circuit would never get started. In practice it almost always will. Are there any other spice killing circuits like things with perfect left right symmetry?
If you want to simulate the classic two transistor astable, then use slightly different values for the resistors or capacitors and it will work perfectly.

If you simulated, the circuit I posted here, you'll find it will oscillate, but PWM to all the LEDs will remain the same, so there would be no colour changing. Again this can be fixed, by using slightly different values for the RC circuits in each oscillator.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf