Stepper02 is an AVR Atmega stepper motor library that can drive up to 3 motors having different direction, type and speed with a precision of 256us per step @8Mhz.
To drive a motors connect an ic driver between atmega pin and motor.
Setup parameters is stored in stepper02.h files.
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
So with this library Do I have individual control over motors or all the motors will be running synchronously ?
ReplyDeleteCan you please help , I want to make 3 or 4 axis bipolar stepper driver. I m using L293D to achieve this.
motors can run independently
Deletesetup ports for the motors in file stepper02.h, then use the same functions used in example file to move the motors.
if you need more motors, you can try this library: http://davidegironi.blogspot.it/2012/12/drive-up-to-12-stepper-motors-on-atmega.html
Hi, Could you please indicate driver and IC model you used to driver stepper motors?
ReplyDeleteI tried with L298 but it was not driving motors. I tried again with L293D and it drove motors but in an odd way and was not smooth at all. I am using Atmega32a and 42BYGHM809 WANTAI bipolar stepper motors.
Hello, the one I'm using in this sample is a ULN2003A. You can find these cheap motors + driver on ebay or aliexpress.
DeleteI'm also using atmega32, L298N and Bipolar stepper motors, did you find a library file for stepper moters? can you give it to me? if you do it is really helpful to me...please
DeleteHello Kavindu, please do not multi/post the same question.
DeleteHello David Ser,
ReplyDeletei want to drive 6 stepper motor using AVR Atmega series controller.is there any library for that.
please let me know sir,
Thank You, your tutorials always help me..
Hello, you can try using this one: http://davidegironi.blogspot.it/2012/12/drive-up-to-12-stepper-motors-on-atmega.html
DeleteHello Davide ... Do u have any idea about using ATmega328 with L298 to drive a bipolar stepper motor .... If please send me schematic ...thanks
ReplyDeleteHello, you can use this project, you just havwe to change the TIMER0 register setup. I suggest you to use PWM to drive motor if you need something more accurate, you can find my library here: http://davidegironi.blogspot.it/2013/11/driving-dc-motor-using-software-pwm.html but there are a few availbale. Here you can find a simple L298 schematics http://davidegironi.blogspot.it/2013/03/controlling-dc-motor-speed-and_6.html, you basically just need to connect the output PIN from your micro to the IC. Note: a scope can help you here investigating the PWM output signal of your micro.
DeleteHi
ReplyDeleteHow did you manage to provide PWM from normal pins. And how is speed of the Stepper controlled? Are you using ICR1 register to change the frequency for controlling speed.
Hello. Not on this project, normal pin PWM emission was in another driver.
DeleteThis comment has been removed by the author.
ReplyDeleteMr. davide,
ReplyDeleteI'm using atmega32, L298N and two Bipolar stepper motors, is there a library file for stepper moters? can you give it to me? if you do it is really helpful to me...please
Hello Kavindu are just full bridge driver, you can use thi library.
DeleteHi, could i use Drv8825(as stepper driver) to save pins in atmega32?
ReplyDeleteHello Dashit, yes. You can take a look here if you want to view my implementation: http://davidegironi.blogspot.com/2015/03/drive-stepper-motor-with-acceleration.html
Delete