Go Down

Topic: [UPDATES] Bicopter stabilization algorith (Code + Video) (Read 5112 times) previous topic - next topic

rossi86m

I like it!

How do you do the clevis and push rod?

Mine is not very stable is just a clip hahahah

I am tuning the pid values but the bicopter is oscillating a bit when i move the throttle more than 50%, any suggestion?

Do you mind sharing a video of the tricopter?

Thanks!

Marco

MartinL

Hi Marco,

Quote
I am tuning the pid values but the bicopter is oscillating a bit when i move the throttle more than 50%, any suggestion?
I'd suggest starting off with the P term only, with I and D gain set to zero. If you're getting oscillations then usually that's an indication that the gain's too high.

Quote
Do you mind sharing a video of the tricopter?
It's a bit old, but a video of the tricopter can be found here: https://youtu.be/rx33SYrK2aE

In the video the tricopter's using a custom board based on the Arduino Mega. It's also using the MPU6050.

rossi86m

Video update
https://youtu.be/oZ-G4dR_iFY

One pid loop running. I still need to add the second pid loop for pitch and roll

Code attached

MartinL

Hi Marco,

Thanks for the video update.

Looks like the bicopter's flying really well.

rossi86m

The bicopter is pretty stable but i am not able to make it stay in one steady point

Any suggestion?????

Here is my code

Thanks,
Marco

rossi86m

Guys i bought a bmp180 to try to stabilize the altitude.

This is the code. I am still working on it and trying to figure out which is the best strategy to do it.

Any suggestion from experience?

Question: When i increase the throttle should i modify the altitude pid setpoint?

The code is attached

Cheers,
Marco

rossi86m

Guysi am getting too much oscilation with the bmp180 any suggestions??

Do you think i should use this one instead  HC-SR04?

Thanks,
Marco

syariftok

hi marco, its an amazing bicopter

i also in same project with you, i want ask some question


is it you use processing to analyze graph of setpoint and output pid to get kp ki and kd? if yes, are you use basic realtime plotter? if no, can you tell me what tools you use.

thank you very much
 :) 

rossi86m

hi marco, its an amazing bicopter

i also in same project with you, i want ask some question


is it you use processing to analyze graph of setpoint and output pid to get kp ki and kd? if yes, are you use basic realtime plotter? if no, can you tell me what tools you use.

thank you very much
 :) 
Is great to know that someone else is on the same project.

Share some photos of the bicopter!!

Regarding the pid tunning, i did it manually.

I built an android app to be able to control the bicopter and also modify the kp ki and kd values while the bicopter is running.

I used the following method:
- Start increasing kp
- When the bicopter starts to oscilate there i have the correct number (the higher without oscilation)
- Do the same with the other values

MartinL helper me a lot on that. You can review previous post on this thread

I can share with you the android app and the bicopter code. It is on the thread also.

Let me know if i can help you with something else

Cheers,
Marco

zoomx

Marco,
maybe you can add an ultrasonic sensor and a flow sensor like in some quadcopters. Flow sensor is a little cam (or an optical mouse sensor) that works in the same way of an optical mouse.
Sometimes you find flow and ultrasonic sensor in the same board.

Unfortunately my knowledge is very very poor on PID.

rossi86m

Thanks for that idea. Yesterday i added an ultrasonic sensor (hc-sr04)

I will try to tune the pid associated with it in the following days.

I also build the printed circuit to get rid of the protoboad.

Photo attached

bizz11

just a note here look at those quick tip on the bmp180 it might help :)

https://learn.sparkfun.com/tutorials/bmp180-barometric-pressure-sensor-hookup-/tips-and-tricks

Nice tread !

zoomx


rossi86m

Thanks for the tip on bmp180 i will try them.

Anyways i am experimenting with hc-sr04 now to hold the altitude

And sorry for the photo, here you have it.

Go Up