WARNING: The circuit in this post involves dangerous voltages. You must observed safety precautions. Never touch the circuit when the power is applied. If you are not experienced in high voltage electronics do not attempt to build this circuit.
POST ISSUE 3 of 2017_02_07
Hi Zeox,
Below is the schematic for a constant current LED driver:
NOTES
(1) The circuit above will drive a constant 24 mA into one single LED unit.
(2) The two LED strings shown on the schematic represent the innards of one of your LED units.
(3) Constant current is a technical term and does not mean that the current will always be present but the circuit will ensure that each LED string in the LED unit will get a constant current and longer during each half cycle of the mains supply.
(4) The circuit will provide a constant current irrespective of the mains voltage variations, within limits of course.
(5) The constant current is defined by the formula, Ik = 0.6V/R2, where Ik is in Amps and R3 is in Ohms.
(6) The NMOSFET will get warm so should be in free cool air. A heatsink is advisable.
(7) The NMOSFET is a high-voltage, low-threshold voltage type- no other type of MOSFET should be used without checking with the designer.
(8) There are safety aspects to the circuit and the fuse must not be omitted.
(9) Q2 can be pretty much any small-signal transistor but the higher the voltage, VCEo, the better. In addition to the ideal transistor (BC546) shown on the schematic, other transistors can be used: BC547/8/9, 2N2222, PN2222, BC337, BC182/3/4, BC107/8/9
(10) If you would like to drive more than one LED unit in parrallel with this circuit we can discuss how that can be done, but ideally one constant current driver for each LED unit would give the best performance.
DATASHEETS