Ask Your Question

Revision history [back]

The chip used in the turtlebot is the ADXRS613 described here

Unfortunately the main distributor of the breakout for this board was Sparkfun, but they've discontinued the breakout due to the gyro being end-of-lifed by the manufacturer. You may be able to find some resellers that still have stock, but I haven't had much success.

Here's a similar replacement from Sparkfun. If you're operating with a iRobot Create then you can hook up the analog out of the gyro to the same DB-25 pins described in the previous answer. You'll probably have to modify gyro.py in the src folder of the turtlebot_driver package. However, a quick glance at that file shows a slightly different formula for calculating orientation than I'm familiar with.

Here's the calculation (in C++) that I use on my cheap gyro (from bilibot repo):

    double dt = current_time - last_time; // last time we read adc
    double maxValue = 255; // using 8bit adc
    double vRef = 5;  // 5v reference
    double zeroRateV = cal_offset * vRef / maxValue;
    double sensitivity = 0.013;  // from datasheet

    rate = (gyro_adc * vRef / maxValue - zeroRateV) / sensitivity;

    orientation += rate * dt;

You'll have to figure out from the datasheet what the sensitivity value is as well as the zeroRateVoltage.

The chip used in the turtlebot is the ADXRS613 described here

Unfortunately the main distributor of the breakout for this board was Sparkfun, but they've discontinued the breakout due to the gyro being end-of-lifed by the manufacturer. You may be able to find some resellers that still have stock, but I haven't had much success.

Here's a similar replacement from Sparkfun. If you're operating with a iRobot Create then you can hook up the analog out of the gyro to the same DB-25 pins described in the previous answer. You'll probably have to modify gyro.py in the src folder of the turtlebot_driver package. However, a quick glance at that file shows a slightly different formula for calculating orientation than I'm familiar with.

Here's the calculation (in C++) that I use on my cheap gyro (from bilibot repo):

    double dt = current_time - last_time; // last time we read adc
ADC
    double maxValue = 255; 1024; // using 8bit adc
Create's 10-bit ADC
    double vRef = 5;  // 5v reference
    double zeroRateV = cal_offset * vRef / maxValue;
maxValue; // I calculate zeroRateV from a circular buffer during startup, calc_offset is the average of these values
    double sensitivity = 0.013;  // from datasheet

    rate = (gyro_adc * vRef / maxValue - zeroRateV) / sensitivity;

    orientation += rate * dt;

You'll have to figure out from the datasheet what the sensitivity value is as well as the zeroRateVoltage.

and substitute it in the equation above.

The chip used in the turtlebot is the ADXRS613 described here

Unfortunately the main distributor of the breakout for this board was Sparkfun, but they've discontinued the breakout due to the gyro being end-of-lifed by the manufacturer. You may be able to find some resellers that still have stock, but I haven't had much success.

Here's a similar replacement from Sparkfun. If you're operating with a iRobot Create then you can hook up the analog out of the gyro to the same DB-25 pins described in the previous answer. You'll probably have to modify gyro.py gyro.py in the src folder of the turtlebot_driver turtlebot_node package. However, a quick glance at that file shows a slightly different formula for calculating orientation than I'm familiar with.

Here's the calculation (in C++) that I use on my cheap gyro (from bilibot repo):

    double dt = current_time - last_time; // last time we read ADC
    double maxValue = 1024; // using Create's 10-bit ADC
    double vRef = 5;  // 5v reference
    double zeroRateV = cal_offset * vRef / maxValue; // I calculate zeroRateV from a circular buffer during startup, calc_offset is the average of these values
    double sensitivity = 0.013;  // from datasheet

    rate = (gyro_adc * vRef / maxValue - zeroRateV) / sensitivity;

    orientation += rate * dt;

You'll have to figure out from the datasheet what the sensitivity value is and substitute it in the equation above.

above. It should be relatively trivial to modify gyro.py's publish method if need be to match the above calculation.

