Hey there.I wanted to build Joop Brokking's YMFC-32 quadcopter.So I tested Mpu6050 with the stm32f103c8t6 but the problem is it's not reading values correctly.It reads the same values.(by the way I'm a noob)
I tried this code with stm32f103c6t6(fake Stm32f103c8t6) and it worked fine.I tried this with three different mpu6050 boards but with the stm32f103c8t6 any of them didn't worked but with an arduino uno and fake stm32 they all worked.
This is the video I followed. Arduino for STM32 + MPU-6050
I bought all of board from aliexpress.I know that they could be fake boards. but many guys have thrid this project and they were success.Also I build this YMFC-AL project and it was successful. YMFC-AL quadcopter
At first I thought stm32f103c8t6's I2C pins doesn't work .So I tested them with an OLED display and it worked fine.
Should I use another stm32f103c8t6 board? Did anyone face this problem?
If anyone knows please help me.
Appreciate your answer.Thanks for reading this. I have no idea about what is the issue but I want to build it anyway.So please help me.Also I ordered another stm32f103c8t6 board from aliexpress.I will test this with it.If anyone know the problem please reply.I'm pretty sure there are not any issue in the wiring.I didn't use the breadboard I just soldered some wires.wiring is same as in the video(didn't connect the extra resisitors).If anyone can please help me.Thank you very much.
The issue described involves an MPU6050 not reading correct values when connected to an STM32F103C8T6, though it works with other boards like the Arduino Uno and a fake STM32. The poster suspects no wiring issues and has tested the I2C pins, which work fine with an OLED display.
Potential Solutions:
Check I2C Address: Ensure the MPU6050's I2C address is correctly set (usually 0x68 or 0x69).
Pull-Up Resistors: Add external pull-up resistors (4.7kΩ) on the SDA and SCL lines.
I2C Speed: Reduce the I2C clock speed to 100kHz.
Library Compatibility: Verify compatibility of the library with the STM32 board.
so I disconnected it from the computer and plug it again and then the mpu 6050 recognize as shown in the first sreenshot.So the problem is after I sending the code that I posted before, the mpu6050 simply disconnect from the stm32 so even I upladed the i2c scanner it can not identify the mpu6050.
please help me if anyone know the issue.I really want to build this quadcopter.please help.Again thank you very much for your reply.
I use a modified version of YMFC32. Joop is very good explain the functions. Did you connect the MPU6050 after his drawings? YMFC-32_autonomous_schematic.pdf => SDA at B11 and SCL at B10. If not working, try a different MPU6050. Did you solder the headers properly to the board?
I can tell you this much, the flight controller code containt some "easter eggs" that you need to modify, to get the drone to work. Reccon he dont want terrorists/idiots to use his code.
Hellow Tordens thank you for your reply.I did what you told me to do.Firstly I connected mpu6050 to stm32 and uploaded YMFC-32_auto_test_program and after I send "b" in serial monitor and the stm32 recogtnized mpu6050 as 0x68.Then I send "e" to check IMU angle.It took almost 30 seconds to calibrate gyro and to print the values it took about 2 second and also the are not correct values.This is the result.
So it seems like my stm32 has a big problem.It literally freezes when I try to read I2c data from it.So I will try this with another Stm32 board.I ordered another board from Aliexpress.The company name is "WeAct". Is it good or bad please tell me.It didn't came yet.
Again thank you for your reply I couldn't find this problem if you didn't tell me.