Make a more powerful but still tiny drone.

Discussions about all things Bitcraze
leonana69
Beginner
Posts: 21
Joined: Wed Apr 27, 2016 9:43 am

Make a more powerful but still tiny drone.

Post by leonana69 »

These days I've been working on somehow combine these two drones: Image
and
Image.
The first is iFlight Cinebee, it's very powerful but it can only be controlled by a radio controller. What I want is to control it like the Crazyflie which means I can send any command through a USB antenna. By the way, the flight control for Cinebee is Betaflight which is much more complex compared to Crazyflie. So I decided to combine two of them to create a powerful, tiny but still very controllable drone.

At first, I modified the CF2.1 to make it generate the desired control signal for the iFlight ESC board which accepts a simple digital protocol input instead of PWM. Then for the power supply, I found it difficult to modify the CF2.1 accept 2S battery input so I turned to CrazyBolt. I removed all the motor output related components on the Bolt board and connect the output from MCU to the ESC board. After tuning the PID accordingly, I'm finally able to make it fly stably.

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

Re: Make a more powerful but still tiny drone.

Post by tobias »

Very nicely done!
Did you also get the flow deck to work OK? I think there are some parameters that needs to be changed/tuned to compensate for the different inertia, weight and thrust.
olif
Beginner
Posts: 12
Joined: Wed Mar 18, 2020 5:21 am

Re: Make a more powerful but still tiny drone.

Post by olif »

I have a few questions concerning the Crazyflie Bolt.

1- Does the Bolt board work with the crazyflie client?

2- Can I use the propeller test button for balancing the propellers? With
the crazyflie 2.1 this tool is very helpful.

3- How do I connect a 4 in 1 esc with the Bolt board? In your documentation
you only show that 4 seperate esc's are connected to the 4 connectors on
the Bolt board. The 4 in 1 esc has only one input for main voltage. Do I
have to connect the 4 in 1 esc directly to the battery and the 4 signal
wires to the connectors of the Bolt without using the switchable mosfets
of the Bolt?

4- How can I adjust the PID values? In betaflight for example you can
easily change the values from software.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Make a more powerful but still tiny drone.

Post by tobias »

I'll do my best to answer your questions.
1- Does the Bolt board work with the crazyflie client?
Yes, the base firmware is the same, or actually almost all of it.
2- Can I use the propeller test button for balancing the propellers? With
the crazyflie 2.1 this tool is very helpful.
Well it is deactivated because of safety issues but should be possible to activate. It probably needs a change to a lot of parameters though. The code is in stabilizer.c
3- How do I connect a 4 in 1 esc with the Bolt board? In your documentation
you only show that 4 seperate esc's are connected to the 4 connectors on
the Bolt board. The 4 in 1 esc has only one input for main voltage. Do I
have to connect the 4 in 1 esc directly to the battery and the 4 signal
wires to the connectors of the Bolt without using the switchable mosfets
of the Bolt?
Yes that would be the way to do it or solder the wires to the PCB signal output of the connector. Then you could keep the connector to the 4in1 side and make it mire tidy.
4- How can I adjust the PID values? In betaflight for example you can
easily change the values from software.
You can use the cfclient and the parameter tab to set the different PID parameters "live" but there is yet no way to save them. So after that they have to be hardcoded into the pid.h file and FW built and flashed.
olif
Beginner
Posts: 12
Joined: Wed Mar 18, 2020 5:21 am

Re: Make a more powerful but still tiny drone.

Post by olif »

Thank you for your detailed answers. I had a look in the cf client's parameter tab with the bolt board connected. Do I have to tune the attitude pid values or the rate pid values or both of them? For my omnibus f4 board I only have pid values in the betaflight software and they differ very much from the crazyflie ones (roll PI Betaflight: 48/32, Crazyflie: 500/250). I thought I can take theese and put them into the pid.h file. Please bring some light in the darkness!!

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

Re: Make a more powerful but still tiny drone.

Post by leonana69 »

tobias wrote: Mon Mar 09, 2020 4:09 pm Very nicely done!
Did you also get the flow deck to work OK? I think there are some parameters that needs to be changed/tuned to compensate for the different inertia, weight and thrust.
Yes, I re-tuned the PID controller, changed the thrustBase in the position_controller_pid.c to match the current motor power and weight.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Make a more powerful but still tiny drone.

Post by tobias »

Thank you for your detailed answers. I had a look in the cf client's parameter tab with the bolt board connected. Do I have to tune the attitude pid values or the rate pid values or both of them? For my omnibus f4 board I only have pid values in the betaflight software and they differ very much from the crazyflie ones (roll PI Betaflight: 48/32, Crazyflie: 500/250). I thought I can take theese and put them into the pid.h file. Please bring some light in the darkness!!
The ratio should be very similar but as the scale is different you can't take them from Betaflight. Normally brushless quads have a higher power/weight ratio so most likely you will have to tune down the gains that are set for the Crazyflie 2.X.
olif
Beginner
Posts: 12
Joined: Wed Mar 18, 2020 5:21 am

Re: Make a more powerful but still tiny drone.

Post by olif »

Do you have a kind of manual for tuning the parameters for the bolt? Do I find all relevant parameters in the parameter list of the cfclient?
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Make a more powerful but still tiny drone.

Post by tobias »

Unfortunately not yet. This is on our todo list as well as making parameters savable. There are many good guides on the internet and youtube so I suggest to first start browsing that. The parameters are all available and the relevant gourps are pid_attitude and pid_rate. Then when you have tuned it you can save the values permanently in pin.h file, compile and flash.
olif
Beginner
Posts: 12
Joined: Wed Mar 18, 2020 5:21 am

Re: Make a more powerful but still tiny drone.

Post by olif »

@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?
Post Reply