Researchers develop smartphone sensor for on-site detection