2274 views|14 replies

20

Posts

0

Resources
The OP
 

Quadcopter PID Debugging [Copy link]

 
This post was last edited by feiyinglala on 2022-11-10 18:35

I made a drone myself. After debugging all the modules, I need to debug the PID and attitude parameters. Is there a simple solution to build a debugging environment? I saw a barbecue-style rack online (as shown below), but I don't have the conditions to build one here. Does anyone have a better method?

Here is a video of the first version of the real machine

第1版无人机2016

This post is from DIY/Open Source Hardware

Latest reply

Learned a lot, was educated, the content is rich, it is worth watching!   Details Published on 2023-11-28 21:48
 

1w

Posts

204

Resources
2
 

I'll call two experts for you. One of them shared his DIY quadcopter work @lb8820265, and the other shared a wonderful explanation of PID control @DDZZ669. They may be able to help you.

This post is from DIY/Open Source Hardware
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
Personal signature

玩板看这里:

https://bbs.eeworld.com.cn/elecplay.html

EEWorld测评频道众多好板等你来玩,还可以来频道许愿树许愿说说你想要玩的板子,我们都在努力为大家实现!

 
 

1w

Posts

204

Resources
3
 

I'll call two experts for you. One of them shared his DIY quadcopter work @lb8820265, and the other shared a wonderful explanation of PID control @DDZZ669 . They may be able to help you.

This post is from DIY/Open Source Hardware
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle

Comments

Thanks to the administrator, hehehe  Details Published on 2022-11-9 18:33
Personal signature

玩板看这里:

https://bbs.eeworld.com.cn/elecplay.html

EEWorld测评频道众多好板等你来玩,还可以来频道许愿树许愿说说你想要玩的板子,我们都在努力为大家实现!

 
 
 

20

Posts

0

Resources
4
 
okhxyyo posted on 2022-11-9 16:33 I will call two masters for you. One of them shared the quadcopter DIY work @lb8820265, and the other shared a very exciting PID control explanation...

Thanks to the administrator, hehehe

This post is from DIY/Open Source Hardware
 
 
 

4771

Posts

12

Resources
5
 

Is this a Taobao kit? It looks similar to the one I had before.

This post is from DIY/Open Source Hardware

Comments

The pictures are just for explaining the debugging scene, not the actual pictures of my machine. I only bought the rack ESC, and the circuit board and code were all made by myself.  Details Published on 2022-11-10 13:03
 
 
 

654

Posts

26

Resources
6
 
This post was last edited by lb8820265 on 2022-11-9 20:43

Is the drone made by the poster a flying drone or one with GPS?

If it is a racing drone debugging, the biggest difficulty is to place the sensor flat. If it is not placed flat, it will fly to one side and accelerate in one direction. The second most difficult part is the calibration of the electric speed controller and the motor. If the calibration is not performed at the beginning, the motor will fly to one side at the beginning due to different forces at the beginning of the rotation stage. Although it is still flat, it has an initial velocity flying to one side.

After completing the above two difficulties, you can start adjusting the parameters. These parameters are generally available in the open source flight control system, which can be used as a reference. The only parameter of the cross-country drone is the attitude PID. In fact, you don’t have to have that stand to adjust the parameters. I put a cushion under the drone, or make a tripod, so there is no need to worry about the drone falling and damaging it. Use the remote control to quickly add fuel, and release the fuel immediately when the drone reaches a certain height. As long as it can take off nearly vertically, the parameter debugging is completed.

If it is a drone with GPS, in addition to the attitude PID loop, there is also a position PID loop. After completing the debugging of the attitude PID loop, adjust the position PID loop.

The above are my suggestions, I hope it helps

This post is from DIY/Open Source Hardware

Comments

It's not a flying drone, it should be the one with GPS you mentioned. Your debugging idea is very good. I only considered the calibration of the sensor before, not the motor. When I actually debugged it, I hung a barbell on each corner.  Details Published on 2022-11-10 13:44
Personal signatureQQ:252669569
 
 
 

291

Posts

5

Resources
7
 

I haven't played with a quadcopter yet. For the PID debugging of the balancing car, basically no additional equipment is needed, just adjust it by hand. Since the quadcopter can run in any direction, it is necessary to use a stand to fix it and then adjust the PID in different directions when debugging it. In addition, the propellers are more dangerous when they rotate, and they may break after falling over, so they should be fixed during the initial debugging.

