Intrusion detection using barrier coverage is one of many applications existed in wireless sensor networks. The main purpose of using barrier coverage is to monitor the borders of a specific area against the intruders that are trying to penetrate this critical area by ensuring the total coverage with a low cost and extending the lifetime of the network, many solutions have been proposed in the literature in order to solve the coverage problem in wireless sensor networks, which became a vital field of research. In this paper, we present a new technique based on geometric mathematical models, in order to guarantee the total coverage of our deployed barriers with a minimum possible number of sensors. The idea is to calculate the number of sensors adequate to cover a barrier before deployment. We then formulate the problem to minimize the number of sensors to be deployed to properly cover a barrier; the calculation makes it possible to solve this problem in polynomial using our own heuristic.Additionally, we propose a new mechanism for ensuring a fault-tolerant network by detecting the faulty sensors and select other suited sensors to close the existing gaps inside the barriers and detecting the sensors whose energy is low before the failure. The obtained simulation results prove the effectiveness of the proposed algorithms. /journal/dac 1 of 21 which allows recognizing the monitoring level of the critical area. The coverage is the concept that was introduced because of several viewpoints, among them is the diversity of sensors and their different applications. By taking in consideration several constraints and topics such as the kinds of interest areas( borders, forests, etc) and the types of targets (vehicle, human, etc) and the WSNs constraints( resources limited) and trying to achieve the objectives (maximize the network lifetime, ensure the coverage). In this context, there are several topics and fields of research proposed and presented in the literature, among the most discussed are 5 : area coverage, barrier coverage, and point coverage. In area coverage problem, a group of sensors is distributed on a geographical region to monitor a specific area.In point coverage problem, a group of sensors is distributed to monitor a specific set of points (or objects). The barrier coverage refers to the detection of movement across the barriers of sensors. The goal is to maximize the ability for detecting any intruder who tries to infiltrate using a set of barriers of sensors. In order to solve this problem, several algorithms have been developed by researchers. In this paper, we extend our previous work by significantly proposing a mechanism of sensor deployment and calculation of barrier coverage based on a purely geometric model. By this mechanism, we obtain a more robust system for the calculation of the coverage, which allows a detection of intruders in a very efficient and effective way. Our proposed technique is capable of providing full coverage throughout a barrier, with a minimization of the number of deployed s...