Disclosed is a smart lead comprising a large number of micro-electrodes and macro-electrodes. The macro-electrodes are perforated, and contain several through-holes which are used to electrically join them with associated electrode-wires. The radial gaps that separate the macro-electrodes are filled with macro-electrode strips that carry a three-dimensional array of micro-electrodes. The nest of macro-electrodes with electrode-wires and micro-electrode strips are injection molded to form the smart lead. The signals sensed by micro-electrodes are used to locate the target neurons right at the first insertion of the smart lead, thereby greatly reducing the surgical time. A closed loop control software in automates location of the target neuron sites and limit the currents to stimulate only the target neurons, thereby reducing side-effects and increasing battery life.