PDA

View Full Version : Lowest impedance for ADC?



Demon
- 28th February 2025, 01:27
Microchip often mentions 10K as the maximum recommended value, but I had an incident a short while ago with a PIC that didn't want higher than 2K (I think) in the datasheet.

I'm in the process of buying pots and my current samples with 20% tolerance just isn't cutting it; some don't all go down to exactly 0V, or won't reach 5.0V. This of course affects ADC readings; some go down to 0 and up to 255, and some don't.

1. Would a lower resistance pot (like 1K-2K) be easier/cheaper to get tighter tolerances?

2. Is there a physical work-around for "weak" pots? (hardware trick)

3. Would lower resistance pots actually be "better" for ADC? I remember Richard saying a 1K pot could "in theory" have 1 ohm resolution at 10 bits (or something to that effect).


If tight tolerance pots are just too expensive, one alternative I was thinking of one of those complicated formulas to move the goal posts so to speak:

- actual ADC reading on a sample pot: 4 to 1018

- formula would use range between 4 and 1018, and stretch that out to 0 to 1023

Does this make sense?

This flight simulator really wants a range of 0 to 1023 to be able to use the full range of motion on a control (imagine a choke that's always partially ON, or a flap, not good).


EDIT:

I'm reading this to see if I can make use of that info:

https://www.picbasic.co.uk/forum/showthread.php/26760-How-to-adjust-values-to-a-new-range

Demon
- 28th February 2025, 03:38
I still had my excel spreadsheet. A quick adjustment and I came up with this:

9917

(did some corrections)


Instead of dropping the resolution to 256 by dropping 2 low bits, I still get a range of 1014 ADC values and the flight sim gets 0-1023 values. Only downside, I'll probably get a tiny dead-zone at top and bottom of pot turn.


Now the challenge is to see if I can convert Henrik's formula. :D

Demon
- 28th February 2025, 04:52
Yeah. works in excel, but gonna get serious overflow in PBP:

9918

Ioannis
- 1st March 2025, 09:21
I guess all pots have some dead band at the edges.

Good quality should be far less than the chinese ones. Also cheap chinese have other problems like linearity, differencies between pots and contact quality.

Even if you "stretch" the value from 1014 to 1023 the feel of the deadband turning the pot will be there. You understand that since you produce no values for that angle, you cannot produce also in software something from nothing!

As for the the input impedance of the ADC in general PIC have a max of 10K for reliable sampling. Using 1 or 2K pots will make shure that you are very much OK with the specs.

Ioannis

amgen
- 2nd March 2025, 02:14
hey, are you using a capacitor at the pin of the a/d. ? I used to use a 1 or 2 microfarad that smoothed the input reading and didn't much slow the change of v.

Demon
- 3rd March 2025, 01:51
hey, are you using a capacitor at the pin of the a/d. ? I used to use a 1 or 2 microfarad that smoothed the input reading and didn't much slow the change of v.

I'm using 0.1uF directly at the pin, but I could add 1.0uF and see if that improves things.

But as Richard said in the other thread, an ADC variance of 1-2 is pretty much impossible to get rid of. I was able to get it down to 1, sometimes 2, but that extra cap isn'T gonna hurt either way.