In recent years, the demand for Wireless Sensor Network (WSN) in smart farming has had a tremendous increase in demand for its efficiency. Wireless sensor networks have very many nodes, and it is of no use when the battery dies. This is why there are several routing protocols being take into consideration to cub this problem. In this paper, in order to increase the heterogeneity and energy levels of the network, the M-LEACH protocol is proposed. The key aim of the Leach protocol is to prolong the existence of wireless sensor network by lowering the energy consumption needed for Cluster Head creation and maintenance, the proposed algorithm instructs a node to use high power amplification as it acts as the Cluster heads, and low power amplification when it becomes a Cluster Member, in the next stage. Finally, for better effectiveness, M-LEACH employs hard and soft threshold systems. Since it eliminates collisions and reduces the packet drop ratio for other signals, the M-LEACH protocol proposed works better than the Leach protocol.