Page 1 of 1

How to turn the propeller without attitude information from the sensor?

Posted: Mon May 10, 2021 3:58 am
by Allen
I used the crazyflie2.1 and bigquad to creat a bigger drone,and the drone has a shell that looks like a sphere.

now I want to let it roll on the ground,but I think if I use the sensor data when I'm controlling the propeller,I can't get it to "roll",and it might fly straight into the air.

So my question is :

(1) I plan to use Crazyradio to send control commands.
I want propellers to rotate step by step,and for example:I want propeller one to rotate first, and after a second, propeller two to rotate and so on...
Do I have to modify and compile the program to implement this function?
If I don't modify and compile the program, can cfclient or some other way do this?Can I control a specific motor directly from the remote control?

(2)If method one doesn't work,how to manually determine the rotation of one or more propellers without using sensor data?
How do I change the code? Is there a sample program for that?

Thank you very much!

Re: How to turn the propeller without the sensor data?

Posted: Mon May 10, 2021 1:19 pm
by arnaud
I am not sure what you mean by "sensor data", do you mean logging values using the log subsystem?

I will try to answer your questions:
1) there are a couple of parameters that allows to control the motors directly. "motorPowerSet.enable" can be set to 1 to enable the individual motor control and "motorPowerSet.m[1,2,3,4]" can be set to a value between 0 and 65535 to set the motor control from 0 to 100%. Please note that this bypasses all control loops, this is setting fix thrust to each motors and so it does not allow to control the quad, it is intended as a debug interface.

2) The motors power are available as log in the variable "motor.m[1,2,3,4]". The mapping is the same as above. I am not sure what you mean by sensor-data in that context.

Re: How to turn the propeller without attitude information from the sensor?

Posted: Mon May 10, 2021 2:36 pm
by Allen
arnaud wrote: Mon May 10, 2021 1:19 pm I am not sure what you mean by "sensor data", do you mean logging values using the log subsystem?

I will try to answer your questions:
1) there are a couple of parameters that allows to control the motors directly. "motorPowerSet.enable" can be set to 1 to enable the individual motor control and "motorPowerSet.m[1,2,3,4]" can be set to a value between 0 and 65535 to set the motor control from 0 to 100%. Please note that this bypasses all control loops, this is setting fix thrust to each motors and so it does not allow to control the quad, it is intended as a debug interface.

2) The motors power are available as log in the variable "motor.m[1,2,3,4]". The mapping is the same as above. I am not sure what you mean by sensor-data in that context.
Thanks for your reply!
And what I mean by sensor data is :Crazyflie used the attitude information obtained from the sensor to control the rotation speed of each motor, so as to achieve the purpose of stabilizing the UAV.(My description of this is not quite accurate :lol: )
I tried what you said, and it worked.

But that doesn't allow multiple propellers to start rotating at the same time,this method only allows the propeller to rotate one by one(There is a time interval).


I plan to bypass all control loops and give some propeller rotation instruction sequence and let the propeller rotate in turn according to this instruction sequence. In this way, multiple propellers can rotate at the same time.

But I am new to Crazyflie and don't know much about the program code's structure.
I don't konw where should I modify in the code to realize this function.
I hope to get your reply,thank you !

Re: How to turn the propeller without attitude information from the sensor?

Posted: Tue May 11, 2021 7:48 am
by tobias
If you want them to start at the same time you can set the m1,m2... values first end then enable them.

If you want to see an example you can check the health.c that runs the propeller test.

Re: How to turn the propeller without attitude information from the sensor?

Posted: Tue May 11, 2021 1:41 pm
by Allen
tobias wrote: Tue May 11, 2021 7:48 am If you want them to start at the same time you can set the m1,m2... values first end then enable them.

If you want to see an example you can check the health.c that runs the propeller test.
Thank you
And I mean I want to control a certain motor or certain motors individually, instead of simply testing the motor, I will continue to study related programs
I will try!
By the way,I noticed that when I used bigquad and crazyflie2.1,and connected them with the cfclient,
they cannot automatically calibrate the attitude angle,the longest white line will not gradually and automatically level up like only using crazyflie2.1,and it will stay tilted unless I move the control panel.
Is this normal?
When installing the crazyflie flight control board, the flight control board will not be absolutely horizontal and will inevitably have a certain tilt angle. Will this affect the flight of the drone?

Re: How to turn the propeller without attitude information from the sensor?

Posted: Wed May 12, 2021 8:33 am
by tobias
It could be hard to mount the bigquad+cf2.1 perfectly level. A couple of degrees from zero will not cause any problems but it is possible to calibrate this away. In the firmware configuration dialog in the cfclient it is possible to enter Pitch and Roll trim values. Just enter the values the flight tab is reporting when it is sitting level. A restart is required for it to take effect.

Re: How to turn the propeller without attitude information from the sensor?

Posted: Thu May 13, 2021 5:14 pm
by ashishkumarji
I plan to bypass all control loops and give some propeller rotation instruction sequence and let the propeller rotate in turn according to this instruction sequence. In this way, multiple propellers can rotate at the same time. vidmate app mobdro apk

Re: How to turn the propeller without attitude information from the sensor?

Posted: Mon May 17, 2021 9:12 am
by tobias
Then check health.c. Easiest might be to rewrite the propeller test to do what you want.