Page 1 of 1
Having trouble to interface a Pot to ADC.
Posted: Wed Oct 08, 2014 1:50 am
by lilzz
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?
Re: Having trouble to interface a Pot to ADC.
Posted: Wed Oct 08, 2014 3:56 am
by plugwash
What is the track resistance of the pot?
What ADC are you using?
Re: Having trouble to interface a Pot to ADC.
Posted: Wed Oct 08, 2014 5:38 am
by lilzz
plugwash wrote:What is the track resistance of the pot?
What ADC are you using?
10K pot , MCP3208.
Re: Having trouble to interface a Pot to ADC.
Posted: Wed Oct 08, 2014 11:35 am
by texy
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
Re: Having trouble to interface a Pot to ADC.
Posted: Wed Oct 08, 2014 3:23 pm
by lilzz
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?
Re: Having trouble to interface a Pot to ADC.
Posted: Wed Oct 08, 2014 3:34 pm
by BMS Doug
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?
Re: Having trouble to interface a Pot to ADC.
Posted: Wed Oct 08, 2014 5:07 pm
by Burngate
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?