|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Rotation sensors?
This year we need some sort of sensor to tell us the angle of rotation of a axel or something of the sort, similar to how a servo can do it. I would use a servo but I'm afraid of forcing them to rotate. Last time I checked your not supposed to do that..
Any ideas? |
|
#2
|
|||||
|
|||||
|
Re: Rotation sensors?
A potentiometer would perform the task nicely. It is used to measure the angle of the input shaft, and outputs a variable resistance (which, when hooked up correctly, translates into an analog voltage which is read by the analog board).
|
|
#3
|
|||
|
|||
|
Re: Rotation sensors?
An encoder or potentiometer can tell you how far something has rotated.
Edit: Aww, beat to it. |
|
#4
|
||||
|
||||
|
Re: Rotation sensors?
With some intense calculations made in the code, you could use the accelerometer, but this only gives you position of your robot and will not account for slippage. I don't think there will be any sensor that would work best for that. I would lean towards calculations in code but that might be because I'm a little biased.
Didn't even think about potentiometers. I like that. And code calculations |
|
#5
|
||||
|
||||
|
Re: Rotation sensors?
Use a potentiometer if you want to know an exact position of something (ie, a winch)
Use a Rotary Encoder if you want to know the speed of something (ie, the speed of a motor) |
|
#6
|
||||
|
||||
|
Re: Rotation sensors?
Quote:
Edit: It took me a while to actually reply so by the time I replied, the answer was already given... So my new question is how do I attach an encoder to a window motor and what encoder should I use? Also, what is the difference between magnetic encoders and digital encoders? We have used encoders on the AM gen 1 shifter before but don't know how to use it in any other application. Last edited by Jason Law : 16-01-2011 at 23:47. |
|
#7
|
|||||
|
|||||
|
Re: Rotation sensors?
Quote:
Or you could use a magnetic encoder. When you attach the circular magnet to a shaft, it measures the angle of the magnet and outputs a value which is analog which you can read with the cRio's ADC. Two of them come in the kit. Note that every time the angle hits 0 degrees, it wraps around to 360 degrees (same with 360 degrees to 0 degrees). |
|
#8
|
||||
|
||||
|
Re: Rotation sensors?
Quote:
|
|
#9
|
|||
|
|||
|
Re: Rotation sensors?
Where can we get an frc legal potentiometer?
|
|
#10
|
|||||
|
|||||
|
Re: Rotation sensors?
Wherever fine potentiometers are sold. There are no particular restrictions on what kind you can use (as long as you don't violate any other robot rules).
|
|
#11
|
|||
|
|||
|
Re: Rotation sensors?
Ok, and then you wire them to where?
|
|
#12
|
|||||
|
|||||
|
Re: Rotation sensors?
A potentiometer has three connections. They all go to an input on the Analog Breakout. Using a standard PWM extension cable, the black wire (ground) goes to one end of the pot, the red wire (+5 volts) goes to the other end, and the white wire (signal) goes to the pot's wiper.
|
|
#13
|
|||||
|
|||||
|
Re: Rotation sensors?
In general, single turn pots have ~270 degrees of rotation. Don't depend on all of them having this specification. Check the data to be sure and then expect something less. Never use the entire 270 degrees.
|
|
#14
|
|||
|
|||
|
Re: Rotation sensors?
Is this axle on your drivetrain? If so, you want to use an encoder because it can rotate more than 360 degrees.
A pot can't rotate past a certain degree. |
|
#15
|
|||||
|
|||||
|
Re: Rotation sensors?
You have an axle you want to measure. It is probably for an arm (the OP did not specify). Assuming its for an arm (which has a rotational limit), a potentiometer would measure the exact position at all times and output an analog signal to the cRio. No math necessary (Except to scale the 0-5v into a different range if you want, but you could use the voltage raw without issue). Whenever we have a rotational joint which software has control to adjust, it is standard practice for us to put a potentiometer on it and automate control of it. We always use potentiometers, because they are absolute (you know where you are even if you just booted up, something a quadrature encoder does not give you) and reliable.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|