Need help dimming driver

I have a automotive light bar which runs from 8-40v input which i will me using on my DH bike on night runs. i have for the time being replaced the 4 leds with nichia 219b and given it a current bump via the sense resistor. its at a good output but ultimately i really want it to have some sort of dimming as i don’t want to blind oncoming motorists when i get to a road. i may upgrade with some XPL-HI but thats down the track for now my question is it possible to use the sense input on the IC to dim the output via a pot or something. basically vary the voltage reference as is done with a resistor change, but make it variable? I have included a link to the data sheet

http://www.xlsemi.com/datasheet/XL3001%20datasheet-English.pdf

The feedback (FB, called CS in the datasheet) reference voltage is 0.21V, it’s a bit high to call that a led driver, and it doesn’t have any current control, which is the issue here.

I don’t think you can change the sense resistor value with something like a potentiometer since it’s a low value. What you can do is offset the voltage at FB/CS as described in this Article (figure 8), with a voltage reference (like from an LDO) and a potentiometer to modify R1 and/or R2. When R1 decreases compared to R2 it will effectively decrease FB (FBnew) thus reducing the current sense voltage and so the current.

You’ll notice that the relation is not linear so better use a log pot, even then you probably won’t have precise control at lower than 1:10 dimming.

ok thanks, ill give it a go and see what happens.