Encoders with energy harvesting technology