An electrically operated aerosol generating device (100) is disclosed. The device comprises at least one heating element (119) for heating an aerosol-forming substrate, a power source (107) for providing power to the heating element (119), and electric circuitry (109) for controlling the supply of power to the heating element. The electric circuitry (109) includes a sensor for detecting air flow past the aerosol generating element. The electric circuitry (109) is arranged to determine a first parameter related to change in flow rate of the air flow, compare the first parameter to a threshold value, and subsequently reduce or suspend the supply of power to the heating element (119). The first parameter is derived from a combination of second and third parameters, wherein the second parameter relates to an air flow rate through the device, and the third parameter relates to one, or a combination of, temperature , power supplied to the heating element (119), a maximum detected flow rate, or a rate of change of flow rate. A method of controlling aerosol production in an aerosol generating device is also disclosed.