Wednesday, October 22, 2008

Unipolor Stepper Motor Control ( Easiest Way )

I have invented a new way of running a stepper motors.
First il give u a brief on stepper motors.
As it name implies, a stepper motor does not rotate in a continuous fashion like a conventional d.c. motor but moves in discrete "Steps" or "Increments", with the angle of each rotational movement or step (3.6, 7.5 degrees for example) dependant upon the number of stator poles and rotor teeth each stepper motor has. For example, assume a stepper motor completes one full revolution in 100 steps. Then the step angle for the motor is given as 360 degrees/100 steps = 3.6 degrees per step. This is commonly known as the motors "Step Angle".



Unipolar Stepper motor has 4 windings.Represented as sw1 to sw4 in the diagram.










ON represents 1.

OFF represents 0.

/*
* ----------------------------------------------------------------------------
* "THE LASSI-WARE LICENSE"
* divyansh@ymail.com wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a lassiin return Divyansh Gupta :)

* ----------------------------------------------------------------------------

In the Alogorithm below i assume that you know about ports in up's or uc's.

If sw1 to sw4 is connected to P1.0 to P1.3 respectively then following code will

work for sure.

*/


char status={0x0A,0x09,0x05,0x06};//These values represent binary status of winding 1,2,3 and 4 in steps 1 to 4 as given in the diagram.


int main()

{

int i=0;

P1=OUTPUT;//assign P1 port as output port


for(i=0;i<4;i++)

{

P1=status[i];

delay(50);//delay for some time as it takes some time for the motor winding to get enegised.

}

}


A Motor having 1.7 degree Step angle







4 comments:

ROHIT KHANNA said...

u seem to be don well !!
congrats for d 1st blog

Sid Kuku said...

Great post, man...really informative.
Now what i want to ask is this:
1)Could u give more details about how this thing works, like what rating should be used, etc??
2)I'm working on a remote controlled rig setup for a project & want to know if stepper motors like these can b used??

divyansh said...

Hello sid,
1)Rating ??
R u askn me the rting of stepper motor??
Wt i have given , is the algorithm of how to drive a stepper motor.
To drive a Stepper you also need a stepper motor driver card which contains power section to drive the motor.
Stepper have different rating
12V,5V.
(Generally Stepper motor take 2 Amp at 5v).

"2)I'm working on a remote controlled rig setup for a project & want to know if stepper motors like these can b used??"

2)I am not quite sure about what is your application but generally
RIG dont use stepper motors because they require high torque.
A d.c motor or BLDC motor will be more suited for this kind off application.

Regards

Divyansh Gupta

Sid Kuku said...

Thanks,dude, that was really helpful.
U really know this stuff.
Regards.