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.
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.
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
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
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.
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?