This sounds much easier than i thought.
Thanks:-D
This sounds much easier than i thought.
Thanks:-D
This morning i dissasembled the stepper Motor.
I found out that There are 8 magnets with 6 teeth magnets each.
That in the middle you can find the axis shaft with a gear which the 50 teeth slighty touch the outer magnets teeth.
That is interesting.
Hi,
Actually, the magnets are in the rotor. The 50 teeths on the "gear" are alternating N/S poles of the magnets.
The stator contains the windings which, together with the iron teeths forms elctromagnets. By running current thru the windings the magnetic field developed eitther retracts or repells the magnet in the rotor. By changning the direction of current flow thru the winding the polarity of the magnetic field changes, kind of draging and/or pushing the rotor in either direction.
When the motor runs there will be a rotating magnetic field in the stator and the rotor follows this field. When the torque reaches a point where the rotor "lags" the rotating magnetic field too much it will "desynchronize", if the speed is high it will just plain stall. The good thing is that you can never destroy a step-motor by simply overloading it.
The rotor does not touch the stator at all, there's a VERY fins airgap between them. You should never open a step-motor in a dirty environment since, the magnets in the rotor are very strong and will "suck in" small metallic chips from your workbench which will end up in the fine airgap and either lock the motor up completely or make run "strange".
Depending on the type of magnetic material in the rotor it's also advised against removing the rotor from the stator as it can then loose some of its magnetism. Same reason why you have what's called a keeper-plate on "ordinary" magnets. With that said I've personally had several motors appart to drill holes thru the shaft and they have been working afterwards. I don't have anything to measure the actual torque but I couldn't "feel" any difference.
/Henrik.
Henrik,
It is very kind of you for giving all these detailed info.
I completely understand now the principles of the stepper motor.
What i have done today is to design a Base as a jig and future, in order To Work easier.
My next design will be a circle with 200 pins that represents the steps. then from the motor's axis i will put a vertical pin that will follow the 200 pins on the outer circle.
At the moment the following Mode is completed.
sorry for uploading pictures of the design, but would like before starting with the simple code, to give you a feeling of the jig and fixture model.
So what you see is a model that has 200 steps inside the circle, and 16 points outside (8 sharp and 8 with a hole)
Those can represent basic angles on a 360.
When i have them ready then i can start to right one or two lines of program to play with.
After that i will improve the code with your help![]()
thanks a lot.
Dear All,
I dont Know if the following Code will MAKE the Motor To rotate.
I would like to have your opinion.
Code:'**************************************************************** '* Name : UNTITLED.BAS * '* Author : [Leonardo Bilalis] * '* Notice : Copyright (c) 2013 * '* : All Rights Reserved * '* Date : 3/3/2013 * '* Version : 1.0 * '* Notes : Stepper Motor * '* : * '**************************************************************** define osc 4 Include "MODEDEFS.BAS" ANSEL = 0 cmcon = 7 TRISB = %1111011 but var PORTB.2 Motor_Step VAR PORTB.5 ; ASIGN THE PIC16F88 PORTB.5 TO STEP PIN ON THE BIG EASY DRIVER DIRECTION VAR PORTB.4 ; ASIGN THE PIC16F88 PORT.4 TO DIR PIN ON THE BIG EASY DRIVER BEGIN: LOW PORTB.4 ; WE CAN START BY MAKING LOW THE PORTB.4 LOW PORTB.5 ; WE CAN START BY MAKING LOW THE PORTB.5 PAUSE 1000 ; THEN WE GIVE 1 SECOND DELAY if but = 0 then ;WE HAVE CONNECTED A PUSH BUTTON AT PORTB.2 goto rotation ;IF WE PRESS IT THEN PROGRAM GOES TO ROTATION LABEL else ;IF WE DO NOT PRESS IT THE PROGRAM RETURN TO BEGIN goto begin endif ;THE FOLLOWING CODE SUPPOSE TO ROTATE THE SHAFT 500 STEPS ;AS FROM THE CALCULATION THE SECOND HAS 1000 MILI SECONDS ;AND WE ONLY GIVE 2 MILI SECONDS DELAY, SO WE GET 500 STEPS. ;IN CASE WE WOULD LIKE TO HAVE ONE REVOLUTION, THE WE NEED ;TO GIVE EXACTLY 200 STEPS FOR THIS SPECIFIC MOTOR. ;IN THIS CASE WE NEED WE NEED 5 MILI SECONDS FOR A PAUSE OF HIGH AND LOW TOGETHER ROTATION: HIGH MOTOR_STEP ; HERE WE MAKE HIGH THE PORT.B WHICH IS CONNECTED TO step PIN ON THE BED PAUSE 1 ; DELAY ONE ms low MOTOR_STEP ; HERE WE MAKE low THE PORT.B WHICH IS CONNECTED TO step PIN ON THE BED PAUSE 1 ; DELAY ONE ms GOTO BEGIN END
Hi,
If you want to move the motor 500 steps you need to send 500 pulses. The frequency of the pulsetrain, ie the delay between pulses, controls the speed of the motor.
The way you currently have it will move ONE step when the button is pressed, then it will start over, wait a second, move ONE step and so on - as long as the button is pressed.
Finally, you should try to avoid using GOTO. As the program grows it tends to get really hard to follow when there's a lots of GOTOs all over. Instead make your program into subroutines and use GOSUB/RETURN./Henrik.Code:Main: If But = 0 THEN GOSUB StepIt ENDIF Goto Main END StepIt: High Motor_Step Pause 1 Low Motor_Step Pause 1 RETURN
Bookmarks