Synthesis of materials for ammonia, urea and nitrate sensors