The application discloses a motor
assembly, a
camera module, an electronic device, a position detection method and device. The motor
assembly comprises a first shell, a photosensitive
chip arranged in the first shell, the photosensitive
chip being capable of moving relative to the first shell, the photosensitive
chip being provided with an imaging area, a position detection member arranged in the first shell, the position detection member comprising a second shell connected with the first shell, the second shell being provided with a
light transmission part, a
light emitter arranged in the second shell, the
light emitter being provided with an emitting port, a
diffraction grating arranged in the second shell, the
diffraction grating being located between the emitting port and the
light transmission part, and a pixel
unit group arranged in the photosensitive chip, the pixel
unit group comprising a first pixel unit and a second pixel unit, the first pixel unit being provided with a plurality of arrayed
first light transmission ports, the second pixel unit being provided with a plurality of arrayed second
light transmission ports, and the width of the
first light transmission port being smaller than the width of the second light transmission port.