The chip used in the turtlebot is the ADXRS613 described here

Unfortunately the main distributor of the breakout for this board was Sparkfun, but they've discontinued the breakout due to the gyro being end-of-lifed by the manufacturer. You may be able to find some resellers that still have stock, but I haven't had much success.

Here's a similar replacement from Sparkfun. If you're operating with a iRobot Create then you can hook up the analog out of the gyro to the same DB-25 pins described in the previous answer. You'll probably have to modify gyro.py in the src folder of the turtlebot_node package. However, a quick glance at that file shows a slightly different formula for calculating orientation than I'm familiar with.

Here's the calculation (in C++) that I use on my cheap gyro (from bilibot repo):

    double dt = current_time - last_time; // last time we read ADC
    double maxValue = 1024; // using Create's 10-bit ADC
    double vRef = 5;  // 5v reference
    double zeroRateV = cal_offset * vRef / maxValue; // I calculate zeroRateV from a circular buffer during startup, calc_offset is the average of these values
    double sensitivity = 0.013;  // from datasheet

    rate = (gyro_adc * vRef / maxValue - zeroRateV) / sensitivity;

    orientation += rate * dt;

You'll have to figure out from the datasheet what the sensitivity value is and substitute it in the equation above. It should be relatively trivial to modify gyro.py's publish method if need be to match the above calculation.

The chip used in the turtlebot is the ADXRS613 described here

Unfortunately the main distributor of the breakout for this board was Sparkfun, but they've discontinued the breakout due to the gyro being end-of-lifed by the manufacturer. You may be able to find some resellers that still have stock, but I haven't had much success.

Here's a similar replacement from Sparkfun. If you're operating with a iRobot Create then you can hook up the analog out of the gyro to the same DB-25 pins described in the previous answer. You'll probably have to modify gyro.py in the src folder of the turtlebot_node package. However, a quick glance at that file shows a slightly different formula for calculating orientation than I'm familiar with.

Here's the calculation (in C++) that I use on my cheap gyro (from bilibot repo):

    double dt = current_time - last_time; // last time we read ADC
    double maxValue = 1024; // using Create's 10-bit ADC
    double vRef = 5;  // 5v reference
    double zeroRateV = cal_offset * vRef / maxValue; // I calculate zeroRateV from a circular buffer during startup, calc_offset is the average of these values
    double sensitivity = 0.013;  // from datasheet

    rate = (gyro_adc * vRef / maxValue - zeroRateV) / sensitivity;

    orientation += rate * dt;

You'll have to figure out from the datasheet what the sensitivity value is and substitute it in the equation above. It should be relatively trivial to modify gyro.py's publish method if need be to match the above calculation.

The chip used A post on how to hook up a gyro mimicking the configuration in the turtlebot is the with a ADXRS613 described can be found here

Unfortunately the main distributor of the breakout for this board was Sparkfun, but they've discontinued the breakout due to the gyro being end-of-lifed by the manufacturer. You may be able to find some resellers that still have stock, but I haven't had much success.

Here's a similar replacement from Sparkfun. If you're operating with a iRobot Create then you can hook up the analog out of the gyro to the same DB-25 pins described in the previous answer. You'll probably have to modify gyro.py in the src folder of the turtlebot_node package. However, a quick glance at that file shows a slightly different formula for calculating orientation than I'm familiar with.

Here's the calculation (in C++) that I use on my cheap gyro (from bilibot repo):

    double dt = current_time - last_time; // last time we read ADC
    double maxValue = 1024; // using Create's 10-bit ADC
    double vRef = 5;  // 5v reference
    double zeroRateV = cal_offset * vRef / maxValue; // I calculate zeroRateV from a circular buffer during startup, calc_offset is the average of these values
    double sensitivity = 0.013;  // from datasheet

    rate = (gyro_adc * vRef / maxValue - zeroRateV) / sensitivity;

    orientation += rate * dt;

