Isolated circuit for pH module to solve ground loop problem

pH does not measure OH- ions, it measures H+ ions, which in fact are present in an alkaline solution as well: water all the time spontaneously breaks apart in H+ and OH-, which then very quickly also reconnect to form H2O again. The presence of OH- ions makes that the chance an H+ ion finds a partner increases, thus reducing the concentration of H+ ions in the solution.

Also note that pH only really makes sense for watery solutions. The pH of highly concentrated acids is higher than you may expect just looking at the concentration itself as the acid is not fully dissociated. E.g. in highly concentrated sulphuric acid not all molecules break apart to 2 H+ and 1 SO42-, you will find lots of HSO4- ions as well. Same on the other end of the scale of course.

While we usually talk about H+ ions, that's also technically not correct as these protons are pretty much all bound to another water molecule, forming H3O+ ions. And that, considering the highly complex chemistry of water thanks to it forming those strong H-bridges between the molecules when in liquid or solid state, is also just a simplification...