voltage sensor unstable in my code