Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 5, 3 & 1 Forum Discussions

ghchc_4077826
Level 1
Level 1

     Hello to all!

     I'm a new member of this community and also very new to programming (never worked with PSoC boards before either).

     I got a PSoC 5 Development kit and what I'm trying to make is an project about reading the values from an gyroscope (MPU6050) that is placed on a object  and stabilize it using 3 brushless motors. Until now I tried many examples found also here on the community and not only and I still can't establish a connection between my board and the mpu using the I2C communication. My request and question in the same time is if someone can help me by guiding me through this small project that I'm trying to make by giving me some simple examples or some documentation that explains step by step how to achieve this project.

     What I'm trying to do is to make the project with small steps so I can also understand what I'm doing, not just copying some spare code from others.

     1.First step that I want to make is to establish a connection between the MPU6050 and the PSoC 5 LP and check if the connection was successful.

     2.The second step is to trying to access the registers of the MPU6050 and read the raw values.

     3.The third step would be to find a way how to control the motors based on the values that I get from the MPU6050.    

     About the third step I'm thinking how can I proceed?

          3.1 Can I control the motors if i connect them straight to the PSoC with PWM without using a motor driver?

          3.2 Should I use a motor driver and connect the motors to it?

     I'm waiting for your help by giving me advices, some tips, examples, documentantion or examples so I can go on with this project.

     Thank you all in advance and I hope in short time I will post some positive results.

     Kind regards,

          Gheorghe.

0 Likes
1 Solution
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

The following example developed for PSoC 6 can be used for reference for interfacing with MPU6050: MPU6050 PSoC6 Interface - Hackster.io . It has the driver files necessary to get you started.

PSoC won't be able to provide sufficient voltage to drive the motors considering that they need to driven at high RPMs. Hence using a motor driver would be a better choice. To answer your question, you can connect them directly to PSoC, but the motor might run slow due to insuffecient voltage. You can find help on interfacing the motor here​.

Useful Resources:

I2C Component Guide: https://www.cypress.com/file/175671/download

Blog posts:

Regards,

Dheeraj

View solution in original post

0 Likes
1 Reply
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

The following example developed for PSoC 6 can be used for reference for interfacing with MPU6050: MPU6050 PSoC6 Interface - Hackster.io . It has the driver files necessary to get you started.

PSoC won't be able to provide sufficient voltage to drive the motors considering that they need to driven at high RPMs. Hence using a motor driver would be a better choice. To answer your question, you can connect them directly to PSoC, but the motor might run slow due to insuffecient voltage. You can find help on interfacing the motor here​.

Useful Resources:

I2C Component Guide: https://www.cypress.com/file/175671/download

Blog posts:

Regards,

Dheeraj

0 Likes