|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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 |
|
#2
|
||||
|
||||
|
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.
|
|
#3
|
|||||
|
|||||
|
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. |
|
#4
|
|||
|
|||
|
Re: Potentiometer, need help with programming
Agreed. A pot is the sensor to use in this application.
Quote:
|
|
#5
|
||||||
|
||||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|