Three major causes of corrosion of steel in concrete are chloride ions (Cl-), temperature (T) and acidity (pH). Under normal operating temperatures and with pH above 13, steel does not undergo pitting corrosion. In presence of Cl-, if the pH decreases below 12, the probability of pitting increases. Acid rain and atmospheric carbon dioxide cause the pH to drop in concrete, often leading to corrosion of the structure with the concomitant cost of repair or replacement. Currently, the pH level in concrete is estimated through destructive testing of the structures. Glass ISFET, and other pH sensors that need maintenance and calibration cannot be embedded in concrete. In this paper, we describe an inexpensive solid state pH sensor that can be embedded in concrete, to detect pH changes at the early stages. It employs a chemical reagent, trinitrobenzenesulfonic acid (TNBS) that exhibits changes in optical properties in the 12 - 14 pH range, and is held in a film of a sol-gel/TNBS composite on an optically transparent surface. A simple LED/filter/photodiode transducer monitors pH-induced changes in TNBS. Such a device needs no periodic calibration or maintenance. The optical window, the light-source and sensor can be easily housed and encapsulated in a chemically inert structure, and embedded in concrete.