last day (31 days later) » 

2:45 AM
2
Q: Nema17 - Frequency - Temperature issue

kyrpavHi i am trying to use MCPWM to move a nema 17 motor with esp32. 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 m...

 
(1) I usually start with 1kHz and increase to 10kHz. 5kHz moves the motor smoothly. (2) You don't need any PID controller, which is for another purpose. (3) You might consider higher microstepping resolution for smooth movement. (4) Let me know you config setting. (5) Are you using this kind of cheap AliEx module with a huge heat sink? TB6560 3A Stepper Motor Driver Module - US$6. fr.aliexpress.com/item/…
(5) Are you reading this app note? TB6560AHQ 2-phase stepping motor driver App Note- Toshiba toshiba.semicon-storage.com/info/…. (6) And have you read the friendly datasheet at least 3 times? TB6560AHQ 2-phase stepping motor driver App Note- Toshiba toshiba.semicon-storage.com/info/…
TB6560AHQ 3.5A 40V 2-phase stepping motor driver Datasheet - Toshiba toshiba.semicon-storage.com/info/…
What do you mean by "temperature not too much higher than normally should"? Usually it is OK to heat up to 80C. Datasheet says, temperature shutdown is 170C.
 
i have edited the post to add the code for the config. I will go with 1/16 then microsteps. Yes the module is this with the juge heat sink. Yes the component of esp32 is this what you send. About the temp is about the motor temp. It is not 80C i suppose it is around 35 cause it is touchable. What should i check in the documents that you have send to me.
i want to attach a cable on the motor and measure the tension on it. So i was going to use a pid controller in order to achieve tension. I was going to control frequency somehow.
 
(6) I don't understand what you meant by "to attach a cable on the motor and measure the tension on it" Do you mean you want to measure the "torque"? (7) BAD NEWS and WARNING - I have the feeling that you are a stepper motor newbie and you have chosen a bad driver TB6560 to start learning. For newbies I usually recommend to start with A4988 or DRV8833. Your might to search this or other forums on how to use A4988 or DRV8833***
References: (1) A4988 Stepper Motor Driver - MakerFabs makerfabs.com/a4988-stepper-motor-driver.html (2) DRV8833 2 Channel DC Motor Driver Module - MakerFebs makerfabs.com/dvr8833-2-channel-dc-motor-driver-module.html
 
start learning , newbie or not i am sorry but i can not go in that type of discussion it is really bad thing for anyone to think that he is helping starting with this type of phrases. It is better not to try to help at all cause this answer give nothing. For A4988 you still need one pin for pulse and one for direction so i do not see any change in the problem , i see the same questions apply with this driver which means that your attack was completely useless.
If you know how to help please do so, if not you do not need to go in a newbie discussion to escape cause noone forced you to help. I am appreciating your comments at the beginning about how you control your system. Usually before i do a scale up on any machine i am trying the proof of concept. When i was talking about a cable i and tension i was really talking about this. A cable/rope will be attach and the motor will stretch the cable. Then with a tension module i will measure the tension of the rope.
 
(1) My apologies for wrongly though that you are a stepper newbie and my advice to stepper newbies. (2) Thank you for clarifying your objective of measuring the "tension of the rope attached to the stepper motor. I did once use a mini string balance to measure the motor torques. I might show you my tools used later. (3) I am also trying to measure the torque or a DRV8801 stepper motor. Perhaps I can give you the link of the chat about it.
(4) I agree that to prove a concept, any stepper would do.
 
 
2 hours later…
4:42 AM
There you are - my stepper motor torque measurement setup.
 
 
3 hours later…
7:31 AM
I am sorry to have misled you that A4988 and DRV8833 are for newbies only. Actually they are also popular among 3D printer / CNC pros. It is true that heavy duty machines use DM5xx stepper modules. I do also use DM542, but I found it tricky to do the config and testing. Let me show you my DM540/TB6600 stepper module like your TB6560. I don mind to to discuss using your prototyping modules.
References: How to use MCU (.. Rpi4B, Rpi Pico) and DM542 microstep driver to control NEMA 17 ... stepper motors?
https://electronics.stackexchange.com/questions/561492/driving-step-motors-using-microstep-drivers-with-teensy-4
 
 
3 hours later…
10:50 AM
Hi no worries about the comments. Before 2 years i started working in a cnc project which i stop cause of space but i managed to have 3 nema 42 motors used with dm542 i think and i used linux cnc to control them. This project worked smoothly and the usually setup was the common cathode. The speed of the motor was completely controlled from the LinuxCNC not from the cause this was a completely project. I did not have to go to low level things
Now i want to do some small machine that i can check with a tension module the tension of a rope. For this i have to stretch the rope. And it is the first time that i am doing it with esp32. So i tried to use the component which is more for dc motors using the pwm to control the dc applied on motor
In some example they are doing stepper control using the the set duty in microseconds
which is more about positioning if you have a stepper motor of 180degrees movement and you want to set it there. I want to use the stepper to control it with a pid controller to control the tension.
So i understand that in order to make the step motor to go faster or slower i have to change the pwm frequency. I am worried if this could bring problem on motor about heating. From what you said i am worried that you refer to temperature of the chip of the driver but i am worried about the temp of the motor
I assume that my previous test was a little more problematic on the code cause i tried to change the duty and i forgot that this is only for the dc motor. So i may have send more current that i should have done in the motor which means that i have to try again and see.
 
11:08 AM
Thank you for your clarification. (1) I am setting up a test jig to measure the parameters of a motor coil, motor voltage, current, PWM frequency, duty cycle, speed, torque, ... (2) This is a manual test version of my software test version which based on Rpi Pico MicroPython, ... (3) The end of this video is on DMX540 using the
MKS testing tool (more about this later) https://youtu.be/jQFnPwpVREQ.
Ah, locking down supper time. See you later.
This tutorial says motor temperature of 80C is not big deal: machinedesign.com/motors-drives/article/21835161/…
 
11:52 AM
I have changed my solution to use probably static frequency using 5000Hz as you proposed. Then i will go in the higher microstep resolution that i can with this driver which will give 200*16=3200steps/revolution. which probably mean that i could use 3200Hz also for the motor.
After this i am thinking of using one other time with doubled the frequency of the motor and sample from the tension module and just change directions or stop.
i just wanted to use pid for this also the the manual experience but if i use 1000-10000Kz then i probably need to put on pid range of -10000 - 10000 and somewho also map values between -1000-> -1 and 1->1000 in order always to use -1000 or 1000 for the frequency
fantastic video setup :)
 
 
3 hours later…
2:27 PM
I still don't appreciate why you are using PID. Me once used PID because I, say, want to move my robot car to a particular point (one step before falling down the cliff) ASAP without any overshoot. So I accelerate to the max speed, then move to say, 10 feet before falling over, then decellerate while travelling the last mile, and arrive target with zero velocity.
Perhaps you might like to let make me how you are using PID.
I searched my junk bin for the mks stepper motor test board,
https://www.youtube.com/watch?v=JJLy42uC1ik

and set up the DMX board to test
https://youtu.be/rx3JaFH8trQ
Ah, locking down bed time. See you tomorrow.
 
 
1 hour later…
4:06 PM
I want to use pid in order exactly as you described to control the tension lets say smoothly not completely in linear way but i assume it the sampling rate of the tension is 2 or more times bigger than the movement of the motor this should be ok and i will not have any case that motor never meets the target but it is always either more or less than the proper value. Thank you see you tomorrow
 

  last day (31 days later) »