Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Occational weird value from Potentiometer (http://www.chiefdelphi.com/forums/showthread.php?t=64105)

wt200999 14-02-2008 20:20

Occational weird value from Potentiometer
 
I have been testing out a Potentiometer on analog 2, and when I print back the data every once in a while I get a weird number, My terminal would look like such for example (this is at one set position, not changing much at all)

Code:

221
221
221
221
221
221
221
220
221
221
456
221
221
221
220

It works fine when I change the position, but it give me a weird number every once in a while which could mess things up. Has anyone else had problems like this or know why this is? Thank you

eugenebrooks 14-02-2008 20:51

Re: Occational weird value from Potentiometer
 
This is too large of a fluctuation to be electrical noise.
Are you using a quality pot? A cheap pot can be
intermittent on its wiper and cause fluctuations of
this sort.

DonRotolo 14-02-2008 21:02

Re: Occational weird value from Potentiometer
 
Too wild for electrical noise, but eliminate it anyway: Use a 0.1 microfarad (not critical, can be +/- 100%) capacitor between the wiper and ground.


What value pot? Should be 5k-10k for the RC ADC inputs.

Try it with 2 fixed resistors - does it still jump? (One resistor goes from +5 to center, other from center to ground, center is also your signal. 4.7k resistors or so).

Those should get you to the root cause.

Don


All times are GMT -5. The time now is 00:55.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi