MPU-6050 NOT WORK IN HARWARE

For general Flowcode discussion that does not belong in the other sections.
Post Reply
SILVESTROS
Posts: 123
http://meble-kuchenne.info.pl
Joined: Tue Dec 13, 2022 9:04 pm
Has thanked: 32 times
Been thanked: 2 times

MPU-6050 NOT WORK IN HARWARE

Post by SILVESTROS »

Hello to all!
I was connected a MPU-6050 accel./gyro module to a PIC18f46k22 , and send data to PC with UART. In simulation I get data normally , but in hardware I get zeros..Is the issue in MPU6050 component ?. If so, Is there an update at component that solve the issue ?
Many thanks
Basl

medelec35
Matrix Staff
Posts: 1956
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

Re: MPU-6050 NOT WORK IN HARWARE

Post by medelec35 »

Hello, Basl.
Do you have a logic analyser?
If so, when the MPU6050 is reading the Who an I register at = 117 (0x75) what is the result returned?
The read is performed at the very start.
Martin

SILVESTROS
Posts: 123
Joined: Tue Dec 13, 2022 9:04 pm
Has thanked: 32 times
Been thanked: 2 times

Re: MPU-6050 NOT WORK IN HARWARE

Post by SILVESTROS »

Hello medelec35 !
No , I have not logic analyser , only oscilloscope...can I test the WHO AM I register with I2C macro ( Master) with FC10? ...Generally the issue is from component or hardware ?.. Have been tested the MPU-6050 component in hardware ?
Thanks
Basil

medelec35
Matrix Staff
Posts: 1956
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

Re: MPU-6050 NOT WORK IN HARWARE

Post by medelec35 »

Hi Basil.
The issue could be that you have a fake device.
For some reason the Who am I register is set to 0x98 instead of 0x68
As the Flowcode component is looking for 0x68 within the Who am I register, the hardware wont work until 0x68 is retrieved.
If not got an analyser then as a temp method, I can change the Who am I expected value from 0x68 to 0x98.
If that does not work then I can temp remove the who and I detection.
However, you will need to bare in mind that if the chip is fake, then will the rest of the code work as expected?

Attached is the who am I register read set to 0x98.

Browse to this location using file explorer , it's hidden by default so just paste the link into your address bar.

Code: Select all

%ProgramData%\MatrixTSL\FlowcodeV10\Components
Place the attached component.
If Flowcode is already open, then you will need to reload your project for the new component to work
If you run any component updates, then the component you added will be overwritten, so it will stop working again (unless the component update has been pushed).
Attachments
MPU6050.fcpx
(5.83 KiB) Downloaded 32 times
Martin

mnfisher
Valued Contributor
Posts: 1518
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 138 times
Been thanked: 727 times

Re: MPU-6050 NOT WORK IN HARWARE

Post by mnfisher »

It might be a ICM-20689 - which looks to be 'marketed' as a MPU-6050A on some Chinese boards - this has 0x98 as the 'whoami' value (at the same address) - but isn't compatible code wise (register addresses are different)
The MPU-6050 was discontinued some time ago (replaced by the ICM-20689) - so although it might be counterfeit, it might actually work (but probably not with the MPU-6050) code...

See (for example) https://forum.arduino.cc/t/mpu-6050-a-m ... 050/861956

Martin

medelec35
Matrix Staff
Posts: 1956
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

Re: MPU-6050 NOT WORK IN HARWARE

Post by medelec35 »

Thanks Martin.
On reading what's in the link, I agree.
I will create an ICM-20689 component.
Martin

stefan.erni
Valued Contributor
Posts: 1012
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 193 times
Been thanked: 217 times

Re: MPU-6050 NOT WORK IN HARWARE

Post by stefan.erni »

Hi to All

A question to Basl
Are you using the Senser on a small board?

for the new component, maybe I can help with testing.

There is a good overview of the TDK sensors. Which type and specifications
https://invensense.tdk.com/products/mot ... ng/6-axis/

but which is the current sensor ?

2025-02-10_13-08-13.PNG
2025-02-10_13-08-13.PNG (142.17 KiB) Viewed 4287 times
2025-02-10_13-04-01.PNG
2025-02-10_13-04-01.PNG (114.18 KiB) Viewed 4287 times

medelec35
Matrix Staff
Posts: 1956
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

Re: MPU-6050 NOT WORK IN HARWARE

Post by medelec35 »

Hello.
I have created an ICM20689 for you to try.
Can you use that instead of the MPU-6050 component.
Attachments
ICM20689.fcpx
(5.85 KiB) Downloaded 24 times
Martin

Post Reply