stepper motor controller circuit and code

  
Inside:
Repository
A step motor controller based on the schematics found on the Arduino Web site. First I try the 2 pins one for bipolar stepper motor. I wont be able to make it work, even less with the library available on the site. Maybe I`m dumb and I really dont understand something, but this circuit keeps both coils active at the same time. So I tried the second circuit, the 4 pins one. With the same library
stepper motor controller circuit and code - schematic

I wasn`t able to make it work either. So I create apieceof code of my own and I finally managed to make the motor run correctly. After that, I realize that I can merge the to circuits to possibly create a PWM abled bipolar motor controller with the L297D. A somewhat bizzare idea, but I think it`s possible if we can program the Arduino to send 4 synced PWM signals. I`ll come back later (maybe never) with this thought. After some research I found that the TI DRV8811 and the Allegro A3977 are much more appropriate chips to do microstepping. The two PNP transistors are connected like the circuit proposed on the Arduino Web site. Plus, I use the enable pins. So my circuit needs four pins, and I don`t found a way to use less. There is my code to control the stepper motor. Like you see in my code I use direct port command to take less processor time. And I create a function called in the main loop for each steps. This way the code can do something else when the motor is running. i need to build a peristaltic pump. can i ask for the list of all the parts including the resistors & etc thanks Hi, your site is very helpful, but I need help with the motor power supply. How exactly did you power your motor Did you have to use a regulated power supply or used a wall-wart Thanks @Phil: I used two wall-wart power supply. One 9VDC regulated with a 7805 +5V voltage regulator for the logic control and one NOT regulated 12VDC for the stepper...



Leave Comment

characters left:

New Circuits

.