You'll have to figure out from the datasheet what the sensitivity value is and substitute it in the equation above. It should be relatively trivial to modify gyro.py's publish method if need be to match the above calculation.

A post on how to hook up a gyro mimicking the configuration in the turtlebot with a ADXRS613 can be found here

Unfortunately the main distributor of the breakout for this board was Sparkfun, but they've discontinued the breakout due to the gyro being end-of-lifed by the manufacturer. You may be able to find some resellers that still have stock, but I haven't had much success.

UPDATE: There seem to be a few left here, however these will probably dry up soon.

Here's a similar replacement from Sparkfun. If you're operating with a iRobot Create then you can hook up the analog out of the gyro to the same DB-25 pins described in the previous answer. You'll probably have to modify gyro.py in the src folder of the turtlebot_node package. However, a quick glance at that file shows a slightly different formula for calculating orientation than I'm familiar with.

Here's the calculation (in C++) that I use on my cheap gyro (from bilibot repo):

    double dt = current_time - last_time; // last time we read ADC
    double maxValue = 1024; // using Create's 10-bit ADC
    double vRef = 5;  // 5v reference
    double zeroRateV = cal_offset * vRef / maxValue; // I calculate zeroRateV from a circular buffer during startup, calc_offset is the average of these values
    double sensitivity = 0.013;  // from datasheet

    rate = (gyro_adc * vRef / maxValue - zeroRateV) / sensitivity;

    orientation += rate * dt;

You'll have to figure out from the datasheet what the sensitivity value is and substitute it in the equation above. It should be relatively trivial to modify gyro.py's publish method if need be to match the above calculation.

A post on how to hook up a gyro mimicking the configuration in the turtlebot with a an ADXRS613 can be found here

Unfortunately the main distributor of the breakout for this that board was Sparkfun, but Sparkfun and they've discontinued the breakout due to the gyro being end-of-lifed by the manufacturer. You may be able to find some resellers that still have stock, but I haven't had much success.

UPDATE: There seem to be a few left here, however these will probably dry up soon.

Here's a similar This might make a suitable replacement (also from Sparkfun. Sparkfun). If you're operating with a iRobot Create then you can hook up the analog out of the gyro to the same DB-25 pins described in the previous answer. first linked post. You'll probably have to modify gyro.py in the src folder of the turtlebot_node package. However, package a bit. Taking a quick glance at that file shows a slightly different formula for calculating orientation than I'm familiar with.

Here's with, so here's the calculation (in C++) that I use on my cheap gyro (from bilibot repo):

    double dt = current_time - last_time; // last time we read ADC
    double maxValue = 1024; // using Create's 10-bit ADC
    double vRef = 5;  // 5v reference
    double zeroRateV = cal_offset avg * vRef / maxValue; // I calculate zeroRateV from a circular buffer during startup, calc_offset avg is the average of these values
    double sensitivity = 0.013;  // mV/deg/sec from datasheet

    rate = (gyro_adc * vRef / maxValue - zeroRateV) / sensitivity;

    orientation += rate * dt;

You'll have to figure out from the datasheet what the sensitivity value is and substitute it in the equation above. It should be relatively trivial to modify gyro.py's publish method if need be to match the above calculation.

In short, yes you should be able to get away with replacing your turtlebot's gyro with another similar one--since most cheap gyros operate in the same manner: outputting an analog voltage proportional to the angular rate about the axis of the sensor package it shouldn't be too difficult.

A post on how to hook up a rate gyro mimicking the configuration in the turtlebot with an (its not specific to the ADXRS613 it refers to) can be found here. This can be useful if you don't actually have a turtlebot, but rather just a create with a laptop (no turtlebot power/gyro board).

Unfortunately the main distributor of the breakout for the that boardADXRS613 breakout was Sparkfun and they've discontinued the that breakout due to the gyro chip being end-of-lifed by the manufacturer. You may be able to find some resellers that still have stock, but I haven't had much success.

