An exemplary camera module includes a lens holder (10), a lens module
(20), a position detecting mechanism (30), and an image pick-up module
(40). The lens module includes a lens barrel (22) and one lens received
in the lens barrel. The lens barrel is axially movable received in the
lens holder. The position detecting mechanism includes a conductive strip
(32) disposed on outer periphery of the lens barrel along an axial
direction, a number of conductive terminals (36), a number of electrical
sources (34), and a processor (38). The conductive terminals are securely
arranged on an inner periphery of the lens holder parallel to each other.
A cathode of each electrical source is electrically connected to a
corresponding conductive terminal. The processor is electrically
connected with an anode of each electrical source. The image pick-up
module is arranged so as to receive the light from the lens module.