Dim a led; light for bike

Hey there,
so I recently build this usb-pd powerbank from greatscott (maybe you know him)...
Because my bicycle has not light and I have a SmartArray Q12 neutral white LED-Modul laying around (I dont even know why) and now also this powerbank that I could use, I would like to create a DIY bicycle light with an arduino. The led runs with 9V and up to 12 W, the pcb from the powerbank can output up to 18 W, so that's absolutley fine I think. But I would like to dim the led(for example when the bike is just standing the led should be darker and when I drive the bike the led should get brighter) and the datasheet says: LED is dimmable, but I don't know how to do that :frowning:

Does anyone has an idea?

Thanks!

There are two ways to dim this LED (as is essentially the case for all bare LEDs); either you drive it with a lower current, or you use PWM to switch it on and off at a rapid rate (several hundred Hz) for a varying proportion of the time.

Now lest you be confused by the datasheet, you need a constant current driver to determine the current at which you operate it, the voltage specifications only tell you the approximate voltage at which this constant current will be applied.

And for 8 V, you need a switchmode converter to provide that constant current drive efficiently in order to minimise both heating of the equipment and maximise battery life. The board you have may be able to be adapted to do this as it appears to have the ability to control voltages up to (nominally) 12 V and limit current. Otherwise you will want to find an alternate module specified for the purpose to work with your 18650 battery bank and forget the current module (other than to charge the batteries) as it makes no sense to operate two boost converters in series.

Once you can provide a constant current drive, then you can arrange to set alternate current limits on it to achieve dimming. You cannot (practically) use PWM on a constant current driver (unless it is specifically designed to do so, which is uncommon).

Ah thank you so much! So what should I really use? I would to use the variant with lower current, but is there a current driver where I can lower the voltage with an Arduino?

Thanks