The adequate use of water for irrigation in agriculture is a widespread concern. In this study, we developed an autonomous smart system consisting of a new hydrogel into a valve, which regulates the flow of water according to soil moisture. The main objective was to find an alternative to avoid waste of water. Yet, hydrogel development and study of the quantitative relationship between its properties and soil moisture were also important to achieve this aim. The hydrogel was synthesized from tris[(hydroxymethyl) methyl]acrylamide (NAT) copolymerized with methyl methacrylate (MMA) and crosslinked with N,N′-methylene bis(acrylamide) (BIS). The use of cellulose (2% w/v) avoids hydrogel breakage during swelling-deswelling. The relation between swelling ratio, force of expansion and moisture was evaluated for the novel hydrogel. It was found that as soil moisture increases, the gel swells, while expansion force diminishes. These properties showed linear relationship in the range studied. The three-dimensional network formed by flexible chains has the attribute of exerting a great force when it expands (≅15N for a hydrogel disc of 1cm2). When the material was put in contact with the ground, it swelled and deswelled without breaking. The hydrogel within the valve was able to open and close the passage of water. The valve prototype was tested during four months with a plant. During this period, only three liters of irrigation water were used monthly, instead of about half a liter daily. Hence, an autonomous actuator capable of controlling soil moisture was developed based on a new hydrogel.