The device in the picture has the quadcopter fixed on a stick, leaving only one degree of freedom for rotation, which should be used to adjust the pid in a certain direction of rotation. If you don't have such a professional device, you can also build a simple device yourself, such as finding a stick and fixing it on an object, such as between two tables, etc. You can use local materials according to the situation. The small yellow platform in the middle of the shelf in the picture may be a universal joint underneath, which can rotate in any direction. After the pid in the three directions is adjusted, it can be fixed on it to perform overall pid debugging in all directions to test whether the quadcopter can maintain balance. For this, I didn't think of a simple alternative device. If you just don't want the quadcopter to lose control and run far, tie a rope underneath to limit its flying distance, and put some soft things on the ground to prevent the quadcopter from breaking.

This post is from DIY/Open Source Hardware

Comments

Oh, thank you. I once wrote a program wrong, and the plane took off diagonally and hit the wall, and all four wings were broken. Later, I didn't dare to let it go free, so I hung four barbells on it.  Details Published on 2022-11-10 13:46
 
 
 

20

Posts

0

Resources
8
 
Azuma Simeng posted on 2022-11-9 19:13 Is this a Taobao kit? It looks similar to the one I had before

The pictures are just for explaining the debugging scene, not the actual pictures of my machine. I only bought the rack ESC, and the circuit board and code were all made by myself.

This post is from DIY/Open Source Hardware

Comments

6. I made it myself. You must be a master. If you want to debug it, you can spread a quilt in an open space outdoors. Mine was broken by me.  Details Published on 2022-11-10 18:25
 
 
 

20

Posts

0

Resources
9
 
lb8820265 posted on 2022-11-9 20:42 Is the drone made by the poster a cross-country drone or one with GPS? If it is a cross-country drone, the biggest difficulty in debugging is to place the sensor flat. If it is not flat, ...

It's not a flying drone, it should be the one with GPS you mentioned. Your debugging idea is very good. I only considered the calibration of the sensor before, not the motor. When I actually debugged it, I hung a barbell on each corner.

This post is from DIY/Open Source Hardware
 
 
 

20

Posts

0

Resources
10
 
DDZZ669 posted on 2022-11-9 22:27 I haven't played with a quadcopter yet. For the PID debugging of the balancing car, basically no additional device is required. Just adjust it by hand. Is this because of the quadcopter...

Oh, thank you. I once wrote a program wrong, and the plane took off diagonally and hit the wall, and all four wings were broken. Later, I didn't dare to let it go free, so I hung four barbells on it.

This post is from DIY/Open Source Hardware
 
 
 

4771

Posts

12

Resources
11
 
Azuma Simeng posted on 2022-11-9 19:13 Is this a Taobao kit? It looks like the one I had before
The picture is just used to illustrate the debugging scene, not the actual picture of my machine. I only bought the rack and ESC, and the circuit board and code were all made by myself.

6. I made it myself. You must be a master. If you want to debug it, you can spread a quilt in an open space outdoors. Mine was broken by me.

This post is from DIY/Open Source Hardware

Comments

I started working on it in 2015. I didn't choose the right CPU for the first version, so I used STM32F051. I finally completed one in 2017. It was only last year that I made up my mind to make the second version. I don't have many friends to communicate with, and it's purely a hobby. I do it in my spare time. I'm still adjusting the camera.  Details Published on 2022-11-10 18:30
 
 
 

20

Posts

0

Resources
12
 
Azuma Simeng posted on 2022-11-10 18:25 The picture is just used to illustrate the debugging scene, not the actual picture of my machine. I only bought the rack ESC, and the circuit board and code were all made by myself. ...

I started working on it in 2015. I didn't choose the right CPU for the first version, so I used STM32F051. I finally completed one in 2017. It was only last year that I made up my mind to make the second version. I don't have many friends to communicate with, and it's purely a hobby. I do it in my spare time. I'm still adjusting the camera.

This post is from DIY/Open Source Hardware
 
 
 

6841

Posts

11

Resources
13
 
This is awesome. I look forward to sharing the final precise algorithm!
This post is from DIY/Open Source Hardware

Comments

I am a novice, and I have no idea about attitude and flight control algorithms.  Details Published on 2022-11-12 09:31
 
 
 

20

Posts

0

Resources
14
 
lugl4313820 posted on 2022-11-12 08:17 This is amazing, I look forward to sharing the final precise algorithm!

I am a novice, and I have no idea about attitude and flight control algorithms.

This post is from DIY/Open Source Hardware
 
 
 

419

Posts

0

Resources
15
 

Learned a lot, was educated, the content is rich, it is worth watching!

This post is from DIY/Open Source Hardware
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list