Powering 10V motor fader in Raspberry Pi 4 project
You could do either way. If you have a 10/12V source readily available it's easier that way. DON'T connect it to the 5V rail of the pi to avoid magic smoke. You only give it to the VM rail of the motor controller. If you have 12V I'd recommend to use PWM or a suitable resistor to pull down the voltage on the motor to 10V, it will last much longer.
You can build/buy a suitable converter to make 10V from the 5V rail, subject to power requirements: 1A at 10V needs a little more than 2A from the 5V rail, do not overload your power supply! Look for &quot;boost converter&quot; &quot;stepup converter&quot; or even &quot;buck-boost converter&quot; and check for the ratings.