Flapper Drones Documentation
Docsยป Motor mapping

Motor mapping

The motor mapping is defined in the power_distribution_flapper.c file of the crazyflie firmware:

Actuator # RevD and newer RevB (model 2022) Safe idle value
pitch servo m1 m2 33000
yaw servo m3 m3 33000
left motor m2 m1 0
right motor m4 m4 0

In cfclient or using the python libraries, it is possible to set the motor values directly (and override the power distribution), e.g. via the MotorPowerSet parameter group.

When setting the motor command directly, please note that the servos might not be able to reach the set position due to physical constraints, in which case they will stall and overheat. Please use this functionality carefully and always start with the safe idle values in the table above.

Make sure to set all the servo commands before setting motorPowerSet.enable to 1. It is not advisable to set the enable parameter to 2 or 3, as the servos typically require different commands than the motors.

The (servo)motor command values range from 0 to 65535 (uint16), which linearly converts to a PWM signal with a pulse width between 1 and 2 milliseconds. The PWM signals are then fed to the motor ESCs and the servomotors.

For servo motors on the Nimble+, the conversion to angles is approximately 112.5 degrees per millisecond, i.e. 1.7166e-3 degrees per motor command unit.

The following tables show how the motor commands convert to the motor ESC throttle (the values vary linearly in between):

Command Command cfclient [%] PWM [ms] Throttle [%]
0 0.0 1.000 0
9699 14.8 1.148 0
31981 48.8 1.488 50
54525 83.2 1.832 100
65535 100.0 2.000 100
Previous Next

Flapper Drones Documentation

Table of Contents

Table of Contents

  • Motor mapping

FLAPPER NIMBLE+

GENERAL INFORMATION

  • Specifications
  • Components & accessories


GETTING STARTED

  • Battery charging & management
  • Pre-flight setup
  • Power-up & power-down
  • Remote controllers
  • Flying
  • Servicing


ADVANCED USE

  • Crazyflie Ecosystem
  • Software resources
  • PC client installation
  • Firmware update
  • Servo-trimming
  • Integrated features
  • Extra addon-decks & sensors
  • Motor mapping
  • State estimation & Control
  • Autonomous flight
  • Simulation resources
  • 3D CAD models
  • Scientific papers


SUPPORT/OTHER QUESTIONS?

support@flapper-drones.eu