A dry powder inhaler including a first chamber having an orifice for holding a dry powder and a gas, and a second chamber connected to the first chamber by at least one passageway for receiving an aerosolized form of the dry powder from the first chamber and delivering the aerosolized dry powder to a user. At least one optical sensor monitors aerosolized powder particles passing in the second chamber. A vibrator coupled to the first chamber aerosolizes the dry powder and causes the aerosolized powder to move through the at least one passageway thereby delivering the powder from the first chamber to the second chamber as an aerosolized dry powder. A vibrator control unit controls operation of the vibrator based on the amount of aerosolized powder particles passing in the second chamber and delivered to a user.