Make a more powerful but still tiny drone.

Discussions about all things Bitcraze
olif
Beginner
Posts: 12
Joined: Wed Mar 18, 2020 5:21 am

Re: Make a more powerful but still tiny drone.

Post by olif » Fri Apr 03, 2020 11:59 am

I managed the pid tuning, flashed the firmware and with a game controller and the cfclient the bolt flies well. On board I have the flow and the multiranger deck and I tried out the multiranger_push script from the examples folder. Take off is o.k, when hovering there is a backward drift and with the landing the motors cut off a little to early so the quad falls down a few cm. Are there further parameters to change to use those scripts?



kimberly
Bitcraze
Posts: 314
Joined: Fri Jul 06, 2018 11:13 am

Re: Make a more powerful but still tiny drone.

Post by kimberly » Mon Apr 06, 2020 10:02 am

Hi!

Are the set-points to the controller for the x and y-axis in modeAbs (position control)? If they are still in velocity control (modeVelocity), than it makes sense that you would see a bit of drift.

The flowdeck's measurement are unreliable if it is smaller than 4 cm. Recent reports showed that the flowdeck caps the maseurement after that threshold (see this forum thread here:viewtopic.php?f=6&t=4241). It probably means that your drone already thinks its at the ground, that it already stops its motors.

olif
Beginner
Posts: 12
Joined: Wed Mar 18, 2020 5:21 am

Re: Make a more powerful but still tiny drone.

Post by olif » Fri Apr 17, 2020 5:12 am

During my test I was in position mode. Is ist necessary to have the flow deck right under the bolt board for holding the position? I put it to the back of my frame to have space for the battery in the center of the quad. Can this be the reason for the backward drift?

leonana69
Beginner
Posts: 15
Joined: Wed Apr 27, 2016 9:43 am

Re: Make a more powerful but still tiny drone.

Post by leonana69 » Fri Apr 17, 2020 2:49 pm

olif wrote:
Wed Apr 01, 2020 6:05 pm
@leonana69
may you share your pid and thrust base values so I can compare to the crazyflie and make the right decision for my new quad?
The thrustBase is 32000 and thrustMin is 20000. For height control PID, the PID_Z_RATE_KP/KI/KD are 7.0/2.0/0.3, the PID_K_KP/KI/KD are 10.0/2.0/1.0. I didn't change other PID coefficients.

You should decide the thrustBase by testing the minimum value which can barely make the drone lift (with fixed thrustScale). The thrustScale I used is 1000, the same as the cf2.1. The thrustScale and PID coefficients both decide how fast the drone lifts.

olif
Beginner
Posts: 12
Joined: Wed Mar 18, 2020 5:21 am

Re: Make a more powerful but still tiny drone.

Post by olif » Thu Apr 23, 2020 3:13 pm

Thank you for sharing your values!! :D
Flying with joysticks is o.k. now. I lowered the slew rate, lowered the base thrust and tuned the rate pid. With the sticks I also get a smooth take off but when pressing the button for assisted mode ( hight hold/ position mode) the Bolt shoots up in the air. Which are the parameters to tune this take off behavior and where do I find them (in the parameter list and the file for hardcoding them).
It is really a hard work to get the bolt flying. A short "how to" to now wich parameters have to be tuned and where to find them would be very helpful. My aim is to fly the bolt with flow and multiranger deck (and test the Multiranger_Push python script) as I do it with the crazyflie.

How can I use the battery status LED on the Bolt board when using a 2s lipo? So far it is only working for 1s lipo. Which parameters and where do I have to change?

Thank's for your help!

tobias
Bitcraze
Posts: 1990
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Make a more powerful but still tiny drone.

Post by tobias » Fri Apr 24, 2020 9:39 am

The Bolt needs much more love and currently, due to the corona situation, things are running slow. I would really like to put more time on the Bolt but there is just not any time now. I hope I can guide you a bit though.

When using the height hold I guess you are using the flow deck or other positioning system? When flying manually, the complementary filter is used. If a deck is attached that needs the kalman filter this will be used instead, e.g. the flow deck or loco deck. For the kalman filter there is also some tuning to do like setting the weight here. We have not tried that much autonomous flight with the Bolt yet so don't know all the effected parameters. Another thing different with the Bolt is that there is no thrust-compensation active. This is supposed to linearize the thrust output a bit. Possibly it can use the same transfer function as the curve should be fairly similar but the voltage needs to changed. It should work without it though.

For the led-ring battery status you would have to update the values here for the battery effect.

olif
Beginner
Posts: 12
Joined: Wed Mar 18, 2020 5:21 am

Re: Make a more powerful but still tiny drone.

Post by olif » Fri Apr 24, 2020 6:14 pm

Thank you Tobias for your reply.
I will change the weight for the bolt in the estimator_kalman.c and make a test.
Is the LED ring script also adressing the heart beat led which is onboard because this is the led I want to use for bat monitoring. I cannot add another board when I have the multiranger on top and the flow deck at the bottom. If there is no solution I can take the lipomon for controling the voltage. https://www.rc-tool.de/index.php?main_p ... anguage=en

I hope times will be better soon.
Take care!

tobias
Bitcraze
Posts: 1990
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Make a more powerful but still tiny drone.

Post by tobias » Mon Apr 27, 2020 8:40 am

Ahh, I thought you meant the led-ring. For the heartbeat lead the functionality is in pm.h. You have to change the defines PM_BAT_CRITICAL_LOW_VOLTAGE and PM_BAT_LOW_VOLTAGE. PM_BAT_LOW_VOLTAGE controls at what voltage the led goes on.

olif
Beginner
Posts: 12
Joined: Wed Mar 18, 2020 5:21 am

Re: Make a more powerful but still tiny drone.

Post by olif » Tue Apr 28, 2020 6:01 pm

Thank you Tobias, I will test this tomorrow. Do I have to tune anything in the PM_BAT_DIVIDER for 2s?
#define PM_BAT_DIVIDER 3.0f
#define PM_BAT_ADC_FOR_3_VOLT (int32_t)(((3.0f / PM_BAT_DIVIDER) / 2.8f) * 4096)
#define PM_BAT_ADC_FOR_1p2_VOLT (int32_t)(((1.2f / PM_BAT_DIVIDER) / 2.8f) * 4096)

or do I leave it as it is?

Today I testet the multiranger_push file with the bolt after setting the correct values of weight and thrust in the estimator_kalman.c file. Everything is working fine the bolt reacts when triggering the distance sensors, take off and landing are o.k. but there are oscillations in z when holding height. This behavior I do also see when using the cfclient in height hold mode. If I fly the bolt via ps3 controller there are no oscillations. Are there any tolerance bands (regarding the flow deck) for holding a specific height which are suitable for the crazyflie but to narrow for the bolt?

tobias
Bitcraze
Posts: 1990
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Make a more powerful but still tiny drone.

Post by tobias » Wed Apr 29, 2020 12:14 pm

You don't have to change the PM_BAT_DIVIDER. These are used for the big-quad deck.

The z oscillations might be due to a difference in increased thrust for your drone. You probably have to tune the position and velocity controller as well. The velCtlPid and posCtlPid parameter groups. Start by lowering the vzKp and vzKd values.

Post Reply