Today I tested the battery voltage measuring feature, I last time made! I put in the batteries, wired it up, copied this specific part of the code in Thonny, told it to print the voltage, aaaannd when I checked with the multimeter, it was waaay off, lol. I was baffled, because the voltage my Pico measured was MORE than a full volt below the actual voltage. I immediately started researching, (by asking Gemini… of course…. I start to feel guilty for all the trees and water I waste), and it said to me that it is likely due to resistors are not perfect, this is why they have a TOLERANCE band, and I should start a different approach. It suggested that I should calculate a factor, by dividing the voltage of the batteries measured with a multimeter, by the raw ADC value my Pico reads, then multiply with that with the raw ADC value. After fixing this, it gave me roughly the exact value my multimeter had shown. P.S. If I could learn for once, that I HAVE to use period at decimal numbers, instead of comma, I would spend way less time searching for bugs that don’t exist…
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.