Prearm Brushless Motors Crazyflie Bolt

Firmware/software/electronics/mechanics
Post Reply
bpaffile
Beginner
Posts: 1
Joined: Wed Jul 29, 2020 9:35 pm

Prearm Brushless Motors Crazyflie Bolt

Post by bpaffile »

Hey there!

Is it possible to make a prearm state for brushless motors using the Crazylfie Bolt board? When the drone starts I would like the motors to arm and spin up to a low threshold (around 5000) right after the battery is plugged in.

I am currently developing a brushless Crazyflie using the new Crazyflie Bolt board. I have been successful so far in the design and have successfully tuned the drone to have an adequate flight profile. I used the Crazyflie client and attached my remote controller to PID tune. I noticed that not all the motors spin up right away on take off, I presume this is due to to the fact that the motors are trying to spin up to a pretty high threshold for takeoff from a dead standstill. When flying the drone over some simple ROS programs it flips over during takeoff due to this issue.

I explored the idea of creating a 'prearm' state where the motors spin up to around 5000 on startup. I found that motor values can be edited here: https://github.com/bitcraze/crazyflie-f ... #L100-L110
However, motorSetEnable needs to be set to 1 in order for the motors to actually spin. Where would be the best place to do this? I tried in power_distribution_stock.c but that interrupted the startup sequence where the motors beep as they are tested, and the drone won't fly.

Motors: XING 1105 4500kV
Battery: 2s 450mah LiPo
ESC: 4-in-1 Lumenier Mini Razor Pro
Weight: like 150g ish
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Prearm Brushless Motors Crazyflie Bolt

Post by tobias »

I think it would be a good idea to create a github issue for this and discuss and implement it there as this is needed for many ESC to work well.

I believe the ESC won't arm because it want's "0" power sent to it first.
Post Reply