In many applications of industrial wireless sensor networks, sensor nodes need to determine their own geographic position coordinates so that the collected data can be ascribed to the location from where it was gathered. We propose a novel intelligent localization algorithm which uses variable range beacon signals generated by varying the transmission power of beacon nodes. The algorithm does not use any additional hardware resources for ranging and estimates position using only radio connectivity by passively listening to the beacon signals. The algorithm is distributed, so each sensor node determines its own position and communication overhead is avoided. As the beacon nodes do not always transmit at maximum power and no transmission power is used by unknown sensor nodes for localization, the proposed algorithm is energy efficient. It also provides control over localization granularity. Simulation results show that the algorithm provides good accuracy under varying radio conditions.