If it is AC you actually need a full wave, 4 post, AC to DC diode rectifier (part # gbpc2506 - 600v/part # kbpc5010 - 1000v or equivalent) and a 2200uF (microfarad) capacitor to filter out the flickering that is imminent. I did it on a snowblower so I could run more lights and not stress out the stator but honestly by the time that's all said and done it's probably cheaper and easier for you to get a small cube of a 12v battery, a fuse, some wiring and make a standalone system. If you get a low wattage led the battery will last a good while before it needs a charge