MCPWM - Nema17 - Frequency and Motor Temperature

kyrpav
Posts: 37
Joined: Wed Jan 29, 2020 8:27 am

MCPWM - Nema17 - Frequency and Motor Temperature

Postby kyrpav » Sun Feb 06, 2022 9:37 pm

Hi i am trying to use MCPWM to move a nema 17 motor.

I am using a TB6560 stepper motor driver and it setup is limmiting current to 1.5A and i am using 1/8 Microsteps. Motors is classic one 1.8degrees per step and 200steps per revolution.

I am using the mcpwm_unit_0 and timer_0 and at mcpwm0A i am sending a 50% duty pulse and also i use the mcpwm0B to control direction with duty of 0 and 100.

I have understood that in order to move the motor in several different speeds i have to use the mcpwm_set_frequency function in order to reset the frequency which is initially set in the config_t (which has to be followed by the set_duty function to resume the pulse)

I have used several different frequencies, in some of them >10000Hz the motor was not moving at all and in <1000 it was also not a good movement. From 2000 - 10000 the motor was slightly moving good but not smoothly in every case. Also i have notices that motors temperature increased not too much but more than what it should normally be i think.

[*] how do i know which frequencies should be used for smoothed movement. The motor should be able to move slowly and fast ( i was thinking to controll the frequency with a pid controller)? I assume that temperature issue is really an out of range frequency problem but what is the range , where it is defined and how to calculate it?

Who is online

Users browsing this forum: Google [Bot] and 41 guests