cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

Hello everyone,

I wonder if anyone could have a quick look at my project to suggest what I am doing wrong. This is a project that I had downloaded from Sam's blog, and I am following pretty much what he recommends. The code runs but throws an error that " MPU6050 connection failed" followed by printing 0 all over.

I would like to mention that: 1. I have used this code previously, and it had worked. 2. I testecMPU6050 unit Arduino and it worked fine, which means sensor board is OK.

Some of the community members had previously helped me getting started with this project. I am hoping they would me understand the issue. I am attaching the project below. I would appreciate if someone could run on her computer.

0 Likes
Reply
1 Solution
Honored Contributor II

Things you can do:

  • check that you are using the correct I2C address (7-bit vs. 8-bit!)
  • verify that you indeed use the correct ports
    • no SDA / SCL swap
    • PSoC4 SCB block can only use some fixed pins for I2C
  • verify that on your board used pins are not connected to anything else - the Cypress Pioneer boards have some peripherals connected, and IIRC one of the I2C ports is connected to the PSoC5 debug adapter
  • verify the pull-up resistors (somewhere between 1k and 10k)
  • use either a oscilloscope or a logic analyzer to verify whats happening on that lines (if you don't own anything, either borrow one, or build at least a simple logic probe that can show pulse, like Logic Probe with Pulse  or  Logic probe circuit using CD4001 IC - Electronics Area , or build one with a PSoC
  • try to reduce your code to the bare minimum, following the code examples and the data sheet, and try to read only the ID register (0x75)

View solution in original post

8 Replies
Employee

Did you get a chance to look at MPU 6050 - Need help reading sensor values

Thanks,

Hima

0 Likes
Reply
Employee

Also can you try to degrade the SCB component to an older version and test it? Or use an old version of PSoC Creator and test the interface.

Thanks,

Hima

0 Likes
Reply
Anonymous
Not applicable

Thank you for replying, Hima. I tried those two recommendations. I am using PSOC creator 3.3 now. Yet I am getting the same error. I am sure, I am missing something very trivial.

This project is important, and I am now freaking out. I wonder if some other experienced members could help me.

0 Likes
Reply
Employee

If PSoC Creator 3.3 is also not working it might be some hardware issue. Did you get a chance to probe the I2C lines?

Thanks,

Hima

0 Likes
Reply
Anonymous
Not applicable

Hima,

I have checked three different PSOC4-BLE kit boards. The boards are fine since other projects are doing just fine. To rule out any issue with MPU-6050 unit I ran it on an Arduino board. The MPU-6050 unit gave expected reading on Arduino.

Is there a way to plot/visualize I2C data in psoc creator software? I do not have an oscilloscope. Could you recommend something?

0 Likes
Reply
Honored Contributor II

Things you can do:

  • check that you are using the correct I2C address (7-bit vs. 8-bit!)
  • verify that you indeed use the correct ports
    • no SDA / SCL swap
    • PSoC4 SCB block can only use some fixed pins for I2C
  • verify that on your board used pins are not connected to anything else - the Cypress Pioneer boards have some peripherals connected, and IIRC one of the I2C ports is connected to the PSoC5 debug adapter
  • verify the pull-up resistors (somewhere between 1k and 10k)
  • use either a oscilloscope or a logic analyzer to verify whats happening on that lines (if you don't own anything, either borrow one, or build at least a simple logic probe that can show pulse, like Logic Probe with Pulse  or  Logic probe circuit using CD4001 IC - Electronics Area , or build one with a PSoC
  • try to reduce your code to the bare minimum, following the code examples and the data sheet, and try to read only the ID register (0x75)

View solution in original post

Anonymous
Not applicable

Thank you for replying, user_78878863

0 Likes
Reply
Valued Contributor II

I tested the project on CY8CKIT-142   without  MPU6050

Therefore, you can see what the request to the sensor looks like. ()

I can test the MPU6050 only in a month.6050.png

0 Likes
Reply