The disclosure extends to apparatuses, methods, systems, and computer program products for optimizing water usage in irrigation. The disclosure also extends to apparatuses, methods, systems, and computer program implemented products for sensing the flow of water in an irrigation system. The disclosure presents embodiments of improved control units for optimizing water use and additional environmental conditions by optimizing water usage through flow detection. A wireless flow sensor device includes a battery, an ultrasonic flow sensor, a radio, and a sensor controller. The battery is configured to store and provide electrical energy to power the wireless flow sensor device. The ultrasonic flow sensor is configured to perform flow measurements to determine a rate of water flow in an irrigation system. The radio is configured to transmit flow measurement reports to a base station. The sensor controller is configured to control timing of flow measurements and flow measurement reports.