Robotics Q. Arduino, Raspberry Pi, or Both?

I’m using a 12V DC car seat motor, a VNH2SP30 motor driver, and an incremental rotary encoder to move a lot of weight repeatedly back and forth. The motor is drawing 3A, and as it goes through its motion, I want to PWM it with 6V, then speed up to 12V as it goes along its rotation because 1: I’d like to smooth into the motion, and 2: as the motor turns, the weight of the object in motion increases, resulting in the motor needing more power to maintain constant speed.

I’d like to do this by keeping track of the motor rotation using the encoder, and adjusting the voltage out to the motor, to keep the motion continuous and smooth when it needs more power.

That seems like a lot to keep track of with just Arduino. Recommendations? I have some experience in Raspberry Pi, but I’ve never used it with motors, or am I just being overly cautious and should I develop this in Arduino?

What you are after is called PID control.
google arduino PID
There is a lot of info and projects you can research for your purpose.

Hope it helps.. Tom.. :slight_smile: