If it's a one off that you are making, you can purchase a buck controller. Basically it PWM's to a desired voltage output and has active feedback to maintain that voltage. You will need filtering at the output with some caps / inductors depending on the current draw you have.
I have made my own using opamps (oscillator and feedback) to supply 5v. So I can run my motors from the main 12v battery and pwm down that voltage much more efficiently to my desired 5v for MCU, display...etc. Filtering caps and inductors are a must.
Nick
Bookmarks