Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Potentiometer issues (http://www.chiefdelphi.com/forums/showthread.php?t=128230)

B0sh 25-03-2014 22:38

Potentiometer issues
 
My team is trying to set up a string potentiometer and we are having trouble reading the voltage that it gives out. I tried running the robot in test mode to see all variables, and I see the potentiometer that we had in the code (and for some reason I also see the "potentometer" that we misspelled but fixed later) and it doesn't waver from ~0. I'm confused as to why this could be happening because when we check the voltage with a voltmeter, it is outputting the correct number of volts. Even when pulling on the screen it doesn't change. In the code all we have is something that just gets the potentiometer, the code doesn't do anything besides that.

Thanks in advance for your help!

EFastring 28-03-2014 17:34

Re: Potentiometer issues
 
<Same team as OP>

I guess our main question is:

What code do we need to read the 1-60 mV output of the potentiometer? We have it wired into Analog breakout 1, and using a multimeter on the prongs shows the correct mV output as the string is retracted.

What we currently have is based on this analog input guide from team 358
http://team358.org/files/programming...utExample2.jpg

When we boot up and enter test mode, we see the output from "potentiometer" and it appears to be live (its constantly changing) however it only changes from -0.0001 to 0.0001 and doesn't appear to be reading any real voltage values.

Alan Anderson 28-03-2014 22:08

Re: Potentiometer issues
 
How do you have it wired? The two "ends" of the pot need to be connected to +5 and (-) on the Analog Breakout, and the "wiper" goes to the SIG pin.

Qbot2640 01-04-2014 22:43

Re: Potentiometer issues
 
We had difficulties as well. We were attempting to link a potentiometer to the tilt axle on our shooter and use the voltage drop as a way of calculating the tilt position. I added a carbon resistor to the low side of the circuit, because I was afraid of creating a high current situation. When I put a multimeter across the circuit, I always was able to detect a clear and repeatable change on the signal wire, but when trying to read the value it would read as a nonsense value. Someone told me I should have a capacitor in the circuit as well, but I don't really understand why.

We replaced the potentiometer circuit with an absolute position rotary encoder from the KOP a few years ago and we were able to do what we wanted, but we had some problems with that as well....and I think the potentiometer solution would have been better if we had gotten it to work.

Can anyone suggest what they have used in applications like this? The entire travel of the axle is only about 110 degrees from full up to full down.

Alan Anderson 01-04-2014 23:38

Re: Potentiometer issues
 
A properly wired potentiometer is an "absolute rotary encoder" with an analog output. What sort of high current situation did you think you might encounter? What kind of value were you seeing on the signal wire when you measured it, and how were you powering it?

Qbot2640 02-04-2014 07:03

Re: Potentiometer issues
 
Quote:

Originally Posted by Alan Anderson (Post 1368227)
A properly wired potentiometer is an "absolute rotary encoder" with an analog output. What sort of high current situation did you think you might encounter? What kind of value were you seeing on the signal wire when you measured it, and how were you powering it?

Thanks...yes, not the best clarification. We used the magnetic rotary encoder from Austriamicrosystems. But to answer your questions, I was concerned what would happen if the potentiometer was turned to a point where it was adding such a small amount of resistance that the current would exceed 500mA, and we would get a value that hung around 0.27 on the signal pin regardless if how the potentiometer was turned. And we were powering it with the 5 volts from the analog breakout.

Joe Ross 02-04-2014 16:04

Re: Potentiometer issues
 
What value potentiometer are you using?

Qbot2640 02-04-2014 17:56

Re: Potentiometer issues
 
Quote:

Originally Posted by Joe Ross (Post 1368512)
What value potentiometer are you using?

I used a 1 meg linear taper potentiometer and a 10K carbon resistor....thinking was at full, the 1 meg made the 10k essentially nothing, thus nearly all of the 5 volts would drop across my variable resistance.

Alan Anderson 02-04-2014 19:08

Re: Potentiometer issues
 
A megohm is quite a large value. That's likely to result in a lot of noise on the Analog Input. A 10k to 100k pot is typical for a sensor in an FRC robot, with lower values giving better noise immunity but requiring more current.

If you're worried about "variable resistance", then you might not be understanding the proper use of a potentiometer. You're supposed to connect +5 and (-) across the device, and the wiper goes to the Analog Input. 5 volts is always across the pot. The output is a voltage which is proportional to the turning of the shaft.

The only way you'd need to be concerned with excess current is if you improperly connected the wiper to one of the power supply pins (or if you used a pot with much too small a value).

Qbot2640 02-04-2014 19:40

Re: Potentiometer issues
 
Quote:

Originally Posted by Alan Anderson (Post 1368574)
If you're worried about "variable resistance", then you might not be understanding the proper use of a potentiometer. You're supposed to connect +5 and (-) across the device, and the wiper goes to the Analog Input. 5 volts is always across the pot. The output is a voltage which is proportional to the turning of the shaft.

That make sense, we'll try that - and you're right, I had no idea how to properly connect...where would one find that out without experimentation and exactly what I'm doing now.

For educational purposes - Why is a larger value potentiometer value synonymous with additional noise?

Alan Anderson 02-04-2014 22:36

Re: Potentiometer issues
 
Quote:

Originally Posted by Qbot2640 (Post 1368584)
For educational purposes - Why is a larger value potentiometer value synonymous with additional noise?

It's a matter of source impedance. The higher the resistance, the less able it is to overpower any noise being induced on the signal.

Qbot2640 02-04-2014 22:57

Re: Potentiometer issues
 
Thank you for the much needed lesson...
We are currently picking up the signal from our encoder and multiplying it by 72 to simulate degrees around the circle. The problem we're having is that the break point between 360 and 0 (between 5 volts and 0 volts from the encoder) is very close to the top of our travel, and there were times when we over drove the tilt and surpassed the maximum point on the circle. Then, our autonomous code read the current angle to be something like 3 degrees (rather than 355 degrees) and tried to raise rather than lower the shooter to reach the desired set point. We should have rotated the magnet as soon as we discovered this, but we thought we could handle it by adjusting the limit switch location...hind sight!

Can I install a potentiometer in the manner discussed here without any significant code changes (except perhaps the multiplier and the desired "set point") and read the value just like we're reading the encoder value?

Alan Anderson 02-04-2014 23:06

Re: Potentiometer issues
 
Quote:

Originally Posted by Qbot2640 (Post 1368667)
Can I install a potentiometer in the manner discussed here without any significant code changes (except perhaps the multiplier and the desired "set point") and read the value just like we're reading the encoder value?

Yes, it should be that simple. The one difference between the sensors that you need to worry about is that potentiometers typically have physical limits on how far they travel. If you do get a continuous-travel pot, the "dead zone" at the transition from maximum directly to minimum is usually a significant angle. For your purposes, just make sure the pot is rotated so the normal range of travel is not exceeded.


All times are GMT -5. The time now is 08:52.

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