7425 views|2 replies

2

Posts

0

Resources
The OP
 

Help, MPU6050 freezes and no data output after running for a while [Copy link]

Why is it that the data output of MPU6050 is correct after calibration at the beginning, and it can work normally after connecting to the microcontroller and burning the program into it for two days, but suddenly the data output has been unchanged and it is not the correct acceleration. Why is this? I used a logic analyzer to test the SDA and SCL of MPU6050 and found that the timing of the two lines was normal when it was running normally at the beginning, but there was no level on the two lines when the output was unchanged. I wrote the sampling program in the timer interrupt, and only six values were sampled in 5ms, which should be fine. Moreover, when it was stuck, other programs of the microcontroller were still running, the serial port was also outputting, and the pwm after PID was also changing. What is the problem and how can I solve it?
This post is from MCU

Latest reply

Thanks for sharing!  Details Published on 2019-4-10 22:33
 

2

Posts

0

Resources
2
 
Thank you, everyone. It was not a problem with the program. I finally solved it myself. It was a problem with the hardware wiring. I changed the wire to a tighter Dupont wire and glued it with hot melt glue. This way, this phenomenon will not happen. I have read many forums before but there is no answer. I will explain my solution here. I hope that those who come later can solve the problem as soon as possible. In fact, it is just a small problem that often bothers me for several days. Thank you for your support.
This post is from MCU
 
 

321

Posts

1

Resources
3
 
Thanks for sharing!
This post is from MCU
 
 
 

Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list