Need help picking an IMU for a quadcopter project

Hi all,

First post here! I am going to build my own quadcopter and I am currently checking IMUs. Basically, the IMU that I am looking for:

  • will be used with an Arduino MEGA
  • won't be super expensive (not over 60$ I guess)
  • I would prefer if the IMU would give me the corrected value of the 3 angles and 3 positions. I know there is a lot of code out here to design a Kalman filter or a complementary filter from the raw data but I think I will have enough other problems while building the quad so I prefer to keep it simple for the IMU. :slight_smile:

I have seen some on the Sparkfun website : IMU - SparkFun Electronics , but I couldn't choose one.. :cold_sweat:

Any advice would be greatly appreciated,
Thanks!

Hey !

I use the GY-80 (not for a quad copter though). It's cheap, it had everything you want and it's precise enough with a good filter. Nevertheless, I only used it to follow the orientation for now so I don't really now how it is for position.

Take care to choose an IMU with accels, gyroscopes AND a compass or you won't be able to have a good yaw measure because of the gyro's drift. It's a huge problem, the drift =P. Pressure sensor as well to know the altitude.
Actually, no sensors will be able to give you a precise measure directly from the raw data because of the gyro's drift I just told you about. The drift is something that happen "within the sensor" so you can't get rid of it without using a filter. You'll have to do some computation on the raw measurements. Even if it's just some comparisons between accels, gyros and compass. You know complementary filter is really an easy thing, really simple to implement and understand and as good as Kalman filter for what you want to do ;). Even more easy since people already programmed it and the source code is on github ... :stuck_out_tongue:

After that, it's about how precise you want your sensor to be. You can read the datasheets or let prices decide for you :grin:.

Thanks for the reply!

Yeah i was planning on buying an IMU with a compass (9 DOF). Does the pressure sensor realy help though? Is it that accurate?