UPDATE: There seem to be a few left here, however these will probably dry up soon.

This might make a suitable replacement (also from Sparkfun). If you're operating with a iRobot Create then you can hook up the analog out of the gyro to the same DB-25 pins described in the first linked post. You'll probably also have to modify gyro.py in the src folder of the turtlebot_node package a bit. Taking a quick glance at that file shows a slightly different formula for calculating orientation than I'm familiar with, so here's the calculation (in C++) that I use on my cheap gyro (from bilibot repo):

    double dt = current_time - last_time; // last time we read ADC
    double maxValue = 1024; // using Create's 10-bit ADC
    double vRef = 5;  // 5v reference
    double zeroRateV = avg * vRef / maxValue; // I calculate zeroRateV from a circular buffer during startup, avg is the average of these values
    double sensitivity = 0.013;  // mV/deg/sec from datasheet

    rate = (gyro_adc * vRef / maxValue - zeroRateV) / sensitivity;

    orientation += rate * dt;

You'll have to figure out from the datasheet what the sensitivity (mV/deg/sec) value is and substitute it in the equation above. It should be relatively trivial to modify gyro.py's publish method if need be to match the above calculation.

In short, yes you should be able to get away with replacing your turtlebot's gyro with another similar one--since one without having to "write a driver" per se--since most cheap gyros operate in the same manner: outputting an analog voltage proportional to the angular rate about the axis of the sensor package it shouldn't be too difficult. should only require minor modification of the turtlebot's existing gyro.py python module.

A post on how to hook up a rate gyro mimicking the configuration in the turtlebot (its not specific to the ADXRS613 it refers to) can be found here. This can be useful if you don't actually have a turtlebot, but rather just a create with a laptop (no turtlebot power/gyro board).

Unfortunately the main distributor for the ADXRS613 breakout was Sparkfun and they've discontinued that breakout due to the chip being end-of-lifed by the manufacturer. You may be able to find some resellers that still have stock, but I haven't had much success.

UPDATE: There seem to be a few left here, however these will probably dry up soon.

This might make a suitable replacement (also from Sparkfun). If you're operating with a iRobot Create then you can hook up the analog out of the gyro to the same DB-25 pins described in the first linked post. You'll probably also have to modify gyro.py in the src folder of the turtlebot_node package a bit. Taking a quick glance at that file shows a slightly different formula for calculating orientation than I'm familiar with, so here's the calculation (in C++) that I use on my cheap gyro (from bilibot repo):

    double dt = current_time - last_time; // last time we read ADC
    double maxValue = 1024; // using Create's 10-bit ADC
    double vRef = 5;  // 5v reference
    double zeroRateV = avg * vRef / maxValue; // I calculate zeroRateV from a circular buffer during startup, avg is the average of these values
    double sensitivity = 0.013;  // mV/deg/sec from datasheet

    rate = (gyro_adc * vRef / maxValue - zeroRateV) / sensitivity;

    orientation += rate * dt;

You'll have to figure out from the datasheet what the sensitivity (mV/deg/sec) value is and substitute it in the equation above. It should be relatively trivial to modify gyro.py's publish method if need be to match the above calculation.

In short, yes you should be able to get away with replacing your turtlebot's gyro with another similar one without having to "write a driver" per se--since most cheap gyros operate in the same manner: outputting an analog voltage proportional to the angular rate about the axis of the sensor package it should only require minor modification of the turtlebot's existing gyro.py python module.

A post on how to hook up a rate gyro mimicking the configuration in the turtlebot (its not specific to the ADXRS613 it refers to) can be found here. This can be useful if you don't actually have a turtlebot, but rather just a create with a laptop (no turtlebot power/gyro board).

Unfortunately the main distributor for the ADXRS613 breakout was Sparkfun and they've discontinued that breakout due to the chip being end-of-lifed by the manufacturer. You may be able to find some resellers that still have stock, but I haven't had much success.success.

