I'm building a rheometer to measure the viscosity of liquids. I'm using a 4.5-10v DC motor which needs to be accurately controlled by a Raspberry Pi (the speed and torque must scale, so PWM is out).
I have been trying to control the motor with a 10k digital pot (MCP4131) in a voltage divider with a transistor to control the voltage through the motor.
In theory, the voltage should (as the pot sweeps through its range, 129 steps) vary between ~2.6v and ~10.5v.
In practice, the voltage only varies between ~7v to ~5v, reaching its minimum after only ~25 steps and then staying constant for the remaining 100 or so steps.
What is going wrong? Is there a better way of doing this?
This has been the bane of my life the last few weeks, any help would be greatly appreciated. If anything is unclear I will clarify as best I can.
EDIT: MCP3141 -> MCP4131