Shop OBEX P1 Docs P2 Docs Learn Events
sensor accelerometer and gyroscope: sparkfun vs chinese version — Parallax Forums

sensor accelerometer and gyroscope: sparkfun vs chinese version

Hello!

I want to build a monowheel vehicle, I buy some years ago two accelerometer: Memsic 2125 Dual-axis and H48C Tri-Axis, are great to measure angles if the vehicle is stationary :), I need a Gyroscope too for that.
I saw that Parallax have a great price to Gyroscope Module 3-Axis.
At this moment I was thinking about buy something like (https://www.sparkfun.com/products/10121) and I see that the chinese version is much more cheaper (http://www.ebay.com/itm/IMU-Digital-Combo-Board-6-Degrees-of-Freedom-6DOF-ITG3200-ADXL345-Helicoper-/270968365840?hash=item3f16f92310:g:XSoAAOSwiuZTz1PQ#shpCntId).
At this moment I think I will give a chance to the chinese sensor :P But I really want to hear yours opinions about that. I can use the same code to the sparkfun sensor and the chinese version?

Thanks a lot!

Comments

  • kwinnkwinn Posts: 8,697
    The quality of the Sparkfun board appears to be better than the chinese board, but they both seem to use the same chips. In theory the same software should run on both, assuming of course the chips are genuine or good working clones.
  • Heater.Heater. Posts: 21,230
    None of the above.

    How about a BOSCH BN0055 9 DOF IMU from Adafruit? Giro, accelerometer and compass all in one. With the great benefit that they have put the required sensor fusion software into the chip so you don't need to write or find that yourself. It just outputs an orientation in 3D space directly.

    https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/overview

  • Heater is right ... having the orientation pre-coded would save a lot of time and frustration. It seems that the BNO board doesn't retain the calibration data between uses (seems odd). I don't know if you can download the calibration data to the micro and send it back on bootup.

    https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/device-calibration

    I use the Adafruit MinIMU v3 ... plug and play except for the coding part. They are now selling v5. Straight SPIN with some floating point got me to 30 Hz updates.
  • ASAS Posts: 149
    Really thanks!

    I think I will try the chinese solution, thanks kwinn, I think exactly the same about this sensor. When it arrives I will say something. (more than a month :P from China to Portugal)

    Heater., the BOSCH BN0055 9 DOF IMU from Adafruit is great, thanks a lot, I really want to buy this sensor.
    I only have an issue with adafruit to buy from Europe (Portugal), the shipping cost :P

    PaulRowntree, thanks a lot, the MiniIMU sugestion is great and with good price. The issue is the same I pay more to shipping costs than for the sensor :P, I will look for it in ebay.


  • Heater is right ... having the orientation pre-coded would save a lot of time and frustration. It seems that the BNO board doesn't retain the calibration data between uses (seems odd). I don't know if you can download the calibration data to the micro and send it back on bootup...

    You can get the calibration offsets from one calibration and then reuse them on subsequent reboots. The calibration values will change with the environment. Unless used in a controlled environment, old values will become unreliable.
  • ASAS Posts: 149
    Thanks xanadu!

    Old values will become unreliable? Oh no!! From all sensors? accelerometer and gyroscope?

    I´m thinking in a button to calibration!? any other sugestion?

    Thanks!
  • Heater.Heater. Posts: 21,230
    All instruments need to be calibrated.

    It seems that having done it once you can extract the calibration data and send it back next time you power the device. Calibration only has to be done once.

    It also seems that the thing is usable without calibration.

    I guess it depends on how demanding your application is.
  • xanaduxanadu Posts: 3,347
    edited 2016-05-11 03:14
    I probably should have mentioned the gyro and accelerometer are useable without calibration. You could easily verify calibration status by holding your balance bot level and using a status indicator. The magnetometer is where you end up needing regular calibration. You wouldn't really need magnetic heading on a balance bot so it probably doesn't matter. I was a bit surprised by the amount of drift on the yaw of the BNO055 and that is why I bring it up.

    Here is a good article on a few of the sensor fusion chips, and some comparisons - https://github.com/kriswiner/MPU-6050/wiki/Hardware-Sensor-Fusion-Solutions

    Fusion aside, since the Elev-8 V3 flight controller code is available, I don't think it would take much to use the same sensors on that flight controller and modify the code to work with a 6 DOF gyro/accel combo to make a balance bot.
  • ASAS Posts: 149
    Thanks, Heater. and xanadu.

    At this moment I think I will need only the accelerometer and the gyroscope, I thought that xanadu says: the values could change with the temperature or something else. With some sensors I can have this issue but not with the accelerometer and the gyroscope!? great!!
  • You can have issues with the other sensors. They will need to be calibrated to the balance point of the balance bot at least once. Not nearly as much as something using a magnetometer.

    When I say you can use them without calibration I mean you're essentially returning arbitrary values accurately. So you could measure 20 degrees of tilt no problem. On a balance bot the perfectly upright position cannot be arbitrary, it needs to be perpendicular to the surface of the earth.
  • The BNO055 datasheet says it can provide linear acceleration independent of the gravity vector. This would be great, but does anyone know how it can do this?
  • Heater.Heater. Posts: 21,230
    edited 2016-05-22 17:19
    What do yo mean?

    An accelerometer cannot tell the difference between acceleration and gravity.

    Edit: ...

    OK. If you happen to know you are stationary. You can assume whatever acceleration is registered is due to gravity.

    Then when you are moving you can subtract that gravitational component from whatever your acceleration is measured to be.

    In short, I have no idea how that chip might do it :)

    Presumably there is a way to tell it to offset the accelerometer readings to be zero when it is stationary.
  • Well, that is my confusion too. There is no way that I know of the get 6 pieces of information from three data readings, even if we know what the magnitude of the gravity acceleration is. Unless it assumed it was starting off level, and it integrated the gyro readings over time to get some independent idea of the orientation. Beats me.
  • JasonDorieJasonDorie Posts: 1,930
    edited 2016-05-22 18:18
    If you know your current orientation, a 1G vector pointing "down" in that orientation is subtracted from the accelerometer reading. What remains is forces that aren't gravity. The whole point of this sensor is to compute orientation, so it has that.
  • PaulRowntreePaulRowntree Posts: 150
    edited 2016-05-22 18:58
    But Jason, doesn't it use the acc sensor data to find the orientation? it must have (or guess) some additional info to get both orientation and linear acc. My app is an autohelm on a sailboat, and I need true orientation to correct the mag compass readings. Since the boat is always pitching about (ie accelerating) in different directions, having a true orientation sensor would be very cool. I just don't know how it could be done.
  • JasonDorieJasonDorie Posts: 1,930
    edited 2016-05-23 19:32
    On average, your boat is only subject to acceleration due to gravity - it's the "on average" part that's important. Quadcopters use the same idea to maintain orientation. If you were to execute a long, continuous, coordinated turn (or some similarly unusual motion) you'll eventually confuse it, which is why some IMU's compensate for centripetal forces with a GPS, but that's not required otherwise.

    IMU's principally use the gyro readings to maintain orientation, and use the accelerometer only for drift correction. If you take the average of all your accelerometer readings over 10 seconds, the non-gravity forces will mostly cancel each other out, and what you're left with is just gravity.

    The Elev8 FC actually uses the oriented force readings (minus gravity) to estimate altitude, and then uses the barometer to correct the integration drift, so it's computing the same data as the Bosch sensor, but at 250hz instead of 100hz (though I'm not computing heading with the compass yet).
  • ASAS Posts: 149
    edited 2016-05-31 21:37
    Thanks JasonDorie for your comments.

    The chinese version is working great!!

    Question:
    Which sensor (acellerometer and gyroscope) is used in the Elev8?
    I was looking to this source:
    https://github.com/parallaxinc/Flight-Controller
    Is possible use C or SPIN, great!!
    How to apply this code to this sensor.
    http://www.ebay.com/itm/270968365840?_trksid=p2060353.m2749.l2649&ssPageName=STRK:MEBIDX:IT

    I using this code:
    https://github.com/simondlevy/FreeSixIMU2 - with Arduino
    Is working very good!!
    I will try it with Propeller with PropWare.

    The issue with this code is that It do not apply any filter:
    http://obex.parallax.com/object/514

    I will try apply this sensor (with Kalman filter) to Propeller I´m looking for the easy solution!!? any sugestion?!

    I think this is a good information:
    http://www.pieter-jan.com/node/11

  • AS wrote: »
    Thanks JasonDorie for your comments.

    The chinese version is working great!!

    Question:
    Which sensor (acellerometer and gyroscope) is used in the Elev8?

    LSM9DS1 IMU (3D accelerometer, 3D gyroscope, 3D magnetometer)
Sign In or Register to comment.