Hi,
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: https://www.makerguides.com */
// 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:
stepper.setMaxSpeed(1000);
stepper.setAcceleration(500);
}
void loop() {
// Set the speed in steps per second:
stepper.setSpeed(100);
// Step the motor with a constant speed as set by setSpeed():
stepper.runSpeed();
}
My config :
Supply: 24 V 200W (It's really big but it's for the first test)
Mega 2560
TB6560 Stepper motor driver: https://www.amazon.com/HiLetgo-TB6560-Router-Controller-Stepper/dp/B00LPK02SY/ref=sr_1_2?dchild=1&keywords=tb6560&linkCode=sl2&linkId=fa2f8f72dafbdd876212e3dcc0bd3d95&qid=1620638766&sr=8-2
...A


