Go to Post Your cat-bell skills are most impressive. - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-03-2014, 22:38
B0sh B0sh is offline
Registered User
FRC #2078 (Robotic Wolves)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2012
Location: Louisiana
Posts: 6
B0sh is an unknown quantity at this point
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!
Reply With Quote
  #2   Spotlight this post!  
Unread 28-03-2014, 17:34
EFastring EFastring is offline
Registered User
AKA: Eric Fastring
FRC #2078 (Robotic Wolves)
Team Role: Engineer
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Slidell, Louisiana, USA
Posts: 24
EFastring is an unknown quantity at this point
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 28-03-2014, 22:08
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 01-04-2014, 22:43
Qbot2640's Avatar
Qbot2640 Qbot2640 is offline
Registered User
AKA: Terry McHugh
FRC #2640 (Hotbotz)
Team Role: Mentor
 
Join Date: Sep 2012
Rookie Year: 2012
Location: Reidsville, NC
Posts: 473
Qbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond repute
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.
__________________

2012 Palmetto Regional Winners (Thanks 2059, 2815, and 287).
2012 Newton 14th Seed
2013 Chesapeake Regional Imagery Award Winners
2014 North Carolina Regional Imagery Award Winners
2014 Greater DC Regional Team Spirit Award Winners
2015 North Carolina Regional Finalists (Thanks 3971 and 587)
Reply With Quote
  #5   Spotlight this post!  
Unread 01-04-2014, 23:38
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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?
Reply With Quote
  #6   Spotlight this post!  
Unread 02-04-2014, 07:03
Qbot2640's Avatar
Qbot2640 Qbot2640 is offline
Registered User
AKA: Terry McHugh
FRC #2640 (Hotbotz)
Team Role: Mentor
 
Join Date: Sep 2012
Rookie Year: 2012
Location: Reidsville, NC
Posts: 473
Qbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond repute
Re: Potentiometer issues

Quote:
Originally Posted by Alan Anderson View Post
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.
__________________

2012 Palmetto Regional Winners (Thanks 2059, 2815, and 287).
2012 Newton 14th Seed
2013 Chesapeake Regional Imagery Award Winners
2014 North Carolina Regional Imagery Award Winners
2014 Greater DC Regional Team Spirit Award Winners
2015 North Carolina Regional Finalists (Thanks 3971 and 587)
Reply With Quote
  #7   Spotlight this post!  
Unread 02-04-2014, 16:04
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,563
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Potentiometer issues

What value potentiometer are you using?
Reply With Quote
  #8   Spotlight this post!  
Unread 02-04-2014, 17:56
Qbot2640's Avatar
Qbot2640 Qbot2640 is offline
Registered User
AKA: Terry McHugh
FRC #2640 (Hotbotz)
Team Role: Mentor
 
Join Date: Sep 2012
Rookie Year: 2012
Location: Reidsville, NC
Posts: 473
Qbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond repute
Re: Potentiometer issues

Quote:
Originally Posted by Joe Ross View Post
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.
__________________

2012 Palmetto Regional Winners (Thanks 2059, 2815, and 287).
2012 Newton 14th Seed
2013 Chesapeake Regional Imagery Award Winners
2014 North Carolina Regional Imagery Award Winners
2014 Greater DC Regional Team Spirit Award Winners
2015 North Carolina Regional Finalists (Thanks 3971 and 587)
Reply With Quote
  #9   Spotlight this post!  
Unread 02-04-2014, 19:08
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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).
Reply With Quote
  #10   Spotlight this post!  
Unread 02-04-2014, 19:40
Qbot2640's Avatar
Qbot2640 Qbot2640 is offline
Registered User
AKA: Terry McHugh
FRC #2640 (Hotbotz)
Team Role: Mentor
 
Join Date: Sep 2012
Rookie Year: 2012
Location: Reidsville, NC
Posts: 473
Qbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond reputeQbot2640 has a reputation beyond repute
Re: Potentiometer issues

Quote:
Originally Posted by Alan Anderson View Post
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?
__________________

2012 Palmetto Regional Winners (Thanks 2059, 2815, and 287).
2012 Newton 14th Seed
2013 Chesapeake Regional Imagery Award Winners
2014 North Carolina Regional Imagery Award Winners
2014 Greater DC Regional Team Spirit Award Winners
2015 North Carolina Regional Finalists (Thanks 3971 and 587)
Reply With Quote
  #11   Spotlight this post!  
Unread 02-04-2014, 22:36
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Potentiometer issues

Quote:
Originally Posted by Qbot2640 View Post
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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