Very cool that you want to start learning the chemistry of beer.
pH is lower case, upper case. It stands for "power of Hydrogen."
The first thing is to get a pH meter with an accuracy of +/-0.02. Anything with less resolution won't really help you because the margin of error is wider than the target pH range.
The general rule of thumb is that darker malts lower mash pH. But this gets misleading when you want accuracy, since not all dark malts are equally acidic. Heck, not all pale malts are, either as there can be as much as 0.4 pH difference between them in distilled water.
However, there is no change in malt pH without Water. Humble water is both the platform and the roadblock for proper mash pH. The chemistry of the water is easier to adjust and guide than is malt.
Two books that will go through the nitty-gritty of brewing chemistry are:
Water by Palmer and Kaminsky
Principles of Brewing Science, 2nd Edition, Fix.
Get them. You'll never outgrow them.