Tips for using ADC? #234
Unanswered
grandaspanna
asked this question in
Q&A
Replies: 2 comments 2 replies
-
First I've heard of any phenomenon like that... I'd check for a possible wiring issue (bad connection on one side of resistor divider?) |
Beta Was this translation helpful? Give feedback.
1 reply
-
You could certainly try taking samples with analogReadEnh() (seethe analog documentation supplied with the core) and either specifying a higher resolution (which will oversample and decimate) or simply using accumulation and then dividing it yourself - but if there's a problem with the electrical portion of it, you want that sorted out, even if you could hide it :-P |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Maybe there's a better place to ask, so I'm happy to be told where to go...
I've implemented a design where one of its functions is to monitor battery voltage. Overall, it works well - I have a simple resistor divider and using VCC as reference (currently). I'm calling analogRead() about every 20ms, but every now and then, I get a single reading that is quite "spiked":
7.68
7.69
8.25
7.66
7.67
7.64
7.69
There's no apparent fixed period or cycle to it (the blue line):
So far, it's easy enough to smooth in analysis, but I'm wondering if there are smarter ways to use the ADC. I'm aiming for around 50-100 samples a second in order to track dips under load.
Any tips?
Beta Was this translation helpful? Give feedback.
All reactions