Also I was also worried (but I don't have any estimate..) that it would be time consumming for the main arduino to compute the corrected value for position and orientation and I thought then that it will be better if it was handled by an another card. But I guess if I implement only a complementary filter it won't be that much.

I didn't play that much with the pressure sensor so I can't tell for sure if it's accurate or not. Told you I don't use it for a quadcopter so I don't need to use all the GY-80 components :~

Anyways, the complementary filter is really fast. That kind of computation are common for arduino. What's the point in doing this with another card ? I think, you even take a chance to be slower since you have to transfer the data =P.

Mariduino:
What's the point in doing this with another card ? I think, you even take a chance to be slower since you have to transfer the data =P.

When I said "another card" I meant that the calculations could have been done by some processor on the IMU card, not on a third card :stuck_out_tongue:

Ho ! Sorry for the misunderstanding.
Yes it probably could but it is also probably more expensive =~ ...

The BMP085 is very precise (2cm precision) but not very accurate. Wind affects it greatly so it needs a stable environment or some kind of windscreen.

When you buy your IMU make sure it's 5V capable or you'll need to add an additional level translator. Assuming you're looking at the cheap boards on eBay, on the board you should be able to identify a small, 6 pin, 3.3V voltage regulator and and even smaller, 6 pin I2C level translator.

Wind affects it greatly

Yeah that could be a problem, especially when the quad is flying at high speed!

My budget for the IMU is something less than 50$. Since it will be (at first) the only sensor on the quad, and the environnement could be harsh (lot of vibrations from the motors for the instance) I thought it will be worth to spend more than 10$. I have seen this one SparkFun 9DoF IMU Breakout - ICM-20948 (Qwiic) - SEN-15335 - SparkFun Electronics which doesn't look bad.

GoussLegend:
I have seen this one SparkFun 9DoF IMU Breakout - ICM-20948 (Qwiic) - SEN-15335 - SparkFun Electronics which doesn't look bad.

It's extremely overpriced. The bare chip is $13 in singles. And something else to watch out for is the logic level; the Sparkfun board requires 3.3V power and signals; a board like this one has a level translator on it and will work fine with a 5V Arduino.

Yeah I have seen MPU-9150 breakout bord at cheaper prices (here for instance => http://www.drotek.fr/shop/en/home/153-mpu9150-gyro-accelerometer-magnetometer.html)

the Sparkfun board requires 3.3V power

I thought the Arduino had a pin "3,3V" to supply 3,3V, and a pin "5V" to supply 5V ?

GoussLegend:
Yeah I have seen MPU-9150 breakout bord at cheaper prices (here for instance => http://www.drotek.fr/shop/en/home/153-mpu9150-gyro-accelerometer-magnetometer.html)

the Sparkfun board requires 3.3V power

I thought the Arduino had a pin "3,3V" to supply 3,3V, and a pin "5V" to supply 5V ?

Yeah, but the digital pins are able to supply only 5v which may damage the IMU.

GoussLegend:
Yeah I have seen MPU-9150 breakout bord at cheaper prices (here for instance => http://www.drotek.fr/shop/en/home/153-mpu9150-gyro-accelerometer-magnetometer.html)

the Sparkfun board requires 3.3V power

I thought the Arduino had a pin "3,3V" to supply 3,3V, and a pin "5V" to supply 5V ?

Yeah, but the digital pins are able to supply only 5v which may damage the IMU.

Ufoguy:
Yeah, but the digital pins are able to supply only 5v which may damage the IMU.

Hum there is something that I definetely don't understand here, on the Uno webpage (http://arduino.cc/en/Main/ArduinoBoardUno) it says:

3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.

Anyway the breakout board (http://www.drotek.fr/shop/fr/home/153-mpu9150-gyro-accelerometre-magnetometre.html) can be powered with either 3.3V or 5V but I still would like to understand :slight_smile:

Another question for IMU, What is the best way to fix it on the quadcopter frame. I see a lot a people use double side tape and foam (instead of screws) to reduce the vibration induced from the motors. But can I apply directly the double side tape on the board? :roll_eyes:

GoussLegend:

Ufoguy:
Yeah, but the digital pins are able to supply only 5v which may damage the IMU.

Hum there is something that I definetely don't understand here, on the Uno webpage (http://arduino.cc/en/Main/ArduinoBoardUno) it says:

3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.

Anyway the breakout board (http://www.drotek.fr/shop/fr/home/153-mpu9150-gyro-accelerometre-magnetometre.html) can be powered with either 3.3V or 5V but I still would like to understand :slight_smile:

Another question for IMU, What is the best way to fix it on the quadcopter frame. I see a lot a people use double side tape and foam (instead of screws) to reduce the vibration induced from the motors. But can I apply directly the double side tape on the board? :roll_eyes:

You can use the 3.3v for powering the IMU, but you use the Arduinos digital pins to communicate with it. The digital pins give a 5v signal which may damage the IMU.

Hum I think I finally understand. Some pull-up resistors should do the trick: http://playground.arduino.cc/Main/I2CBi-directionalLevelShifter

The Drotek board has a level converter on it (stated in red about 7 lines from the bottom of the page), so you don't need anything else.

GoussLegend:
Hum I think I finally understand. Some pull-up resistors should do the trick: http://playground.arduino.cc/Main/I2CBi-directionalLevelShifter

Read the page carefully. It stays you have to know the risks and suggests that making a 5v arduino recognise a 3.3v signal it's living on the edge.

Quadcopter is a very complex thing and if something fails there is a risk of crashing or losing control or some thing else. Think of this, what if the sensor fails while it's flying. So, it's better to buy an IMU that supports 5v or better yet but a MultiWii.

Yeah if the connection between the IMU and arduino is broken during flight, the quadcopter will crash for sure.

So I will go for the board that supports 5V.

Or you can a board that is 3.3V like the Arduino Pro 328, Arduino Pro 328 - 3.3V/8MHz - DEV-10914 - SparkFun Electronics so you won't need to do any level shifting.