arturkuma/ESP8266-Homekit-Roller-Blinds

How to speed up motor?

Opened this issue · 3 comments

Hi. In this project I use 28BYJ-48 5V stepper motors and its rotary too slow. However in another project they work fast.
What variables need to be changed in the code to increase the rotation speed?
Thanks.

In blinds.ino on line 10 you can change the speed.

#define MOTOR_SPEEED
delayMicroseconds(MOTOR_SPEEED);

this variable define delay between LOW level and HIGH level on STEP pin
I delete this delay and motor spins slow anyway. Another projects and test board spins motor about 3-4 times faster

How to more speed up in this project?

In blinds.ino on line 10 you can change the speed.

#define MOTOR_SPEEED delayMicroseconds(MOTOR_SPEEED);

this variable define delay between LOW level and HIGH level on STEP pin I delete this delay and motor spins slow anyway. Another projects and test board spins motor about 3-4 times faster

How to more speed up in this project?

Self answer

void loop() {
........
delay(2); <----- decrease to 2 solve problem
}

cause 10 milliseconds in loop give 100 Herz step impulses - its to low, to slow. Now about 450 Hz and motor rolls faster