Which potentiometer to use with internal pull up?

Hi,

I apologize in advance if this has been covered - I did the search first...

What value pot would be best to use with arduino's 20k pullups enabled?

The linear 10k I usually use read too low and I want to save myself some soldering.

Thanks
Alex

alkex:
Hi,

I apologize in advance if this has been covered - I did the search first...

What value pot would be best to use with arduino's 20k pullups enabled?

The linear 10k I usually use read too low and I want to save myself some soldering.

Thanks
Alex

A little puzzling. A pot is normally a component one wires to a arduino analog input pin and read with a analogRead() statement. Pull-up resistors, internal or external are normally used just on digital input pins.

A pot with it's end terminals wired to ground and +5vdc and it's wiper wired to a analog input pin requires no other pull-up resistor, internal or external. The pot itself will always present a proper electrical signal to the input pin. A pull-up will just interfere with the normal 0-5vdc range that the pot will provide. So if you are enabling internal pull-up on a analog input pin, remove it and try your program again. If you still have problems just post your sketch and a drawing of your wiring and we will figure out your problem.

Lefty

Hi Lefty,

I was under the impression that enabling the pullup on analog pins would save the need to wire the pots to +5v.
By that logic I thought that a varying resistance between the analog pin and ground would be enough to get a proper reading.

I was obviously wrong
Best
Alex

Try it & see.
What you might get for a high reading is ~ 5V*yourpot/(yourpot+20k)
So if your pot was big enough, say 500K, you might get 4.8V.

Or, the digitalWrite to turn on the internal pullup may cause the pin to be treated as a digital pin, not 100% clear on what would happen there between the chip and what the IDE/compiler does.

Right now, with a 10k linear pot, analogRead gives me a range of 12 to 238. (I don't have other pots to play with) I'll stick with the standard 3 pin wiring and stop trying to cut corners :wink:

Cheers!

I'll stick with the standard 3 pin wiring and stop trying to cut corners

Good idea, using the internal resistor won't be repeatable anyway, I doubt they have consistent values.


Rob

nutty:
Right now, with a 10k linear pot, analogRead gives me a range of 12 to 238. (I don't have other pots to play with) I'll stick with the standard 3 pin wiring and stop trying to cut corners :wink:

Cheers!

I think you should get 0 when your turn all the way to GND??? But it is a good idea to do with all three wires, at least this time.

Could someone tell, what are the values of the internal pull-up resistors? I like the idea of using that possibility in certain cases.

Cheers,
Kari

Reply to myself. I can always test it with a reference resistor, it is that simple.
:disappointed_relieved:

Kari

They are 20k as stated in my first post :slight_smile:

nutty:
They are 20k as stated in my first post :slight_smile:

Right! I should read more carefully, my bad!

But still, why you don't get 0 when your potentiometer is turned fully to ground? Make no sense to me. There must be something internal in the input of the ADC? But again thinking, just the internal pull-up enabled shouldn't be anyhow different than using external 20k?

Cheers,
Kari

GaryP:
But still, why you don't get 0 when your potentiometer is turned fully to ground? Make no sense to me.

It does make sense, potentiometers might have a so called End Resistance and depends on the model you got.

Ok, so my quick calculation gives 351 ohms to the end resistance. Can it be? I have never heard of that before, but it can be possible, probably is.

I used 20k (internal) + 10k (pot), and clean 5V for this calculation.

Cheers,
Kari

He internal pullups are NOT all 20k. The data sheet says they are 20 to 50k and I believe they are different for different models of avr.