Go to Post I can't believe it someone is talking about next years game rationally! - jamie_1930 [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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 06-02-2014, 18:31
jordan11623's Avatar
jordan11623 jordan11623 is offline
Registered User
FRC #4641
 
Join Date: Jan 2014
Location: United States
Posts: 5
jordan11623 is an unknown quantity at this point
Unhappy Potentiometer, need help with programming

On our robot for the FRC Competition we have a axle on our grab arm. We'd like to wire a potentiometer to it so that we can control the voltage that goes in and out of it depending on which side it goes to. (Up or down, I guess). And we'd also like to know how we could get the input from that potentiometer and translate it to a program in LabView, whether manually or otherwise. We're not sure if that was explained correctly or in a way that makes sense. The team isn't exactly sure how to do this in any way. We'd like to stop the grab arm from going back down after we bring it up, we want it to lower manually but have it stop and lock automatically after we raise it.
-Team 4641
Reply With Quote
  #2   Spotlight this post!  
Unread 06-02-2014, 18:52
Team3266Spencer's Avatar
Team3266Spencer Team3266Spencer is offline
Team Captain and Lead Programmer
AKA: Spencer Lanman
FRC #3266 (Robots-R-US)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2012
Location: Richmond, Indiana
Posts: 280
Team3266Spencer is an unknown quantity at this point
Re: Potentiometer, need help with programming

You're better off using an encoder. You can mount an encoder to the shaft which will tell you, basically, the angle at which your arm is at.
__________________
2012: Buckeye Regional, Queen City Regional, Human Player
2013: Queen City Regional, Buckeye Regional, Crossroads Regional
Shooter Operator
2014: Crossroads Regional, Queen City Regional
Catapult Operator
2015: Georgia Southern Classic Regional (Winner), Queen City Regional
Chainsaw Operator
Want to talk? TeamSpeak: team3266.noip.me
Reply With Quote
  #3   Spotlight this post!  
Unread 06-02-2014, 18:58
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Potentiometer, need help with programming

You're definitely better using a potentiometer.

An encoder (most FRC 'encoders' are quadrature incremental encoders) tells you how far you have gone since your zero point.

A potentiometer tells you exactly where you are, but when you exceed the limits it will break.

There are also 'absolute encoders' which work just like a potentiometer, but roll over to the other end of their range when they hit their limits.

In any case, in LabVIEW, use an 'AnalogChannel' to measure the voltage of the potentiometer. Connect the pot's ends to the black and red wires (+5v and Gnd), and the wiper to the white wire (Signal). The voltage in on the analog module will be between 0 and 5v.

Once you have the position, you can scale it from volts to degrees, or whatever units you want, or leave it in volts. From there, you can run a control loop (search here for 'PID control') for your position control.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
  #4   Spotlight this post!  
Unread 06-02-2014, 20:45
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,546
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, need help with programming

Have you looked at the potentiometer example in the NI FRC examples?

I agree, a potentiometer is a much better choice for an arm then an encoder.
Reply With Quote
  #5   Spotlight this post!  
Unread 07-02-2014, 07:23
DELurker DELurker is offline
Former Engineering Mentor
AKA: William Lydick
no team (n/a)
 
Join Date: Mar 2011
Rookie Year: 2011
Location: Delaware, US
Posts: 268
DELurker has a brilliant futureDELurker has a brilliant futureDELurker has a brilliant futureDELurker has a brilliant futureDELurker has a brilliant futureDELurker has a brilliant futureDELurker has a brilliant futureDELurker has a brilliant futureDELurker has a brilliant futureDELurker has a brilliant futureDELurker has a brilliant future
Re: Potentiometer, need help with programming

Quote:
Originally Posted by apalrd View Post
You're definitely better using a potentiometer.
Agreed. A pot is the sensor to use in this application.

Quote:
Originally Posted by apalrd View Post
In any case, in LabVIEW, use an 'AnalogChannel' to measure the voltage of the potentiometer. Connect the pot's ends to the black and red wires (+5v and Gnd), and the wiper to the white wire (Signal). The voltage in on the analog module will be between 0 and 5v.

Once you have the position, you can scale it from volts to degrees, or whatever units you want, or leave it in volts. From there, you can run a control loop (search here for 'PID control') for your position control.
One note: Before you connect up your pot, use an ohmmeter and check the resistance range from the wiper (center) to one of the two outer pins across the entire range of motion. We have had problems in the past with people installing pots with 270 degrees of motion but only 60 degrees of resistance change. As soon as we replaced these joystick pots with normal ones (270 degrees of motion and 270 degrees of resistance change), a lot of things worked so much better.
__________________
----------------------------------------------
With 1370 --
2012 Rutgers District Event Champions with 1676/56
2012 Lenape District Event Finalists with 2191/1691

2013 TCNJ District Event QuarterFinalists with 1143/4750, Gracious Professionalism Award
2013 Bridgewater-Raritan District Event Semi-Finalists with 4285/223
2013 MAR Championship Finalists (Backup) with 222/11/1403; Gracious Professionalism Award
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 23:25.

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