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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fluctuation in signal of potentiometer

Solved!
Go to solution

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 

0 Kudos
Message 1 of 10
(5,807 Views)

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.

0 Kudos
Message 2 of 10
(5,796 Views)
I am only guessing here. But if your wiper for reason is left floating, it could cause the DAQ card to give maximum output readings. The solution will be a new pot.


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 10
(5,782 Views)

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 

0 Kudos
Message 4 of 10
(5,772 Views)
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?
0 Kudos
Message 5 of 10
(5,752 Views)

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 

0 Kudos
Message 6 of 10
(5,740 Views)
Solution
Accepted by topic author Pith

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:

 

ForceV.png

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 7 of 10
(5,738 Views)

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 

 

 

Message Edited by Pith on 05-14-2010 12:49 PM
0 Kudos
Message 8 of 10
(5,734 Views)

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.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 9 of 10
(5,725 Views)
The potentiometer is ~20 years old and has held up thus far.

I just don't have the money to try to break the whole thing apart to try to fix something I don't really understand. I do understand this isn't a fix because the hardware is the problem, but considering the circumstances I think it will suffice.
0 Kudos
Message 10 of 10
(5,717 Views)