Best way to get 12 V from 28 V or 5 V ?

If you know it draws 150ma you can try just puttin a 180 ohm resistor in series and that should work