Driver to convert 120V AC light to DC power?

I dug up this old thread by searching for a suitable solution for my project. I want to use a battery pack made for garden tools (Greenworks “40V” >>nominal 36V –10s 18650 configuration) to power a >20W COB (e.g. 50W) with ~32V. A constant current buck converter for 1.5 to 1.75A would probably do. Any hints for a driver I can use? It has to be ready for about 42V DC input and more than one mode (current wise) would be nice.

Use a constant current LED driver: https://www.meanwell.com/Upload/PDF/LDD-H/LDD-H-SPEC.PDF - it's designed specifically for your use case.

Fairly cheap (about $10), compact, and comes in through hole or wired packages. The LDD-1500H is probably what you want, with 1.5A regulated output, 46VDC input max, and uses PWM for dimming.

https://www.digikey.com/product-detail/en/mean-well-usa-inc/LDD-1500HW/1866-3100-ND/7704734

You can run it at full 1.5A, or generate your own PWM using a 555 circuit or a simple microcontroller. Keep the PWM to at most 1kHz as per datasheet recommendations.