Go Down

Topic: MPU6050 Breakout Board GY-521 - Wrong Capacitor Results in Erratic Data (Read 17565 times) previous topic - next topic

tjschweizer

Hey everyone, long time lurker first time poster. I've been so thankful over the past few years at everyone on these forums who give up great information, and now it is my turn to return the favor.

A few years ago I ordered a GY-521 breakout board for the MPU 6050 from Amazon:
http://www.amazon.com/Kootek-MPU-6050-MPU6050-sensors-Accelerometer/dp/B008BOPN40

If you look at the product pictures carefully, you can see they are actually showing two different boards. The second picture is the one I got in January 2014, and the first picture is the one I got about a month ago when I ordered a few more. It may be easiest to see the difference if you look at the voltage regulator - one of them has a capacitor between the voltage regulator and the jumper pins, and one doesn't.

The newest version I got a month ago was giving me absolutely HORRIBLE data. When I had the digital low pass filter as high as it could go, and the accelerometer range set to +-2g, I was still getting +-0.5g of noise. The value would jump from -0.5g to 0.5g while the sensor was sitting still. The sensors I got in 2014 only had about 0.01g of noise.

So after a few weeks of investigation including oscilloscopes, pulling another MPU6050 out of an old Galaxy S3, and a bunch of other stuff I finally figured out the problem. One of the capacitors is the wrong value.

According to the datasheet, the Regulator Filter Capacitor should be 0.1 uF, but the one on the board is around 2 nF. Replacing this capacitor brought the deviation of the accelerometer down to 0.01g without any low pass filter.

Check out the attached picture to see which capacitor needs to be replaced.
Check out my website for more information about my projects: http://learn-cnc.com

Koepel

Thank you for all the effort to find the problem !
I have added a link to this post here : http://playground.arduino.cc/Main/MPU-6050#boards

The capacitor at CPOUT should be 2.2 nF, so they had already the 2.2 nF in the factory assembly line. The capacitor at the REGOUT should be indeed 100nF. I guess it was cheaper to use the wrong 2.2 nF there, and since it works (a little) they didn't care.

pdx_tech

Hi! Thank you very much  for this article. It saved me from breaking my head. Was running around trying to figure out what went wrong.
Another help needed, is there a specific make of capacitor you have used or type of capacitor like - Tantalum or Aluminium Electrolytic or multilayer ceramic capacitor .
From the picture i can make out its a ceramic capacitor.
Thanks for your guidance.
Regards,
Harish

tjschweizer

Hey no problem at all, glad I could be of help. I just used a standard ceramic capacitor - I have a pack of 0603 SMD components (although I think the components on the GY-521 are 0402) so I just put a ceramic cap in.

The way I even found out which capacitor it was is by taking a radial ceramic capacitor and just jumping the pins on the capacitors on the board (since for capacitors in parallel you add the capacitance) and watching the output on the Arudino serial monitor. So if you are in a pinch, I imagine any ceramic capacitor would do.
Check out my website for more information about my projects: http://learn-cnc.com

pdx_tech

Thank you very much. I will get the 0402 or the 0603 .
Thanks a ton.
have a nice day.
Regards,
Harish

fallout_music

Thanks so much for posting this information, I just got this GY-521 board from Amazon and had multiple problems with it. The small but frustrating and time consuming problem was that the extension 2.5mm header cables that I got are complete garbage and make intermittent connections - I cut the ends off of them and kept the wires for reuse. A larger problem was that the data coming from the sensor was erratic and jumping all over the place - obviously something was wrong. Did a lot of searching and finally found this post and after trying lots of different things I de-soldered that cap and sure enough it measured about 2nf. Closest one I had near that size was 150nf so I tried that to see if it would make things better. The sensor data is now very stable and this has fixed the problem. If you don't have 100nf I bet anything close to that would work well, these caps have quite a large tolerance range anyway. My board is identical to the OP's except for the silkscreen labeling is a little different on mine (SDA is marked S1DA, etc) and that cap is labeled C7 and the one to the left of it is C2. Thanks again for posting a solution this problem.

catccaatt

Oh my goodness, this is exactly the link I bought.

Does other brand have the same problem(is there easy way to tell)?

What is 0402 and 0603 by the way?


Clovertime

0402 and 0603 refer to the package size of the capacitor (picture here) - both are rectangular, just different in dimensions.

I just ordered this part, so I expect I'll have to do the capacitor fix as well.
Since capacitance does add in parallel, could I just solder a second capacitor right on top of the one already there to achieve a feasible value?

Also, the Amazon page for the part (shown here) shows a connection for a pin titled "INT". Does anyone know what the function of that pin is? I'm guessing it's an interrupt pin, but I don't actually know that.

Koepel

You can solder a capacitor on top.
I think it is easier to replace the capacitor.
Removing an smd component is easy. Take a big blob of solder and heat up both sides, hold the board tilted or upside down and it falls off.

The INT is an interrupt. There is some kind of processing unit inside, called the 'dmp'. It is capable to gather samples, do some math, and and put them in the FIFO buffer (that is all inside the MPU-6050). The Arduino gets an interrupt, that there is some data in the FIFO buffer of the MPU-6050.

The MPU-6050 is a 3.3V chip, therefor als the INT signal is a 3.3V signal.

Without the FIFO and without the 'dmp' and without the INT, the MPU-6050 is like any other normal accelerator + gyro sensor. The Arduino can read raw data from it and the Arduino can do the math.

A step further is to have a complete processor inside the sensor, like this one: https://www.adafruit.com/product/2472

mgansen

Hello,
today I got the GY-521 from amazon. I soldered a cap 104 in parallel to the original cap but I still have Jumps from up to 200 digits. This is the same behavior as without the additional cap. Any idea?
cheers Mario

Go Up