From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-13-2010 06:01 PM
I have a 10k potentiometer that I'm trying to read through Labview. I've gotten the signal to work and come through and everything, but there is a problem with the signal. The potentiometer is connected to a dial and returns a signal from 0-5 based on where the dial turns. So at 6 o'clock the signal gives 2.5 volts and at 9 o'clock it gives 4.5 volts. The issue comes with 12 o'clock. The signal can freeze at 4.997 volts for ~1% of the rotation and jumps to 1.45 for ~1% and then goes to zero.
I'm trying to detect very finely when the dial starts moving and when it stops moving. I can't seem to program a method to detect when the dial stops moving when the signal jumps around like it does. If you look at my program I try to set two criteria for when the dial starts moving and when the dial stops moving. The problem is the jumps in the signal towards midnight on the dial cause the vi to terminate prematurely because the signal acts erratically. Is there a way I can alter the signal of the device or can anyone think of a way to 100% come up with these two criteria?
Thanks,
kevin
Solved! Go to Solution.
05-13-2010 10:30 PM
It sounds like a mechanical issue with your potentiometer where the wiper is probably jumping off the windings at the top of the travel. There's not much you can do about that other than find a potentiometer that doesn't do it.
I don't know if there is going to be any reliable way for your code to work around this since you are basically hitting the limit of your DAQ range when you hit the top of the travel.
05-14-2010 03:45 AM
05-14-2010 07:04 AM
kevin,
One thing which often helps with transient broken connections on a pot wiper is to connect a fixed resistor from the wiper to one end of the pot. Which end depends on your application. Then if the wiper hits a bad spot on the resistance element or is mechanically pulled away from contact with the element, the resistance goes to the value of the fixed resistor, not to infinity. The output voltage will not be proportional to the position of the wiper, but you can control what it will be.
Lynn
05-14-2010 11:17 AM
05-14-2010 12:21 PM
You may be able to do something like that.
Think about how fast the pot can be moved. How fast does your DAQ device read the pot? Think about how slowly the pot can be moved. What do you want to do if the the user sets the pot to the "bad" spot and then does not move it again for an hour? What if the pot is set to a bad spot when the power is first turned on and then moved to a "good" spot? Will your logic decide the good is bad?
I think you will get better results by getting a good pot.
Lynn
05-14-2010 12:32 PM
Pith wrote:
There isn't a way that I can just make a program that can logically interpret the motions of the potentiometer? The value has to go linearly from 0 to 5 and can I in some way use a VI or some form of logic to interpret if the value gets to 4.997 and then jumps to 1.4 instead of going to zero that it should interpret that value of 1.4 as zero?
This will do it:
05-14-2010 12:47 PM - edited 05-14-2010 12:49 PM
Something like that will work great! I've just got to change a couple things because the data output, which I should have provided does something like this:
4.997559, 4.997559, 1.425781, 1.428223, 1.42334, 1.42334, 0, 0
So I've just got to set a separate If statement that says if the value goes from 4.9 to 1.4 then instead of saying 1.4 is your old value force 4.9 to be the previous value for the next data point.
Hope that makes sense.
Anyways, thanks for the help all of you! I was very nervous about posting something on here and not sure if people would be helpful and I'm blown away by the involvement and help.
Thanks!
-k
05-14-2010 12:58 PM
Glad to help. However, I must agree with Lynn that you would be better off with a good pot rather than this band-aid approach. The pot will get worse over time and you will be constantly changing your code.
05-14-2010 01:04 PM