For light our light filter we need to have RGB LEDs that are controlled via 50% duty cycle 1kHz square wave from arduino micro controller.
Since there are 4 RGB LEDs connected in parallel they draw a lot of current that is given by an external source. We decided to try controlling switching on and off with a mosfet to have 0 current from controller. The issue is that all of the 3 colors share same ground, so whenever one of the mosfets "opens" they all turn on, while we would want only, for example, RED to light up on all 4 RGB LEDs.
If we try to position mosfet before the LED then we are able to select which LED to light up, however the current is significanly smaller (from 20mA drop to 3mA). And also flunctuating Vgs.
For the circuit on the picture Vcc is connected to resistors and is 5V or 7.4V (we can power it from 2 different batteries), Voltage at gate is 5V, Source connected to ground. There are 3 Mosfets corresponding to each color. Voltage drop across RED is 1.9V, Green and blue 3.3V
The question is what would you suggest as the most elegant and simple way of being able to controll LEDs independently and is it possible at all if the LED shares the same ground.