lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

Having trouble to interface a Pot to ADC.

Wed Oct 08, 2014 1:50 am

The variable pot has 3 pins. The left and right pins connected to GND and 3.3V respectively and I measure the center pin as I varying the Pot resistance. Sure enough the voltage is varying and indicates Pot is functioning correctly.

However, when I connect the center pin of pot to channel 0 of the ADC, and I measure the voltage now the voltage is read 0.V It doesn't how much I vary the pot resistance. It stays at 0 V.

Do I need an opamp between Pot center pin and the ADC?

plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Having trouble to interface a Pot to ADC.

Wed Oct 08, 2014 3:56 am

What is the track resistance of the pot?
What ADC are you using?

lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

Re: Having trouble to interface a Pot to ADC.

Wed Oct 08, 2014 5:38 am

plugwash wrote:What is the track resistance of the pot?
What ADC are you using?
10K pot , MCP3208.

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Having trouble to interface a Pot to ADC.

Wed Oct 08, 2014 11:35 am

Also, are you confident that you are reading from the ADC correctly? What if you connect the ADC channel 0 pin directly to 3V3 - does it still read 0 volts?
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

Re: Having trouble to interface a Pot to ADC.

Wed Oct 08, 2014 3:23 pm

texy wrote:Also, are you confident that you are reading from the ADC correctly? What if you connect the ADC channel 0 pin directly to 3V3 - does it still read 0 volts?
Texy
I put my voltage meter directly on Pot's center pin which connected to ADC's channel0 input for sanity check. So, I am not reading from ADC.

I varied the Pot and center pin keep showing reading of 0V but as soon as I disconnect that pin with Channel 0 of ADC then it shows varying voltage. I am thinking could the input pin of ADC affect it?

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Having trouble to interface a Pot to ADC.

Wed Oct 08, 2014 3:34 pm

lilzz wrote:
texy wrote:Also, are you confident that you are reading from the ADC correctly? What if you connect the ADC channel 0 pin directly to 3V3 - does it still read 0 volts?
Texy
I put my voltage meter directly on Pot's center pin which connected to ADC's channel0 input for sanity check. So, I am not reading from ADC.

I varied the Pot and center pin keep showing reading of 0V but as soon as I disconnect that pin with Channel 0 of ADC then it shows varying voltage. I am thinking could the input pin of ADC affect it?
Can you talk to the ADC when the pot is disconnected? does it show a 0 value when channel 0 connected to gnd and a high value when channel 0 connected to 3v3?
Doug.
Building Management Systems Engineer.

User avatar
Burngate
Posts: 6303
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Having trouble to interface a Pot to ADC.

Wed Oct 08, 2014 5:07 pm

If one end of the pot is connected to 3v3, and the wiper is being held at 0v, then when you turn the pot to that end, it will short 3v3 to ground and crash the Pi.
(With a 10k pot, there might be enough resistance to avoid destroying the Pi, but I wouldn't bank on it)

With no power, what is the resistance between the wiper and ground?
With nothing else connected it should be about 2k5 if the wiper is in the middle, and the 3v3 rail has a low-resistance path to ground, otherwise about 5k.
Also, what's the 3v3 - ground resistance, again with no power?

Is it possible that you've mis-wired something - for example, is the chip the wrong way round?

Return to “General discussion”