10/13/2023 0 Comments Arduino stepper motor library![]() Once when you have the motor defined and the sensor initialized you need to link the motor and the sensor by executing: ![]() Read more in the open-loop motion control docs. Open-loop motion control will use KV and phase resitance valuesKV rating and the pahse resitance values will be used in te open loop contol as well to let the user to limit the current drawn by the motor instead of limitting the volatge. Since in this way all the torque control loops will have current as input (target value) the user will not have to change the motion control parameters (PID values). That will be a good staring point.įinally, this parameter is suggested to be used if one whats to switch in real time in between voltage ( voltage mode) and current based ( DC current and FOC current) torque control strategies. The rule of thumb is to divide all the P, I and D gains with the motor.phase_resistance value. It is important to say that once you specify the phase resistance value, you will most probably have to retune the velocity motion control and angle motion control parameters, due to the reason that the voltages and currents values are in different orders of magnitude. Once when the phase resistance is provided the user will be able to set current limit for its BLDC motor instead of voltage limit which is much easier to understand. Working with currents instead of voltages is better in may ways, since the torque of the BLDC motor is proportional to the current and not voltages and especially since the same voltage value will produce very different currents for different motors (due to the different phase resistance). The user will be able to control (and limit) the estimated current of the motor using the voltage control mode. ![]() Providing the KV rating in combination with the phase resistance (not very used for current based torque modes foc_current and dc_current) will enable the user to control the motor’s current without measuring it. You can also use the provided libray examples examples/utils/calibration/find_KV_rating.ino. You once when you get the velocity reached with 1 volt setpoint, you can multiply it with \(30/\pi\) ![]() The KV rating units are rpm per Volt, and as the Simple FOClibrary works with rad/s rather than rpm. You can easily find it as the velocity of your motor when controlled in the voltage torque control with a setpoint of 1 volt - velocity_at_one_volt. If you are not sure what your motor’s KV is. Depending on the motor mechanics the appropriate value will be in between the 100% to 200% of the motor’s KV rating. We suggest to set the KV value provided to the library to 50-70% higher than the one given in the datasheet, or the one determined experimentally. The library provides you an example code to estimate your pole_pairs number in the examples examples/utils/calibration/find_pole_pairs_number.ino. If you are not sure what your pole_pairs number is. In practice you can know the pole_pairs number by dividing the number of steps per rotation by 4. Pole pair numberMost of the stepper motors are 200 step per rotation motors making them 50 pole pair motors. StepperMotor( int pp, (optional R, KV)) // - pp - pole pair number // - R - phase resistance value - optional // - KV - motor KV rating - optional StepperMotor motor = StepperMotor ( 50, 1.5, 20.6 )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |