Regenerative DC motor drive, serial interface, torque control

Does anyone know of a DC motor drive (brushed or brushless, don't mind), with a serial interface and torque control mode? Ideally looking for something about 50VA rated.

"50 VA"
Do you care if its a 50 volt 1 amp system or a 7 volt 7 amp system or 1 Volt 50 amp?
All are 50 Volt-Amperes?
Some rc esc might offer a regenerative braking, otherwise look at ebike controllers. They need to be pretty robust to handle the regen.. ( the battery too). A lot of controllers are by nature regenerative ( by reversing the bridge when under forward motion).

No, I don't really care - I'm happy to select motors and power supply based on the drive capability. Something like 12V 5A would be most convenient, but not as important as the other requirements.

I also don't really care about weight, efficiency or position sensing - it's for a fixed, mains-powered application and we're almost certain to attach an external encoder anyway.

Maybe something like this

Pololu - RoboClaw 2x7A Motor Controller (V5).

look for that type of specification.

Yes, I saw them. They have every control option under the sun - except for torque control. I wonder if it'd be possible to fudge torque control through continual changes to position control and acceleration limits? Might well be able to get near enough for our purposes, anyway.

Any ideas on brushless motor control? I guess we could use the adafruit motor shield V2 and an encoder (which, as I said, we'll be using anyway) and programme it ourselves - might be the easiest way through this.

What kind of mechanical load are you driving with the motor?

Here is how I understand it.

With PWM full voltage is always applied at varying duty cycles.

The motor will operate at its maximum speed for that duty cycle. By monitoring the current with a shunt resistor the arduino can adjust duty cycle which will adjust the speed depending on the changing load in order to keep a constant average current.

You could use an encoder for closed loop speed control. This would again use the arduino to change the duty cycle to maintain a desired speed and will vary the current in the motor to do that. The current will change depending on the mechanical load.

By monitoring both you can have a motor draw a limited current up to a limited speed. In the end all that changes is the duty cycle in any case.

Both are not difficult to implement. Something needs to act as a brain however so with any motor controller will need some type of feedback and logic device (like a arduino) to do this.

For torque control you need current sensing and a feedback look to maintain the
current to match the desired value. Most motor drivers just do the driving bit,
although some have current sense resistors and outputs. You may well have to
implement the feedback loop yourself.