Stepper Hot TB6560 (continuous work)


I drive a peristaltic pump with a stepper motor at continuous speed (Yeah, I know it’s better with Brushless but It’s really difficult to find brushless peristaltic pump. The seller assured me that it can work continuously).
My project needs that the pump works 24/24 7/7 without blocking function (I need to control others pump and sensors). For this, I use the AccelStepper Library test that you can see below.

But the motor of my pump is very hot … I set the current limit of the TB6560 to 1.9 amp and I work in full-step mode. I set 1.9 because the datasheet recommended a driver of 2Amp.

Whit this code, I don’t know if it is interesting to change the step mode. I can works from full to 1/32 revolution.

/* Example sketch to control a stepper motor with TB6560 stepper motor driver, AccelStepper library and Arduino: acceleration and deceleration. More info: */

// Include the AccelStepper library:
#include <AccelStepper.h>

// Define stepper motor connections and motor interface type. Motor interface type must be set to 1 when using a driver:
#define dirPin 2
#define stepPin 3
#define motorInterfaceType 1

// Create a new instance of the AccelStepper class:
AccelStepper stepper = AccelStepper(motorInterfaceType, stepPin, dirPin);

void setup() {
  // Set the maximum speed and acceleration:

void loop() {
  // Set the speed in steps per second:
  // Step the motor with a constant speed as set by setSpeed():

My config :

Supply: 24 V 200W (It’s really big but it’s for the first test)

Mega 2560

TB6560 Stepper motor driver:


How hot? It is not unusual for a stepper to run so hot that you cannot hold a finger on it. The stepper data sheet has the max temperature rise at 80 degrees C. If it is running under that, it should be OK. You can dial back the current if the heat is a concern and the motor will still perform satisfactorily.


I almost can’t hold a finger on it so yeah It can be 80 on average.

Do I need to add extra ventilation? Only ten minutes at 48 rpm provokes this max heat.

With my driver, I can downsize the current from 1,9 to 1,4 amp. But the datasheet recommended a 2amp driver so … I think it’s not a good idea.

When I talk with the seller, she could give me the relation between flow rate and RPM.
But how I could know the relation of stepper.setSpeed() and the RPM ? I know that stepper.setSpeed(275) corresponds to a 46 rpm (because I have the same flow rate as the seller) but if I increase or decrease the Speed I wanted to know the RPM value.

Stepper motor data sheet says 0.86 amps but You tell You use 1.9. That motor will be destroyd.

As @Railroader has pointed out 0.86A, the controller to be used is recommended to be a 2A unit.
You still need to set its current limit to closest to 0.86A.

Tom… :grinning: :+1: :coffee: :australia:

Oh I thinked that the “recommended driver rating” was the current limit.
I will set to 1AMP.

But thus I don’t understand the notion of “recommended driver rating”. If the current limit is limited to 1amp. Why it’s important to have a 2amp driver ? Is there some peaks current greather than the current phase ?

I buy a DRV8825 (Contrôleur Moteur Pas-à-Pas DRV8825 (Connecteurs Soudés) - RobotShop) to control this motor (TB6560 was just a test). It said 1,5 AMP and because is not 2amp I thinked It was insufficient.


That could be the case, but it is done in a lot of situations, you over rate the driver to ensure reliability and consistency of operation.

If you have a 200kW car, you do not run it at 200kW 24/7, it probably would not last that long.

Tom… :grinning: :+1: :coffee: :australia:

If the datasheet says 0.86A, don’t set it to 1A! That is still overloading it. I would recommend setting it slightly below 0.86A, say 0.8A. Your motor will get hot and will not last long if you exceed the specifications.

Okay I will set to 0,8Amp.

Thanks for your answers !


Because running things close to their maximum limits causes all sorts of thermal
issues and reduces lifespan. Just because a car has a top speed of 120mph doesn't
mean you drive it at 110mph all the time and expect it be reliable.

I was wondering today if the number of phases can change this current limit.
0,86 Amp is for one phase but maybe it's different for 2 phases ?


A simple answer to this is that the number of phases does not affect the current limit, because at some point in the stepping sequence 100% of the current will be directed to one phase with 0% (or -100%) directed to the other.

For some stepper drivers (e.g. DRV8825) you can set the current limit to 1.4x the single phase current, because when in full-step mode only, the maximum current through each phase is only 0.71x the current limit. See Table 2 in the DRV8825 datasheet to understand this further.

I would strongly recommend that you look at the datasheets for the motor and the stepper driver that you intend to use, as they fully explain everything you are asking. For example, page 11 onwards in the TB6560 datasheet clearly shows that 100% of the limit current is applied to each phase regardless of excitation mode.

Try to read up on how the stepper motors and their drivers actually work - they are driven by approximately sinusoidal currents that are at different phases in each motor winding. It is actually essential for correct operation that the current limit is triggered, so it needs to be set correctly for the motor to step reliably, it isn't just about setting it as high as possible to drive the motor to it's limits. If you are finding a stepper motor rated at 0.86A is insufficient for your needs, you need to buy a higher rated one, you can't just push it harder and hope everything will be OK!

Hi Capellacnc,

The datasheets are still quite hard to read for me but I will try before asking questions.
I had not seen the 0,71x. Thanks.

So for my 0,86 amp motor I will set the current limit to 0,71*0,86 = 0,61 (for the DRV8825).

I haven't found the TB 6560 datasheet on google. There are a lot differents files.

Hi Alex,

Feel free to ask questions! I only suggested doing some research and reading datasheets because the questions you are asking actually have quite involved or mathematical answers and you seem to be wanting to gain some real understanding of what is going on.

For the DRV8825 you should set the current limit to 0.86A if you are using micro-stepping (1/2 to 1/32) as it will reach 100% of the limit. If you only use full-step then the current will only reach 0.71x the current limit that you set, so you can set it to 1.4*0.86 = 1.2A. It is always good practice to reduce these currents a little to add a safety margin for your motor, so if I were in your position I would reduce the 0.86A to 0.7A or the 1.2A to 1A. You just need to decide if you are going to use micro-stepping or not.

For information, the TB6560 driver datasheet can be found here. Toshiba do not discuss micro-stepping in their literature, they use the term Phase Excitation. Full-stepping is the same as 2-Phase Excitation. The graph at the top of page 12 in the datasheet shows the phase current going to +100% / -100% even for 2-Phase excitation, so in the case of the TB6560, you must set the current to the maximum allowed for the motor (0.86A in your case) regardless of if you are using micro-stepping or not. Again, in the real world I would actually set it to 0.7A to give the safety margin.

Hi Capemmacnc,

Yeah effectively, I hate when I don't understand what I am doing, but I think it's a quality for my employer ^^.

Okay, it becomes clearer. I use a peristaltic pump so I will use systematically full step mode for better torque. But here is my misunderstanding: Why you use a 1,4 Amp for the limit? It's supposed to be 0,71x. I assumed that you do 0,71*2 because there are two phases, but each phase's sinusoidal signal is inverted for me, so there is only one phase high in full-step mode. Where is my error?

I understood that we use high voltage as 24 V or 48 V for better performance of the stepper but set a current limit to protect the coil. At first, I understood that I should set the current limit in the function of the datasheet like 0,71x for example. But you speak about adding a safety margin, like 0,7 A instead of 0,86. But: Is there enough current with 0,7 A to drive the motor? In my novice mind, I would have thought that if there isn't a quantity of amp equal to the phase current the motor

Another question which belongs to totally different subjects (but you seem very qualify so ... I test :
I saw that the maximum current through an Arduino is 40mA by E/S and 200mA total.
My project includes 4 peristaltic pumps, 10 electrical valves and 20 sensors (roughly). So I'm a little afraid of this current limit ... I wanted to know what belongs to the amp consumed? For example, pumps are driving by shield motor and electrical valves with relays, both are powered with external supply so ... To my mind it should not be included for the computing of this limitation. But because I'm not sure .... If you know, I will be very interested in the answer.

Thanks for your help,

... Alex

In terms of the current limits of the processor and processor pins, it is the current into or out of the pins that count towards the totals. So if your peristaltic pump is driven by a motor driver that is controlled by the processor, the processor current is only the current that goes to the driver input(s) from the processor output pin, which is like very little (<1mA).

The processor limits (simplified) are 40mA absolute max (20mA recommended) from any pin. 100mA max from any port and 200mA max from the chip.


The chip is the ATM 2560 but what's the port ?

Okay good, so I have to compute the different driver / relay input with the sensors current consummed.

Hi Alex,

I'm not entirely clear on which stepper driver you are intending to use now, so I'll go through it again more clearly separated. You have stated that you are only going to use full step mode, so I'll only discuss that and forget micro-stepping.

The datasheet shows that 100% of the current limit will be drawn by each phase, so set the current limit to 0.86A.

The datasheet shows that only 71% (0.71x) the current limit will be drawn by each phase, so set the current limit proportionally higher - (100 / 71) * 0.86 = 1.4 * 0.86 = 1.2A. You are setting the current limit to 1.2A so that the motor still only gets 0.86A!

If you re-read my post you will not see that I set the current limit to 1.4A at all...

You are really confusing yourself with the idea of the two phases. The current limit that you set on the driver applies equally to both phases i.e. in your case 0.86A maximum per phase. This is also the value usually quoted in stepper motor driver datasheets - the maximum current per phase (or coil).

I suggested dropping the actual current limit from 0.86A to 0.7A because of real world engineering experience. If you push any component including motors to the limits suggested in datasheets they should still work, but you will run at higher temperatures and likely reduce the lifespan of the component as a result. Therefore for reliability I would suggest not pushing to the limits. My figure of 0.7A is therefore an educated guess.

As to whether 0.7A is enough to drive the motor the answer will almost certainly be yes. The question I cannot answer for you is whether or not it is enough to drive your pump. To give you an idea, I have used some 1.3A (maximum per phase rating) and set the current limit to 0.8A and driven small three axis CNC machines with a lead screw successfully. The motors ran cooler as a result. Try it and see! If you find that you need to push the motors to or beyond their limits to drive the pump then you should have bought a more powerful motor with a higher maximum current rating.

Your second question regarding the current gets to the heart of real circuit design and will involve you doing the hard work using the datasheets for all the devices you intend to connect to the ATmega328P. No quick and easy answer on a forum will get round that to produce a reliable circuit I'm afraid!

I'll try and give you a pointer to get you started though...

The datasheet for the ATmega328P is here. If you are using the DRV8825, it's datasheet is here. You should also consult the Arduino Uno schematic here. Looking at page 258 on the ATmega328P datasheet gives you the maximum ratings including the sink and source current requirements for the output pins. If I were to connect the Arduino IO2 pin (ATmega328P PD2) to the DRV8825 step enable pin, it will draw just 0.1mA (approx.) as can be seen on page 6 of the DRV8825 datasheet. This 0.1mA contributes to the individual pin limit (20mA recommended), the port group limit (150mA for C0 - C5, D0- D4) and the overall chip limit of 200mA. You need to ensure that none of these limits are exceeded.

Hope this helps!

Look at the pin out of the processor. The pins are organized in 8 bit groups (ports). So there are port A, port B, port C and so on. The pins can be specified as, for instance, PB3 which is the 4th bit of port B or PF6,the 7th bit of port F.

Sorry Alex - I didn't spot you were using the Arduino MEGA2560. Same basic methodology applies though, with the Arduino MEGA2560 schematic here and the ATmega 2560 microcontroller datasheet here.
If you connect the step enable input of the DRV8825 to Digital I/O pin 40, this corresponds to ATmega2560 pin PG1 (taken from the schematic). Page 356 of the ATmega2560 datasheet then shows the relevant current limits per pin / port group (in this case C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200mA).