I am building a rover and would like to power the Raspberry Pi and the Motor HAT with the same power source.
I want to use a 2500 mAh LiPo battery for a long play time. My DC motors work at 6V-9V.
How can I do this?
You will quickly face 2 problems : voltage and current.
Voltage You battery produce 3.7V, the Raspberry use 5V, your motor 6-9V. You will basically needs two DC-DC step-up voltage converter to produce 5V and 9V from 3.7V.
Current Now let's look if your supply provide enough current : The raspberry pi3 needs 2.5A at 5V and the converter is said to have a 95% efficiency.
We can see that one battery is already not powerful enough for the raspberry (1.75A instead of 2.5A), so powering a motor on the same battery won't just work.
I don't know how other people solve this case, but you can look for lighter hardware that would limit the need of power (arduino ? rpi zero w?), or for bigger batteries.