The brain has a respiratory control centre in the medulla. It is composed of two subsystems, the inspiratory centre and the expiratory centre. There are three sets of blood chemoreceptors, one in the medulla, the carotid bodies and the aortic body. They are all highly sensitive to rises or falls in the CO2 and pH levels in the blood. The carotid body is also sensitive to falling oxygen levels, but our sensitivity in this respect is quite poor. We are capable of using conscious thought processes emanating from our cerebral cortex to control our breathing style by modifying the activity rate of our respiratory centre but only up to the point where our autonomic systems become stressed and take back control. Try killing yourself by not breathing....its pretty difficult.
When the inspiratory centre is on, an inhibitory impulse switches the expiratory centre off. Impulses the exterior intercostal and diaphragm muscles cause inhalation. As the lungs expand, stretch receptors feed back negatively to the inspiratory centre and finally switch it off. The expiratory centre is then freed to act. It causes the internal intercostal muscles to relax while the exteriors and the diaphragm muscles are relaxing. We breathe out and the lungs deflate. The stretch receptors reduce their negative feedback to the inspiratory centre until it switches on again. The sensitivity of the centre to stretch receptor negative feed back is altered by the chemoreceptors which will reduce the sensitivity of the system if there is a higher than required CO2 level or the pH is too low. This will result in deeper breathing....the inspiratory centre does not switch off so easily! The activity rate of the inspiratory centre is also raised so that we breathe more frequently. In this way we can exactly match our oxygen requirements to the rate of uptake of oxygen by our lungs. The reason for the sensitivity of the chemoreceptors to pH levels is that when muscle cells are running low on oxygen supply they produce lactic acid which is released into the blood and this together with CO2 will cause a fall in pH.