Alright, so I ran your script while charging. Curious about the result I couldn't resist peeking at the data. What I found was an imho weird behavior. Take a look at the graph. Is this normal?