Patent attributes
An exemplary lens module includes a barrel, a holder, an optical assembly, an image sensor, at least one permanent-magnet, a number of electromagnets, and a control unit. The barrel is threadedly engaged in the holder. The barrel is capable of being linearly movable relative to the holder. The optical assembly is received in the barrel. The image sensor is received in the holder and is configured for capturing images. The at least one permanent magnet is mounted on the barrel. The electromagnets are mounted on the holder and surround the barrel therein for magnetical interaction with the permanent magnet. The control unit electrically is connected to the electromagnets and is configured for changing the magnetic polarities of the electromagnets adjacent to the permanent magnet to create a combined magnetic torsional force applied onto the permanent magnet, thereby rotating the barrel relative to the holder.