<p>A nebulizer comprises a head detachably coupled to a body. The head comprises nebulizing means, an air channel and a flow sensor. A nebulized liquid is released in an air channel that ends in a mouth piece through which a user inhales and exhales. The inhaling and exhaling causes a flow in the air channel which is detected with the flow sensor. The nebulizing means are controlled by control means included in the body.</p>