1axis gimbal project

Hey !
I’m trying to create a 1axis gimbal with an arduino using a PID. I already have the MPU 6050 for the feedback loop and I’m using Servomotors (hitec hs 422 if I remember correctly) as an actuator.
I need to create my PID’s corrector function. I have been researching and trying to think about what is my system’s transfer function… but I’m not quite sure how to find it… can someone helps me ?

Are you asking about tuning the PID?

thanks for you answer ^^

yeah kind of... of course, I don't want you to tune my PID for me, but I just need a little help. :sweat_smile:
I made a little script on matlab to create the PID, but I need the transfert function of my system to get my script working and I don't know how to do so... this is here that I need your help :slight_smile:

That is a control theory problem, and this page is as good a place to start as any:

Does that mean you are simulating your gimble in MatLab so you can tune your PID on the simulation? Won't you have to measure the hardware behavior to determine the transfer function?

thank you jremington it is quite interesting :grin:

i'm still a little lost, I don't know how to modelize this system to create my PID ?
I am also not sure what is my system, I only have a servo motor (is this the best option ?)
sorry if i seem a little lost :sweat_smile: it is just that i'm trying my hardest to understand this problem (I could take some random code but it wouldn't be funny :stuck_out_tongue_winking_eye:)

To do this in the engineering way is a very challenging problem. Control Theory courses are taught in engineering schools, and it might take a year or two to cover the topics thoroughly. A good math background is required.

On the other hand, building a model balancing beam or platform and tuning it "by hand" is a popular project for hobbyists, and you should have no problem finding tutorials on line.

Yeah this is exactly what I'd like to do. this is what I have been taught.

I could but I don't know how to do so... I thought I could just use a model to tune my PID.

Yeah this is what i thought but I can't find any models that fit my system I will keep on looking on the internet if you know one or two websites that have such a model (like an equation or somehow a matlab file) it would really help me :blush:

How could anyone on this forum begin to guess?

You have not described your setup in useful detail.

Sorry, :sweat_smile:
I would like to do something that look like that https://www.instructables.com/MPU6050-1-Axis-Gimbal/

Actually I would like to put a little 3D printed structure but it won’t change the the way it works.

I am using a arduino micro, a MPU 6050 and a Servomotor Hitec HS-422.
If you have any other question ask me :grinning:

Come back after you have actually built the setup.

Post photos and measurements, along with the code that you have tried, and tell us where you are having specific problems.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.