Previously, different deadlock control strategies for automated manufacturing systems (AMSs) based on Petri Nets with reliable resources have been proposed. However, in real-world applications, resources may be unreliable. Therefore, deadlock control strategies presented in previous research studies are not suitable for such applications. To address this issue, this paper proposes a novel three-step deadlock control strategy for fault detection and treatment of unreliable resource systems. In the first step, a controlled system (deadlock-free) is obtained using the "Maximum Number of Forbidding First met Bad Markings Problem 1" (MFFBMP1), which does not consider resource failures. Subsequently, all obtained monitors are merged into a single monitor based on a colored Petri net. The second step addresses deadlocks caused by resource failures in the Petri net model using a common recovery subnet based on colored Petri nets. The recovery subnet is applied to the system obtained in the first step to ensure that the system is reliable. The third step proposes a hybrid approach that combines neural networks with colored Petri nets obtained from the second step, for the detection and treatment of faults. The proposed approach possesses the advantages of modular integration of Petri nets and can also learn neurons and reduce knowledge, similar to neural networks. Therefore, this approach solves the deadlock problem in AMSs and also detects and treats failures. The proposed approach was tested using an example from literature.