Go Down

Topic: Mixing and splitting signals: PWM RGB led (Read 1 time) previous topic - next topic

Petit-Jean

thank you very much for the replies!

@dc42: I do not understand your description of the diode gate circuit. Simulation doesn't give expected results. I will research it later though.

The PWM part is for visual purposes,
The analog/linear signal part is for information transfer.

The PWM is kept at 500hz so that the high-time can carry several wavelengths of signal.
The picture below is not correct because the signal's relevant portion has shorten wavelength, but the principle stays the same

I have added a sketch that includes the elements I want to mix.
I thought that the ground connection of the 3 combined leds would be the best location to do the linear modulation; that way i don't have to use 3 times the components.

I have managed to understand the Opening Post circuit, and got it to work.

I also understand that when i replace the the constant voltage supply of the leds with PWM, something terrible happens in the low-time of the PWM. Loosely speaking: The OpAmp tries to keep the + and - at the same voltage, so it drives the MOSFET to infinity/maximum because no current can be drawn from the 0 volt PWM low-time.

Petit-Jean

I've researched a lot since the last post, but i still have no solution.

What i like to know is: how can i switch on and off a current sink?

Or can someone give me a simple circuit that will do a precision current sink on a 3 channel PWM'd RGB led?

Last idea is as follows:
- simple current sink
- current drawn through mosfet is between 10 and 20 mA
- above the mosfet the 3 lines of the 3 RGB led channels come together
- the 3 channel are supplied by 3 PWM channels
- the 3 PWM channels are also tapped to go to a 3 channel diode gate
- When all 3 channels are low, the current sink is shut off; 0 mA is drawn through the mosfet

But that last line seems to be hard. Have tried a lot, googled a lot, no real success thusfar.


Many thanks in advance!

dc42

1. Can you confirm that your RGB LEDs are common anode, so what you want is 3 current sinks?

2. How precise do you want the LED current to be? Using comparators driving mosfets is certainly a possible way of doing it, but for LEDs the current is not very critical. It's more usual and simpler to use a 2-transistor or a 1 transistor + 1 mosfet circuit, although the current regulation will be slightly sensitive to the transistor temperature. Or you can use just a transistor and a series resistor.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Petit-Jean

RGB led is common cathode
(COM port on multimeter is common, or GND is common)

dc42

OK so you need current sources, not current sinks. How precise do you want the current regulation to be?
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up