Go Down

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

Petit-Jean

I really need help: I am drowning in information on summing amplifiers, current sinks, OpAmps, transistors etc.

I have:
- 1V AC signal in 10kHz range.
- 3 low-frequency PWM (500Hz range) channels (from arduino) that drive a rgb LED

What I need is:
- splitting the 1V ac signal over the 3 leds.
- If (and only if) a led channel is high (from the PWM), then the current should be 'modulated' by the 1V ac signal. (so that the luminosity varies with 10kHz)
- current thought LED should be 0 when PWM is low

The rgb LED module has built-in resistors (set for 5v supply) and has common ground.
that is why I thought something like this could work.

I tried something like this in circuitlab but don't see good results


Any tips appreciated!
Many thanks in advance

kapelan

I think you are looking for a transistor switch between PWM and Vin of your amplifier.
So this switch allows or blocks the signal from a second source.

dc42

Are you just looking for on/off modulation of the LED current at the input frequency? If so, just pass the input signal to a comparator to amplify and square it, then use an and-gate to combine it and the PWM signal into a drive signal for a mosfet switch.

If you are looking for linear modulation at the input frequency, then one option is to include a diode gate between the output of your op amp and the mosfet gate. Connect the cathode of a small signal diode such as 1N4148 to the op amp output, and connect the anode to the mosfet gate. Connect another diode, cathode to PWM output and anode to mosfet gate. Add a 1K resistor from mosfet gate to +5V.

If your mosfet has a particularly low gate threshold voltage then you may need to use Schottky diodes such as BAT43 or BAT85 instead of 1N4148.
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.

Magician

Quote
What I need is:
- splitting the 1V ac signal over the 3 leds.
Based on what properties?
Quote
- If (and only if) a led channel is high (from the PWM), then the current should be 'modulated' by the 1V ac signal. (so that the luminosity varies with 10kHz)
- current thought LED should be 0 when PWM is low

Led could blink with 10 kHz speed, but you would not notice any difference, if it 10 k or 500 Hz. 

Docedison

As Magician pointed human persistence of vision will blend any light blinking faster than about 25 Hz into a steady light stream. a 10 KHz signal would only mask any PWM control signal that is present.

Bob
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Go Up