Cost-effective, versatile encoders for a range of applications