A stepper motor is a brushless DC electric motor that divides a full rotation into a number of equal steps.
Stepper04multi is an AVR Atmega stepper motor library.
Stepper04multi can run multiple stepper motor (up to 12) having different direction, type and speed with a precision of 256us per step @8Mhz.
Setup parameters is stored in stepper04multi.h files.
Stepper04multi use 74hc595 ics to expands the number of micro ports.
This libray drives many stepper motors, to drive motors, every step is computed during timer interrupt. If you are running many tasks on the micro, your should check that motor step happens at a correct speed. If not, you have to increase the micro frequency, or reduce the number to motors to run. As example, on Atmega8 less than 3 motors runs without timing problem at 1Mhz.
Setup parameters is stored in stepper04multi.h files.
Pictures and video shows only two motors connected, cause i've only 2, but up to 12 can be connected, i've checked output pin using a logical analyzer, and results are fine.
The picture below refers to one motor output, during the sample motor velocity was 1280us, as you see the step is 1.250ms = 1250us, which is close to the requested velocity.
This library was developed on Eclipse, built with avr-gcc on Atmega8 @ 8MHz (fuse LF: 0xE4, HF: 0xD9)
Code
Notes
Stepper04multi is an AVR Atmega stepper motor library.
Stepper04multi can run multiple stepper motor (up to 12) having different direction, type and speed with a precision of 256us per step @8Mhz.
Setup parameters is stored in stepper04multi.h files.
Stepper04multi use 74hc595 ics to expands the number of micro ports.
This libray drives many stepper motors, to drive motors, every step is computed during timer interrupt. If you are running many tasks on the micro, your should check that motor step happens at a correct speed. If not, you have to increase the micro frequency, or reduce the number to motors to run. As example, on Atmega8 less than 3 motors runs without timing problem at 1Mhz.
Setup parameters is stored in stepper04multi.h files.
Pictures and video shows only two motors connected, cause i've only 2, but up to 12 can be connected, i've checked output pin using a logical analyzer, and results are fine.
The picture below refers to one motor output, during the sample motor velocity was 1280us, as you see the step is 1.250ms = 1250us, which is close to the requested velocity.
This library was developed on Eclipse, built with avr-gcc on Atmega8 @ 8MHz (fuse LF: 0xE4, HF: 0xD9)
Code
Notes
- read risk disclaimer
- excuse my bad english