[resolved] BigQuad Deck: PWM output unreliable
Posted: Wed Aug 16, 2017 3:25 am
Hi all,
I believe I have stumbled across a bug. The PWM output from the BQ deck does not seem to be working reliably. Sometimes it will work just fine, but a good number of times, the duty cycle is stuck at 40% no matter what I do to the throttle, and try disconnecting/reconnecting to the crazyflie. I recently got an oscilloscope to assist with development of electronics projects and here is the signal output on the BQ deck:
This duty cycle does not change with throttle input (CFclient shows that it is reading the input as the throttle bars move) most of the time, thus my ESCs don't move the motors. Sometimes, however, seemingly at random, the duty cycle will change with throttle response and everything works as intended!
I would guess it would have to do with how the motor driver or PWM is configured??? All I know is I have tried this many times, cannot reliably reproduce the issue, but can show with my scope that it is definitely not my ESC hardware, probably a firmware bug of some kind, or maybe in the cfclient? Sometimes I have had issues with the same symptoms without the BQ deck, but disconnecting/reconnecting and/or restarting CFClient fixes the issue. That does not work here, making me think it is firmware related as I don't *think* the CFClient does anything different for the BQ deck.
I have not obtained anything useful in the console window, it seems to be the same.
I will also mention, there were multiple times I did not get any PWM output at all, but eventually I figured out this was due to me having the drone on my knee, not a table, and it appears the crazyflie was not initializing correctly because it needs to be set on a flat/consistent surface when it first turns on. Before I had the frame anchored down, it shaking in the mess of wires also caused it to fail and provide no PWM output for no apparent reason. I'm pretty sure it will still fly when in normal mode though when it fails this initial check, just not properly. With the BQ deck, nothing happens and the system must be restarted on a flat surface. I just lost a good deal of time figuring that out, perhaps you guys can think of a beep code or something to alert the user that the PWM is disabled because the crazyflie's initial calibration failed? Seems like a good feature addition to me.
I believe I have stumbled across a bug. The PWM output from the BQ deck does not seem to be working reliably. Sometimes it will work just fine, but a good number of times, the duty cycle is stuck at 40% no matter what I do to the throttle, and try disconnecting/reconnecting to the crazyflie. I recently got an oscilloscope to assist with development of electronics projects and here is the signal output on the BQ deck:
This duty cycle does not change with throttle input (CFclient shows that it is reading the input as the throttle bars move) most of the time, thus my ESCs don't move the motors. Sometimes, however, seemingly at random, the duty cycle will change with throttle response and everything works as intended!
I would guess it would have to do with how the motor driver or PWM is configured??? All I know is I have tried this many times, cannot reliably reproduce the issue, but can show with my scope that it is definitely not my ESC hardware, probably a firmware bug of some kind, or maybe in the cfclient? Sometimes I have had issues with the same symptoms without the BQ deck, but disconnecting/reconnecting and/or restarting CFClient fixes the issue. That does not work here, making me think it is firmware related as I don't *think* the CFClient does anything different for the BQ deck.
I have not obtained anything useful in the console window, it seems to be the same.
I will also mention, there were multiple times I did not get any PWM output at all, but eventually I figured out this was due to me having the drone on my knee, not a table, and it appears the crazyflie was not initializing correctly because it needs to be set on a flat/consistent surface when it first turns on. Before I had the frame anchored down, it shaking in the mess of wires also caused it to fail and provide no PWM output for no apparent reason. I'm pretty sure it will still fly when in normal mode though when it fails this initial check, just not properly. With the BQ deck, nothing happens and the system must be restarted on a flat surface. I just lost a good deal of time figuring that out, perhaps you guys can think of a beep code or something to alert the user that the PWM is disabled because the crazyflie's initial calibration failed? Seems like a good feature addition to me.