Our team hooked up a photogate (I think that’s what you call it) in 2006. Basically it was an IR light and a sensor, so when the line of sight was broken, it would send a signal. I know cRIOs weren’t around back then, but it just used a digital input, same as on the cRIOs.
Temperature sensor (thermocouple), I bet there’s a team out there at some point who put this on a robot.
Light Sensor… True a camera could do this as well, but a simple light sensor can be straightforward to program as long as you calibrate at the competition venue.
And then there was the IR beacon in 2004 (basically a light sensor).
We slapped a set of those on our practice robot, and used them to tell us when to give the robot a break to prevent overheating. Really useful, and I think all our future robots are going to be sporting one per motor.
That’s an interesting idea. This is off topic, but how much drift would the gyro accumulate over the 2 minutes? I assume it will be greater the more time you hit another robot/wall. What were other teams experiencing?
I’m not sure, since our team has never actually used gyros. I’ve just heard of other teams using them. However, I seem to recall teams using accelerometers to counteract for drift (I don’t know how). A crude way to fix drift is to have a trimming potentiometer on your DriverStation i guess.
Sorry I don’t have any hard facts. Maybe someone else has had some experience with gyros personally?
The short answer is there’s no way to say for sure.
The long answer is there’s a way, but it’s really complicated. Basically, the amount of drift accumulated is very dependent on the code running the gyro. Gyros have different responses based on temperature, so some gyros contain internal thermometers that are also output to the microcontroller. Another factor is noise. If you have a gyro that communicates by serial (good luck finding one, I haven’t seen any), it’ll be more accurate than if you have a wire running around carrying an analog voltage that’s varying. With the analog signal, you have to do averaging to get any kind of usable data, and when you average, you lose resolution. Since the cRIO has such a high data rate, you could probably get away with it a little more easily. Also, MEMS devices in general work by using capacitance between a central mass and an outer edge. If you have any static charge on your robot, it may or may not affect the gyro. Also, calibration of a gyro will not necessarily work if you move it to a different location on the robot, because overall capacitance will change, and may or may not affect the capacitive difference.
I have done quite a bit of work with gyros and drift is one of the more difficult things to characterize. What we call “drift” is the effect of integrating the output of a noisy signal. In the case of a MEMS gyroscope, this noise is caused by small thermal variations and vibrations that are impossible to completely correct for. Imagine a variable with noise of +/- 1 unit at any given time. What happens if you integrate this variable? You get what is called a “random walk”, or drift.
Because electromechanical noise is usually modeled as a random variable (frequently as white noise with a mean and a variance, but no single exact value), you can never say for certain what your worst case drift will be. But, you can calculate things like your “average” drift rate over time, or your drift over various confidence intervals.
Drift rate is affected by several factors, including:
HiTechnic sells one that uses I2C. I’ve used it a bit, but within LEGO projects only. It needs pretty careful mounting away from iron and high current circuits or it will give erratic values. Otherwise works pretty well.
As for gyro drift, 120 seconds is a long time to integrate the signal, and you will find that your gyroCompass will probably have a pretty measurable error term at the end of the match. Another issue which occurs much more quickly is when the rate gyro exceeds its max rate. In other words, the gyro will only report X degrees of turn in a time period, and you have a powered turn or a bump that exceeds X. The reported value will be X, and the excess will become an error in your compass reading.
Gyros are tricky beasties - that is certainly for sure, but since the little accelerometers and gyros are becoming ubiquitous, I’ve notice a trend towards the digital serial-enabled gyros - here’s one on Sparkfun http://www.sparkfun.com/commerce/product_info.php?products_id=8372
It is worth noting that though 300 degrees/sec seems like a lot, a second is actually quite long, and 300 degrees is less than one rotation - if you’re doing 1 rev/s, you’ll max out the range on most low-cost gyros.
As for drift, the previous posts are quite accurate - the amount of drift depends heavily on the sensor, the environment, and the algorithm. Many sensors you’ll find today are temperature-compensated, which will help with environmental issues, but hard shocks and sudden rotation will confuse them fairly easily - they’re more used to smooth motion, which FIRST robots aren’t used to performing. That being said, if you feel like some clever programming, there are filters out there that can get ridiculously accurate - the Kalman filter, for example, is a state-space recursive estimation algorithm that, if properly tuned, can give very accurate readings from a gyro. It takes some fairly high-level math, though, so unless you’ve got time or someone who has done one, keep looking.
As for compasses (or magnetometers), I’ve had some luck with the Honeywell sensors - the particular model I’ve used isn’t sold anymore - but they are designed to operate on extremely weak magnetic fields, and placing it anywhere close to a motor or ferrous metal will make it nearly inoperable. In short, it can be done, it just requires either clever programming or isolation.
I’ve experimented a little with capacitive and inductive sensors. These fall under the radar of “proximity” sensors, if you look in the mouser electronics catalog. There is a gargantuan list of sensors that can be used with the CRio. Again, look in the mouser catalog. I’ve also used the PIR sensor from parallax that you can get for $10 from RadioShack. RadioShack also sells an ultrasonic rangefinder, for about $40, also made by parallax.
Also, I recently went to home depot and picked up a set of Garage Door sensors. These are those things that go behind the door, and send a beam of IR between them. When something is blocking that, the door will not close. The weird thing is, both the transmitter and receiver have two terminals. This would make sense for the transmitter, as it would have one for +V and the other for GND. I would expect, however, that the receiver has a +V, GND, and Signal. but it doesn’t. I’ll be playing around with this, and when I find what’s what, i’ll let you know.