DC Motor to act as a Servo (with PID)

Hi all,

I would like to replace a servo in an old project I did a while ago, mostly for two reasons: it’s not cheap (it’s a 270° servo) and it’s way too loud for me.

The idea is to replace it with a DC Motor (with a build-in encoder for position feedback and PID).

At the moment there are 4 push-buttons (each button is a pre-set position, in degrees, for the servo).

Can I achieve exactly the same thing with a DC Motor + PID + Encoder (for example going from position 4 to position 2 and viceversa) or I must use a real servo motor?

A DC motor + PID + encoder is a real servo motor - you've closed the loop. Getting it to work well is
the difficult part.