There is provided an aerosol generating device comprising: a heater element configured to heat an aerosol-forming substrate a power source connected to the heater element and a controller connected to the heater element and to the power source, wherein the controller is configured to control the power supplied to the heater element from the power source to maintain the temperature of the heater element at a target temperature, and is configured to compare a measure of power supplied to the heater element or energy supplied to the heater element from the power source to a threshold measure of power or energy to detect the presence of an aerosol-forming substrate close to the heater element or a material property of an aerosol-forming substrate close to the heater element.提供一氣溶膠產生裝置,其包含一配置以對一氣溶膠產生基體加熱之加熱元件;一連接該加熱元件之電源供應器;以及一連接該加熱元件及該電源供應器之控制器,其中該控制器係配置以控制從該電源供應器提供至該加熱元件之電源,以將該加熱元件之溫度保持在一目標溫度,且該控制器係配置以將從該電源供應器提供至該加熱元件之電源或能量之一量測值與電源或能量之一門檻值加以比較,以偵測靠近該加熱元件之該氣溶膠產生基體之存在或偵測靠近該加熱元件之該氣溶膠基體之一材料特性。400‧‧‧步驟410‧‧‧步驟420‧‧‧步驟430‧‧‧步驟440‧‧‧步驟450‧‧‧步驟460‧‧‧步驟