I was having a problem similar to what you mentioned, when I was using the MPU6050 in DMP mode with interrupt and at the same time driving motors with PWM. Turns out it was a problem with the libraries using the same timer (overlapping of timer usage), the interrupts etc and it was messing with the timings making the motors go beserk. Also the Gyro readings would not make sense sometimes. To be fair mine was a balancing robot though. If it helps, you may check if your problem is something similar perhaps.
Thanks for your interest in this project. As for the sketch used here. about the best I can offer is see the code found at: github.com/jmharvey1/Arduino-BalanceBot It a later version of the project, and the sketch used there encapsulates pretty much all that was done here.
Hmm I suspect the compass should be moved away from the motor like up on a pole also I have seen some header pins that were magnetic. Choose pins that are non magnetic.
Hi, that looks like a great project. I'm actually working on a similar robot and am facing the problem with the mpu6050 when the motors are powered. Would you like to share the code with me to help me to get my robot runing instead of stopping randomly? Thank you very much!
I can send you the code for that version of the project in its entirety, but have to confess it contains a lot extraneous lines. However, if you're willing to look past that, then send me your E-mail address, and I'll send what I have. FWIW: Initially I too ran into issues reading the MPU while the motors were running. The two things that fixed it were 0.1MFD capacitors connected directly across the motor terminals, and in code, I would not process the MPU's dmp buffer unless the fifo count exactly matched the expected packet size. Remember I'm using the jrowberg/i2cdevlib found at github.com/jrowberg/i2cdevlib . If you're using another method to extract the DMP data then what I'm saying here may not apply.
No, I'm sorry. That code is long gone. Doubt that it would compile today, since most all the libraries it used have had many updates of their own. FWIW, the code used here formed the core, of the balance bot videos, that followed. That code is out there. But again, wouldn't bet on it compiling, without 1st having to do a number of "tweaks" to get it to work with today's libraries. Thanks for your interest in the project, and taking the time to ask the question.
Thanks for your interest in this project. This was something I was working on six years ago. About the best I can offer today is: ruclips.net/video/SVAoz45gz3k/видео.html That video was a successor to what is shown here. And as such has, at it's core, much of the same code. Check the description section of the later video ( "Arduino/MPU6050 Balance Bot Part2"). There you'll find a link to github and the code used in that video.
I was having a problem similar to what you mentioned, when I was using the MPU6050 in DMP mode with interrupt and at the same time driving motors with PWM. Turns out it was a problem with the libraries using the same timer (overlapping of timer usage), the interrupts etc and it was messing with the timings making the motors go beserk. Also the Gyro readings would not make sense sometimes. To be fair mine was a balancing robot though. If it helps, you may check if your problem is something similar perhaps.
Thanks for the comment. I'm betting others will appreciate it.
have you used the nRF24L01+ with this type of setup before?
I know this posted video is old, but I am working on a project that could benefit from this code. Did this ever get posted online anywhere?
Thanks for your interest in this project.
As for the sketch used here. about the best I can offer is see the code found at:
github.com/jmharvey1/Arduino-BalanceBot
It a later version of the project, and the sketch used there encapsulates pretty much all that was done here.
Can you share the code please?
Hmm I suspect the compass should be moved away from the motor like up on a pole also I have seen some header pins that were magnetic. Choose pins that are non magnetic.
Hi, that looks like a great project. I'm actually working on a similar robot and am facing the problem with the mpu6050 when the motors are powered. Would you like to share the code with me to help me to get my robot runing instead of stopping randomly? Thank you very much!
I can send you the code for that version of the project in its entirety, but have to confess it contains a lot extraneous lines. However, if you're willing to look past that, then send me your E-mail address, and I'll send what I have.
FWIW: Initially I too ran into issues reading the MPU while the motors were running. The two things that fixed it were 0.1MFD capacitors connected directly across the motor terminals, and in code, I would not process the MPU's dmp buffer unless the fifo count exactly matched the expected packet size. Remember I'm using the jrowberg/i2cdevlib found at github.com/jrowberg/i2cdevlib . If you're using another method to extract the DMP data then what I'm saying here may not apply.
Can you send me the code for this as well? brotherchris81@gmail.com
can u send me the code @ sbhharrykumawat@gmail.com
can u send me the code @ sbhharrykumawat@gmail.com
hello bro can u send me the code?/ i have problem with the sensor MPU6050
And again one that dont share codes.
mardito
You still have the code for that robot? can you share?
No, I'm sorry. That code is long gone. Doubt that it would compile today, since most all the libraries it used have had many updates of their own. FWIW, the code used here formed the core, of the balance bot videos, that followed. That code is out there. But again, wouldn't bet on it compiling, without 1st having to do a number of "tweaks" to get it to work with today's libraries.
Thanks for your interest in the project, and taking the time to ask the question.
the video show only the results, can we get ur code please ?
and thank u
Thanks for your interest in this project. This was something I was working on six years ago. About the best I can offer today is:
ruclips.net/video/SVAoz45gz3k/видео.html
That video was a successor to what is shown here. And as such has, at it's core, much of the same code. Check the description section of the later video ( "Arduino/MPU6050 Balance Bot Part2"). There you'll find a link to github and the code used in that video.
@@jmhrvy1947 .
no code share n public