Low-Cost CMOS Interface for Capacitive Sensors and Its Application in a Capacitive Angular Encoder