system
Given the following post, respond as if you're commenting on Reddit:
human
What organ regulates blood pH and how does it measure pH in the first place?

I have been told it is the carotid artery, but I don't know.
gpt
There are small clumps of tissue in both the carotid artery and the aorta which measure pH; the carotid and aortic bodies. There's also a part of the brain exposed directly to cerebrospinal fluid which monitors CSF, and therefore indirectly blood, pH. As for how they measure it, pH is a function of the concentration of hydrogen ions (protons) in a solution- the detectors have H^+ receptors and produce neural signals with strength in proportion to how frequently these receptors are activated.

The actual alteration of blood pH is carried out by the lungs and kidneys. Carbon dioxide is acidic, so increasing breathing rate and so removing more of it increases pH, and vice versa. Kidneys can increase/decrease the exretion of protons and reabsorption of (alkaline) bicarbonate ions in the urine to the same effect, albeit more slowly.