This project was developed to control a stepper motor smoothly and to adjust the speed during operation. Most of the libaries I tested at that time had an acceleration curve but always stopped when changing to another speed and then started again. There are two ways to communicate with the Arduino, one is via serial communication or by using a network module. If you have difficulties and the motor only whistles you should adjust the acceleration curve in the Arduino file.
Command | Description |
---|---|
enablemotordriver |
Enable the motor driver, the motor has voltage |
disablemotordriver |
Disable the motor driver, the motor has no voltage |
speed |
Values between -255 and 255 |
limitenable |
The motor can only move between the limits |
limitdisable |
No limits active |
setlimitleft |
Set the current position as left limit |
setlimitright |
Set the current position as right limit |
step |
Motor move one step |
ramp |
Returns the current ramp |
setramp |
Set a new ramp (setramp=0008000) rampIndex 0 -> 8000 |
For control via serial communication I have developed a small test application.