## 1 Introduction  
The infrastructure for a gas and oil pipeline network must be constantly monitored using non-destructive testing (NDT) techniques to assure its safe operation. Pipeline faults can cause oil and gas leakage with severe damages in the environment and human health [1, 2]. The pipeline network safety is a priority in the gas and oil industries, which require low-cost NDT techniques for real-time monitoring of defects and flaws in the pipeline. Thus, the pipeline network requires periodic inspections and suitable maintenances that avoid future accidents. Generally, in these inspections conventional NDT techniques are used, such as infrared thermography testing, radiographic testing, visual testing, ultrasonic testing, acoustic emission, liquid penetrant testing and Eddy current testing [3, 4, 5, 6]. Liquidpenetrant testing is useful for inspection of surface defects in ferromagnetic samples, although these defects should be contaminants free [7]. On the other hand, ultrasonic testing has high sensitivity for detection of small flaws, but it needs reference standards for calibrating the equipment as well as operators with extensive training and experience [8; 9]. Another NDT technique is the acoustic emission, which is used for monitoring discontinuities on a large area using multiple sensors whose signals must be interpreted by inspectors with extensive technical knowledge [10]. Infrared thermography is another NDT technique that has high sensitivity to temperature variations and it needs expensive equipment [5]. Also, radiographic testing has a high sensitivity for detecting flaws. Nevertheless, this technique presents limitations such as radiation hazard and highly expensive equipment, and it requires operators with high skill level [10; 11; 12]. Finally, Eddy current testing is employed for inspection of defects based on electromagnetic induction [12; 13]. However, this technique needs an external magnetic field source to induce Eddy currents. Recently, several studies about the defects inspection of ferromagnetic structures have been reported using the metal magnetic memory (MMM) method [14; 15; 16; 17; 18; 19; 20; 21]. The MMM method is a passive magnetic testing technique, which is different to the conventional magnetic flux leakage method. This MMM method may be used for monitoring defects or degrees of stress concentration in ferromagnetic materials measuring their spontaneous surface micro-magnetic signals [20; 21]. These signals can be affected by several factors such as different manufacture processes applied to the ferromagnetic materials, considering types of heat treatment, welding, casting and forging [22]. This method could be employed for monitoring defects of ferromagnetic structures based on the analysis of self-magnetic leakage fields distribution around each defect. The MMM method does not require additional equipment, external magnetic field sources and special treatment on the structures surface. Thus, this magnetic method has a simple operation principle and it could be used for defects inspection of pipeline network using magnetic sensors with high resolution. However, more studies related to this method are necessary to predict the relation between the defect size (depth and width) and variations of the amplitude and shape of the MMM signals. In order to study this relation, we measure the tangential and normal MMM response around three different rectangular defects on the external surface of a ferromagnetic pipe (ASTM A-36 steel) using a simple measurement system. This system uses a low-cost magnetoresistive sensor, an Arduino nano and a virtual instrumentation. In addition, it can be used without special equipment, additional treatment on the surface of ferromagnetic pipes or operators with high skill level. The proposed system could be employed for real-time monitoring of the size and location of rectangular defects on the external surface of ferromagnetic pipes. This paper consists of the following sections.