I can't really visualise the mechanical side of your setup.
What is it you're moving?
What range of angles are you moving through and how precisely are you trying to position it?
Taking account of whatever gearing you have, how precisely are you trying to position it in terms of motor revolutions?
Is there any significant mechanical inertia or friction in the system?
Once it's achieved the target position, does it need any sustained output from the motor to stay in position?
I attached a picture of the two different styles of motors that represent what I am working with. Currently I am experimenting with the smaller one which uses a potentiometer for position feedback. The pot is a continuous turn type. I have it connected to the A0 pin of the arduino and I am scaling that down to 0-255 for position.
The motor is being controlled through it's original H-Bridge, which is a 6 transistor H-Bridge (Mark Tilden Style). It has two inputs, FORWARD and REVERSE. A high on either will move it in that direction. The supply for the motors are 9v. There are resistors limiting the current that can go through the H-bridges.
As for precision, I would be happy with just 32 positions, in multiples of 8. That would match the original application. It does not have to land exactly on the setpoint, though future applications of the same code may need more precision. We aren't doing CNC style stuff, just moving facial parts.
I do not know the gear ratio. I'm sure it will be different for the different motors. Range of motion for this one appears to be around 90 degrees before the pot goes out of limit.
I don't know if I would consider it significant. I think the H-Bridge is really the limitation here.
No, it does not need to hold it's position once it reaches it. Not at all. The mechanisms have enough leverage that they do not move once they are in position. Two of the motors do have spring returns, so moving those would move them from a center position and they would spring back once you remove power. They were designed that way.
The main problem seems to be that the PWM cannot accurately control the H-Bridges. I really don't need "PWM" proper. Just something that will slow the motors down as it reaches position so it can stop semi-accurately.
In early experiments I used proportional control. I used delays to move the move the motors, paused, checked position and compared, and continued to move if they didn't match. I actually had decent results with that, but the delays are a problem and the motors had a stepper feel to them. It was not smooth as you can imagine.
What I really think I need is a control system that determines the magnitude and sign of the error, determines how long to just run the motor before it checks it again, and starts throttling it down as it reaches the position. But not so much that the motor just whines instead of going the last little bit. And something that when it reaches zero (or a +- range of error) that it simply stops and moves on.
In real application, all of the motors will be refreshed about once every 20ms, so if they didn't make it to their position yet, they will just continue on the next refresh or if a new position was given in that time, it will just move towards that. I don't need something constantly adjusting the motors to hold them. That is why PID in it's normal form doesn't seem like what I need. But I cannot find anything about other types of control schemes at all.
Some motors may take up to 800ms to complete a movement from one extreme to the other. The majority will be very small movements that only take a few ms to complete.
I attached a picture of what I am trying to control.