The fabrication and application of diamond sensors for electrochemical analysis in single and multiple phase systems