The human respiratory system is a well-developed and complex system involving many different organs such as the nasal cavity, pharynx, trachea and the lungs. Though the actual physiological function of breathing begins only at birth, the development of the respiratory tract, the diaphragm and the lungs occur much earlier in the embryonic stage. Structural and functional changes continue from infancy to adulthood and into old age, as the respiratory system matures with age. Modeling of the respiratory system is helpful in finding out the diseases related to lungs. Engineering performed an effective support, bringing its namely in the construction of models and the simulation of the same. In this paper we develop an automatic controller for inhalation of oxygen through cylinders.