UPDATE: There seem to be a few left here, however these will probably dry up soon.

UPDATE 2: It should be noted that ClearPath, one of the distributors of the Turtlebot has apparently switched to the ADXRS652 chip. Since they have in-house fab capability, its unlikely they'll produce a breakout for this chip--you'd have to make your own or wait for someone like Sparkfun to make one.

The ThisMLX90609 breakout might make a suitable replacement (also from Sparkfun). If Again, if you're just operating with a iRobot Create then you can hook up the analog out of the gyro to the same DB-25 pins described in the first linked post. You'll probably also have to modify gyro.py in the src folder of the turtlebot_node package a bit. Taking a quick glance at that file shows a slightly different formula for calculating orientation than I'm familiar with, so here's the calculation (in C++) that I use on my cheap gyro (from bilibot repo):

    double dt = current_time - last_time; // last time we read ADC
    double maxValue = 1024; // using Create's 10-bit ADC
    double vRef = 5;  // 5v reference
    double zeroRateV = avg * vRef / maxValue; // I calculate zeroRateV from a circular buffer during startup, avg is the average of these values
    double sensitivity = 0.013;  // mV/deg/sec from datasheet

    rate = (gyro_adc * vRef / maxValue - zeroRateV) / sensitivity;

    orientation += rate * dt;

You'll have to figure out from the datasheet what the sensitivity (mV/deg/sec) value is and substitute it in the equation above. It should be relatively trivial to modify gyro.py's publish method if need be to match the above calculation.

In short, yes you should be able to get away with replacing your turtlebot's gyro with another similar one without having to "write a driver" per se--since most cheap gyros operate in the same manner: outputting an analog voltage proportional to the angular rate about the axis of the sensor package it should only require minor modification of the turtlebot's existing gyro.py python module.

A post on how to hook up a rate gyro mimicking the configuration in the turtlebot (its not specific to the ADXRS613 it refers to) can be found here. This can be useful if you don't actually have a turtlebot, but rather just a create with a laptop (no turtlebot power/gyro board).

Unfortunately the main distributor for the ADXRS613 breakout was Sparkfun and they've discontinued that breakout due to the chip being end-of-lifed by the manufacturer. You may be able to find some resellers that still have stock, but I haven't had much success.

UPDATE: There seem to be a few left here, however these will probably dry up soon.

UPDATE 2: It should be noted that ClearPath, one of the distributors of the Turtlebot has apparently switched to the ADXRS652 chip. Since they have in-house fab capability, its unlikely they'll produce a breakout for this chip--you'd have to make your own or wait for someone like Sparkfun to make one.

The MLX90609 breakout breakout might make a suitable replacement (also from Sparkfun). (from Sparkfun or Active Robots). Again, if you're just operating with a iRobot Create then you can hook up the analog out of the gyro to the same DB-25 pins described in the first linked post. You'll probably also You may still have to modify gyro.py in the src folder of the turtlebot_node package a bit. Taking a quick glance at that file shows a slightly different formula for calculating orientation than I'm familiar with, so here's the calculation (in C++) that I use on my cheap gyro (from bilibot repo):

    double dt = current_time - last_time; // last time we read ADC
    double maxValue = 1024; // using Create's 10-bit ADC
    double vRef = 5;  // 5v reference
    double zeroRateV = avg * vRef / maxValue; // I calculate zeroRateV from a circular buffer during startup, avg is the average of these values
    double sensitivity = 0.013;  // mV/deg/sec from datasheet

    rate = (gyro_adc * vRef / maxValue - zeroRateV) / sensitivity;

    orientation += rate * dt;

You'll have to figure out from the datasheet what the sensitivity (mV/deg/sec) value is and substitute it in the equation above. It should be relatively trivial to modify gyro.py's publish method if need be to match the above calculation.