View Full Version : Project: Stepper motor controller
Alberto
11-21-2008, 06:17 PM
If you need moving a unipolar stepper motor then try this project.
Very compact, up to 2A current per coil and command via serial link.
It can work in a serial network with individual code address.
Trapezioidal travel, with ramp;speed and steps commands.
Needs switches for limits travel and homing.
Hope you will like it.
Edited: Feb 14th, 2010
Instead to post the updated files, I am replacing the original with the updated version, to avoid confusion and make the download easier.
Alberto
Muhammad Saad Khan
01-13-2009, 09:33 AM
How can we use this motor if we input it's steps with a keypad like 2 or 3 e.t.c, as a result; it takes these steps.
Alberto,
Where did you find the software which sends signals to the serial port?
Alberto
01-13-2009, 02:15 PM
I coded in Visual Basic.
Alberto
That is interesting. Is it easy to create the graphics? I have some knowledge about C++ but I think it is hard to create graphics.
Alberto
01-13-2009, 03:01 PM
Mik3, I don't understand at what kind of graphics you are thinking. Could you please give me more details.
Alberto
Muhammad Saad Kan, you connect the board to the serial port and than you send the following command : 1st byte board address ; 2nd byte command; 3rd and 4th bytes contains number of steps (3rd=low byte; 4th=high byte).
Download the zip file and open it, then please read the pdf file to understand how the communication take place.
Alberto
What I mean is that when you open the software you created a window appears where the commands etc are shown. How did you create this window?
Alberto
01-13-2009, 05:36 PM
Now, I understand what you ment. Yes in VB (which is an object oriented programming language) is very simple to create nice application.
Alberto
Is the window ready and you just plug in the colour, the text (commands) and so on?
Alberto
01-13-2009, 09:59 PM
Yes, what you call window in VB are objects, and every oject has his own properties. Color, fonts; fontsize, enable; disable, visible, not visible, witdth, top, lenght, hight, etc, are all properties and can be changed
Alberto
That's nice. Do you know if C++ has similar objects like VB? Is the code which sends signals to the port easy?
unomi
01-14-2009, 12:30 AM
For C++ you need a windowing toolkit.
If you want something like wysiwyg
gui for building windows (normally called 'forms').
you can download a free trial of borlands c++ builder at :
http://www.codegear.com/downloads/free/cppbuilder
if you are working on windows.
MS visual studio ofcourse also supports drag and drop building of forms.
http://www.microsoft.com/express/product/default.aspx
And their express editions are also free.
Enjoy,
unomi
unomi
01-14-2009, 02:48 AM
actually, this looks pretty interesting:
http://wiki.codeblocks.org/index.php?title=Wxsmith_tutorial:_Working_with_ite ms
it is a WxSmith plugin for the codeblocks IDE
http://www.codeblocks.org/
opensource, multiplatform and free
Alberto
02-02-2009, 12:40 AM
The attached zipped file contain the hex file for the update to MK2 for the stepper controller published in post#1.
More torque available and better positioning profile. Full step mode uses dual coils excitation technique.
Just replace the previuos version no changes in the hardware.
Enjoy
Alberto
PS for more projects visit my blog http://techni.caliti.es/blog/
rasha louy
02-03-2009, 08:48 AM
i want to explan about servomotor programing using PIC
Alberto
02-03-2009, 10:53 AM
i want to explan about servomotor programing using PIC
rasha louy, I am sorry, but cannot understand your question.
Alberto
stevencovert
08-29-2009, 08:49 PM
I need to control a couple steppers using a PIC18. Don't need to re-code something thats been done many times!
Thanks!
Steve
Alberto
08-30-2009, 01:11 PM
Steve, let me know which pics you will use and I will post the code for them.
Code posted in post# 14 will work with 16F84A with other pics series there is the pins compatibility and the ADC and comparator to disable.
Alberto.
beho2000
11-04-2009, 07:43 AM
Great THANKS 2u