It doesn't look like you are clearing V_total every time before you go into your A/D routine.