Cost/Benefit of Third Party Gyros and Accelerometers.

Hi, so I have a few questions regarding gyroscope sensors, the analog port on the VEX Cortex, and bit-banging for I2C.

So currently I’m researching sensors for our robot, and we are looking to use a gyroscope this year for our college team. There’s the VEX Gyroscope which I have not used before, and about as much as I can tell you is that it’s a single axis gyroscope measuring the yaw rate. Also could tell you it’s analog.

Now, proposed to me by our build team is the use of a 3 in 1 Absolute-IMU Gyro, Accelerometer, Compass sensor. The Gyro and Accelerometer are 3-axis by the way. Granted this one is made for the NXT, but there is a breadboard I can buy and have headers for I2C communications.

This brings me to my 1st question: What are some benefits that I would gain by using the 3rd Party Sensor over the VEX Gyro, or vice versa? There’s not much room for us to change gyros once the decision is made due to things I can’t control, so the onus is on me to get everything working.

This brings me to my next point regarding the Cortex. How exactly do the analog ports on the Cortex interact with their sensors? I read up on it and they say a 12-bit resolution which to me would mean the values it sends out after the access time are between 0 and 4095, is this correct? At least these are the raw values?

Given this sensor here http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=158, buying the breadboard kit where the pins are Two Grounds, Power, and Data and Clock for I2C, I don’t believe I would be able to use this sensor as an analog sensor.

Now, how I would be able to use this sensor with the VEX Cortex. It would be digital in nature, no? I’m still learning my way through the I2C protocol, so how exactly would I begin with the bit-banging process?

I apologize for the long exposé of a post, but these are just questions I have about the Cortex, sensors, and programming.

High school student here.

We’ve had remarkably good results with the VEX Gyroscope. Of all the VEX Sensors, it is one of the best we’ve found. If you have no idea how to implement a third party sensor, you can easily code nearly anything you want using that, and a few IMEs. Add in some line trackers, too, and your robot will be hyper-accurate.

That being said, I really can’t comment on any third-party parts. I just wanted to mention that the VEX Gyroscope is fairly good, and you may not need to look elsewhere.

Thanks for the input!
Yeah this is the result of really a discussion and experimentation I’ve had with 3rd partys sensors. Some I can program really well, but this is actually my 1st year being able to do so because my college season last year was really rushed.

So I suppose the Yaw is really the only necessary rotation we would need in this context.

The biggest problem we have had with the VEX gyro is it’s sensitivity scale. The gyro uses a LY3100ALH device which has a range of +/- 1000dps, this is great for fast rotation but is not as useful for tracking slow rotations. Other than that it mostly works OK, just not always.

The usual way the firmware works is that all 8 analog ports are constantly being sampled, you are just given the last value read when calling SensorValue etc. ROBOTC understand a few sensors and pre-processes the data for you, the gyro is one of these and it performs the integration in the background. Looks like PROS does the same, the code I have in ConVEX is a quick and dirty implementation that gives the same result as ROBOTC and is based on some code they released a few month back.

, buying the breadboard kit where the pins are Two Grounds, Power, and Data and Clock for I2C, I don’t believe I would be able to use this sensor as an analog sensor.

You are correct.

Bit bang I2C is painful, I don’t recommend it, however, take a look at the code I released last year for the VEXPro that used bit bang I2C for the IMEs. There’s a low level I2C library in there, you will need to play with the uS delay function, it wont work directly on the cortex as the VEXpro IO was different but will give you an idea of what is involved. One other issue you will have is that I don’t think the digital ports on the cortex can be made true open drain due to the 1K series resistor, that will be a problem.

[https://vexforum.com/showpost.php?p=316651&postcount=7

A better solution would be to find an IMU with async serial control, I linked the Yost engineering part for you before I think but the price is getting a bit high. Let me see if I can find an alternative, all these devices pretty much use the same mems parts.

Other solutions would be to:

  1. Persuade the Purdue guys to expose the low level I2C interface for you
  2. Use the firmware that I will shortly release, unfortunately I worry that it may be too complex for you based on your questions.
  3. Use an arduino for the I2C comms to the IMU and then use async serial from the arduino to the cortex.](“https://vexforum.com/showpost.php?p=316651&postcount=7”)

Thanks for the answers. I’ll mull over the info tonight and tomorrow, and I’ll probably start learning a few more things.