Author Topic: voltage divider making adc nonlinear  (Read 8659 times)

0 Members and 1 Guest are viewing this topic.

Online wraper

  • Supporter
  • ****
  • Posts: 16849
  • Country: lv
Re: voltage divider making adc nonlinear
« Reply #25 on: July 23, 2016, 05:33:25 pm »
Also, add a hold on the reset: 1k to Vcc and a 0.1uF cap to ground.  Then the reset button sits across the cap and discharges it when pressed.  This gives you a hold on the order of 1ms and deglitch to boot, and a nice reset hold on power-on:


Very "smart suggestion" to put cap in parallel with button, inductive kickback is surely what should be implemented on reset pin.
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: us
Re: voltage divider making adc nonlinear
« Reply #26 on: July 23, 2016, 06:41:37 pm »
Since this discussion was initially about a UNO, that reset capacitor should be increased to several uF.  A UNO will reset anytime the USB port is plugged in and stored data will be lost.  Reset is externally pulled down by .1uF connected to that pin.
 

Offline cc83Topic starter

  • Contributor
  • Posts: 10
Re: voltage divider making adc nonlinear
« Reply #27 on: July 27, 2016, 01:59:07 am »
Thanks everyone for the suggestions. I retested and reconfigured and even with my original circuit the result was accurate and linear from input to MCU pin. So I looked at the software. Couldn't find anything there. So I set up a program to log in values on the ADC and the result... It's a ADC linearity issue. So I did some error adjustment in software and it's working well now. I am going to redesign the input a little for v2. This project was for someone that had some strange requirements and they kept changing so the design was not optimal for the end result. I'm hoping that when I design a standalone board without the arduino and shield I won't have as much ADC error.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf