Not exactly a full DIY just a quick $10.49 shipped solution. This post is more of a bookmark for future google searches, just trying to save some time for other builders. I'm sure most of you ES vets would have this sorted with quick rummage thru the 'ol junk drawer.
My Kelly Controller: KLS-7230S has an optional analog regen mode. It uses a 0-5v, 0-5k or 2-20k input.
I have a 12v system on my Bomber clone that has a headlight, turn signals, running lights, brake light and horn. I wanted to make sure the brake light also turns on while using the optional regen. not just with the mechanical brakes.
Found this little module that is perfect for this specific job. https://www.amazon.com/ELECTRONICS-SALO ... X9VGNYY6VZ
Supply with 12v from ignition, 0-5v brown wire from Bafang thumb throttle, switched output goes to 12v brake light. The module doesn't open the relay until it sees at least 2.5v. At least that what the specs say, I find it opens closer to 1.9v which is roughly <10% input on the thumb switch. I was worried about the 2.5v requirement but the fact it opens sooner is actually better as there is almost no play before the light is on.
Just be careful as the relay on board is a bit fragile. It is not meant for switching heavy current or high voltages.