A method for depositing a coating onto a solid substrate for the fabrication of a functional layer in a solar cell device wherein the functional layer is used as an anti-reflection layer, an active layer for photon absorption and charge generation, a buffer layer, a window layer, or an electrode layer. Specifically, it relates to aerosols containing sedative-hypnotics that are used in inhalation therapy. The method includes providing a first pressure within a chamber of the plasma processing system and providing a second pressure within a windowless optical diagnostic chamber in which the windowless optical diagnostic system is positioned. The dispensing may be via electrowetting.