Any sensor we can use to determine the angle of, say, our launcher?
Gyro seems interesting but we’d have to integrate the rate of change of the launcher angle; any more reasonable method of finding angle?
Thanks.
Any sensor we can use to determine the angle of, say, our launcher?
Gyro seems interesting but we’d have to integrate the rate of change of the launcher angle; any more reasonable method of finding angle?
Thanks.
Use a potentiometer.
In what fashion?
We’ve never delved into analog devices for use on the robot - so we’re pretty blank on how we’d do that.
However, can we actually get angle from the gyro sensor? http://www.wbrobotics.com/javadoc/edu/wpi/first/wpilibj/Gyro.html getAngle() seems to suggest so…
A potentiometer is just a voltage divider. One end gets wired to power the other to ground and the middle is your signal that will vary between 0-5v. Attach it to the pivot point and the voltage will correspond to where it is in its travel. No it does not tell you the angle directly but you don’t really need that info you want to be able to drive it to a certain position. So you command your motor to run until you get the desired voltage output and then stop.
I would recommend a potentiometer as well. If your launcher always starts at the same location, a quadrature encoder would work as well. You can also use a magnetic encoder, although i don’t recommend this.
I do not recommend a gyro as any small amount of drift will greatly affect your shooter’s accuracy.
Gyros give yaw-rate information from which angle can be derived. The issue is that it does not give position relative to the robot, it gives position relative to the position it was in when it was last initialized. Depending on the direction your robot is facing, straight ahead could be any angle. Also, the angle tends to drift over time as errors accumulate so accuracy would degrade as the match progressed.
Potentiometers are a much better option since they will give you position relative to the robot with decent repeatability.
We were thinking of using an accelerometer for our shooter, but we will hav to see how the vibration effects the reading first.
If that doesn’t work out, we may use a potentiometer instead.
I don’t recommend that. Accelerometer readings can be affected by any small jerks or movement, probably even the vibration of the shooter wheels. Programming would also be more complicated. Potentiometers are more consistent, less noisy and easier to program.
Just brainstorming a few ideas. If you don’t like the idea of potentiometer, you
Could use a magnet and a 2 axis magnetometer (actually, you might be able to get away with just a single axis if you set it up right).
Could also use a 2 axis accelerometer (mount it to your shooter and measure which way gravity is pointing).
Could also use a rotary encoder.
could probably use your webcam if you set it up properly.
Or you could use a strain gauge if you attach a spring to your shooter.
But most people have reasonable success with a potentiometer.
Another reasonable possibility (that may even work better than a potentiometer) is to use an encoder and limit switches to calibrate the ends of the device’s travel