Position or speed detectors therefor