Issue controlling brushless ESCs with Crazyflie 2.0
Posted: Sat Dec 29, 2018 2:10 am
Hello Bitcraze,
Sorry for the repost, but I initially placed this in the wrong message board!
I am working on a custom deck for Crazyflie 2.0, the purpose of which is to allow the Crazyflie to control brushless motors with a 1-2 cell battery, while preserving some of the expansion deck IO (SPI for the flow deck, and UART for a custom peripheral sensor). Hence why I am designing a custom deck to interface the Crazyflie with ESCs and to distribute power. My hope is for the deck to enable scaling the power and payload capability of the Crazyflie, while preserving as much of the system and its user interface as possible.
Recently I have succeeded in controlling ESCs which are connected to the expansion pins TX2, RX2, IO1, and IO2, using push-pull outputs. To accomplish this, I created a deck driver based off the bigquad driver, and I also used the motor peripherals defined in motors_defs_cf2.h
However, so far my approach does not work when the system is powered directly via a battery (be it one cell, or two cells). In that case, the expansion pins TX2, RX2, IO1, and IO2, are not being driven with the necessary control signal. I expect to see a 400Hz PWM signal with 1ms-2ms pulses according to the motor control efforts, but instead these pins are just sitting at VCC.
But, when I connect the Crazyflie to my PC using the micro-USB port, then suddenly the expected control signals appear, and I can control the motors using a gamepad in the Crazyflie Client program. Also, when I do this, I still have the LIPO battery connected to the Crazyflie. So, it would appear that my approach will not work unless there is around 5 volts present on VUSB. Sure enough, in the case of the bigquad deck, 5V is provided to VUSB at the expansion header.
Why am I having this issue? Is it necessary for there to be power on VUSB to use brushless motors? From a hardware perspective, I don't see a need for such a dependency. I suspect that this issue is caused somewhere in the Crazyflie's firmware. I would prefer to circumvent this issue if possible, and would greatly appreciate any insight that this community can provide. For the record, I am currently working from the 2018.10 tag of bitcraze crazyflie-firmware repository.
Best Regards,
Joseph Sullivan
Sorry for the repost, but I initially placed this in the wrong message board!
I am working on a custom deck for Crazyflie 2.0, the purpose of which is to allow the Crazyflie to control brushless motors with a 1-2 cell battery, while preserving some of the expansion deck IO (SPI for the flow deck, and UART for a custom peripheral sensor). Hence why I am designing a custom deck to interface the Crazyflie with ESCs and to distribute power. My hope is for the deck to enable scaling the power and payload capability of the Crazyflie, while preserving as much of the system and its user interface as possible.
Recently I have succeeded in controlling ESCs which are connected to the expansion pins TX2, RX2, IO1, and IO2, using push-pull outputs. To accomplish this, I created a deck driver based off the bigquad driver, and I also used the motor peripherals defined in motors_defs_cf2.h
However, so far my approach does not work when the system is powered directly via a battery (be it one cell, or two cells). In that case, the expansion pins TX2, RX2, IO1, and IO2, are not being driven with the necessary control signal. I expect to see a 400Hz PWM signal with 1ms-2ms pulses according to the motor control efforts, but instead these pins are just sitting at VCC.
But, when I connect the Crazyflie to my PC using the micro-USB port, then suddenly the expected control signals appear, and I can control the motors using a gamepad in the Crazyflie Client program. Also, when I do this, I still have the LIPO battery connected to the Crazyflie. So, it would appear that my approach will not work unless there is around 5 volts present on VUSB. Sure enough, in the case of the bigquad deck, 5V is provided to VUSB at the expansion header.
Why am I having this issue? Is it necessary for there to be power on VUSB to use brushless motors? From a hardware perspective, I don't see a need for such a dependency. I suspect that this issue is caused somewhere in the Crazyflie's firmware. I would prefer to circumvent this issue if possible, and would greatly appreciate any insight that this community can provide. For the record, I am currently working from the 2018.10 tag of bitcraze crazyflie-firmware repository.
Best Regards,
Joseph Sullivan