cảm ơn bác linh và các CKD, em bị chứng ì tâm lý huhu,hihi. Làm cho step chạy rồi thì đấu ac driver vô chân tương tự như đấu vô step driver thôi đúng không các bác?hihihi.
em mới vừa lòi ra câu hỏi. trong đoạn chương trình này:
// Define a stepper and the pins it will use
AccelStepper stepper(AccelStepper:RIVER, 13, 12); // 13-PUL,12-DIR
void setup()
{
stepper.setAcceleration(8000);
stepper.setCurrentPosition(0);
stepper.setMaxSpeed(1000);
}
long current_position;
void loop()
{
current_position = stepper.currentPosition();
if(current_position>=50000){
stepper.moveTo(0);
}
if(current_position<=0){
stepper.moveTo(-500);
}
stepper.run();
}
đoạn nào tính tỉ số xung và vòng quay vậy các bác, để cần biết mô tơ quay chính xác một vòng cần bao nhieu xung. ttrên step em cài :400 fulse/rev, full curent