I do not believe that you can necessarily detect contamination in Spirulina culture using pH changes. A change in colour due to contamination would be at very high levels of contamination.
There are studies being done on the use of Fluorescence and Raman to detect contamination, but they are not commercially available for now.
The blue green micro-algae Spirulina platensis is an important source of nutrients. As important obstacle for the production of Spirulina is Rotifer. A method is presented for automated identification and recognition of rotifer contamination in Spirulina using image processing techniques. Some tools are employed effectively for online monitoring density of microorganism in water. This research has shown that automatic identification of contamination in algae through the processing of mobile phone images is the easiest way for improving and evaluating the growth of Spirulina for effective cultivation of algae. For details consult Indian Jounrnal of Science and Technology. Vol 8 ( 8 ), 702 -706. 2015