|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Angle Sensor for Vex
I'm looking for a rotation sensor for the Vex, an angle sensor. I have the optical shaft encoder, but I see that it doesn't measure the direction that the shaft is rotating, so it's impossible to use it to calculate the angle.
The new Mindstorm NXT kit will have angle measurements (to 1%) built into their servo motors, something which I think will increase the precision of Mindstorm bots significantly. I've also played around with the idea of using the optical shaft encoder and some other mechanism for seeing which direction an axle is turning, but can't come up with anything that immediately responds to a change in direction. An angle sensor is really what I'm looking for. Thx, Tac |
|
#2
|
||||
|
||||
|
Re: Angle Sensor for Vex
I don't know how to do an angle sensor, but an idea I've had is to attach an intake roller to an axle, then position a limit switch so the metal end of it gets hit by the intake roller. Since the roller and metal are flexible, they can bend and let the roller spin. The roller spinning one way will trigger the limit switch, the other way it won't.
I haven't tested this of course, just an idea. |
|
#3
|
|||||
|
|||||
|
Re: Angle Sensor for Vex
Was it the VEX sensor or the KOP sensor that pulsed for a slightly different length of time one direction than the other?
The other option would be to get a quadrature encoder, which has two inputs that fire in one order for one direction, and the other for the other direction. It involves using interrupts to listen to which one goes first, but would solve your problem. |
|
#4
|
||||
|
||||
|
Re: Angle Sensor for Vex
If you don't need 360 degrees, a potentiomiter works well. We used one this year to measure the tilt of our robot's shooting mechanism. Of course you would need to do some calibration to match the voltage values with the angles that you want to find.
Quote:
|
|
#5
|
||||
|
||||
|
Re: Angle Sensor for Vex
I can't believe I completely forgot about potentiometers. Probably because they're not standard for Vex and I was assuming he was looking for Vex parts.
A potentiometer would be a very effective use for this, most of them can measure close to 300 degrees of rotation. Alot of them are single turn, some can be turned a few times (I've seen up to 10 turn ones), and there are a few rare continuous-rotation potentiometers that can handle infinite revolutions. They would only require one pwm cable soldered on to the POT and one analog input to hook it up to for each POT. The KOP gear tooth sensors have different pulse lengths for different directions, Vex encoders are blind to direction. I should probably clarify my idea above was for sensing direction with a Vex encoder, since I failed to mention that in the post. If you're trying to tilt something to a specific angle (rather than just measure somethings angle), you could just use the Vex servos as they can be set to specific positions. I'm not entirely sure what the conversion from PWM values to degrees is, but I'm sure it could be found. |
|
#6
|
|||
|
|||
|
Re: Angle Sensor for Vex
If the motors are the sole thing controlling the motion of the robot, you can just look at the output signal to determine whether they are moving forward or backward.
0-126 Backward 127 Neutral 128-255 Forward |
|
#7
|
|||
|
|||
|
Re: Angle Sensor for Vex
Quote:
|
|
#8
|
|||||
|
|||||
|
Re: Angle Sensor for Vex
Well you can use couple, but it depends on how you use them. For example pot. are good but not that reliable, as they don't give you a precise reading (eg if you set Position A at 210, it might not remain the same and fluctuate).
I recommend using Infrared sensors, if you are mounting it on an angle and trying to find/set a certain distance. Other than that, this might help you a bit. |
|
#9
|
||||
|
||||
|
Re: Angle Sensor for Vex
What kind of accuracy and range are you looking for this sensor?
If you want to experiment with potentiometers you can find them in random parts bins at electronics stores (radio shack has them in those racks of parts). They're usually like $5-$10. I'm not sure what type of resistance the POT would need to work with Vex. |
|
#10
|
|||
|
|||
|
Re: Angle Sensor for Vex
Just wanted a wide enough range to determine when the arm was all the way down, all the way up, and an idea of where its at in the middle. I want to control an articulated arm to determine position upon bot startup and set both arms to their neutral positions, then use the sensors to detect extension and make sure the upper arm is limited while the lower arm is in its neutral position, and make sure the lower arm cannot close if the upper arm is beyond a certain point. I was thinking of using the pots connected to chain drives to do gear reduction to get a analog input for the entire range of motion along both arms.
|
|
#11
|
||||
|
||||
|
Re: Angle Sensor for Vex
IF you make the right kinda of endcoder, OR find one somewhere, just by looking at how the encoder beam is broken you can tell which direction the wheel is spinning.
For example if you have 2hall effects next to each other on a sprocket and a tooth hits the left on before hitting th right one then it is traveling one direction, and the inverse is also true for the other direction. |
|
#12
|
|||
|
|||
|
Re: Angle Sensor for Vex
UPDATE*** I used 2 50k pots (1 for each arm) and linked them directly to the pivot axle of the arm to get my readings. I know get analog values from 0 to 86 or so that I can use to determine if I am close to the arms limit for range of motion. Wiring was easy as I took a pwm extension cable and cut off the female end to solder it to the pot (center & either outer tap on pot, signal & ground on controller end). To mount it to the shaft I had to cut off some of the length (RS's pots are like 3-4 inches) and then I used a dremel to hollow out the shaft so it would fit over an axle. Origionally, I had drilled another hole in the side of the shaft for a set screw, but the walls are to thin to get any turns, so I have resorted to gluing the pot to the axle. Once accomplished, it is a simple thing to read the value of the pot to see where the arms are.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vex Ultrasonic Sensor not responding | SomeoneKnows | Programming | 6 | 18-12-2007 16:48 |
| Vex line follower sensor kit program | jbill30 | Programming | 5 | 12-05-2006 14:43 |
| Vex Sensor Sample Code | nonother | FIRST Tech Challenge | 2 | 08-05-2006 16:49 |
| VEX Ultrasonic Sensor delay | P1h3r1e3d13 | Programming | 4 | 28-03-2006 13:45 |
| Sensor or no Sensor For Autonomous mode | Kyle1010 | Programming | 14 | 22-01-2003 13:10 |