Stepper motor help!!!

LINIX Brushless, VEXTA Brushless, RC Servo, DC Geared, Linear, Stepper, Tamiya.....

Stepper motor help!!!

Postby Shao » Mon Oct 26, 2009 10:35 am

Do anyone know where to get bipolar stepper motor and how to control it? Using L298?

I currently having 6 wire stepper motor but I'm not sure it is bipolar or unipolar stepper motor. Anyway to test it? Or is advisable I go get a 4 wire bipolar stepper motor better?
Shao
Newbie
 
Posts: 8
Joined: Mon Oct 26, 2009 10:31 am

Re: Stepper motor help!!!

Postby robosang » Mon Oct 26, 2009 2:23 pm

I thought the FAQ got some explanation about stepper motor. Basically, 6 wires will be a unipolar stepper motor. Bipolar should have 4 wires only.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: Stepper motor help!!!

Postby Shao » Mon Oct 26, 2009 11:10 pm

Thank for the answer. I just go through FAQ but I didn't saw any...most of it is explaining about servo motor.
Shao
Newbie
 
Posts: 8
Joined: Mon Oct 26, 2009 10:31 am

Re: Stepper motor help!!!

Postby robosang » Tue Oct 27, 2009 9:35 am

oh.... my mistake. It should be from the robot controller section, but still it explain about motor driver only.

So I need to explain about it, hopefully I am giving the correct advise.

To control stepper motor, you need driver and a controller. Most of the commercial stepper motor comes with driver, thus save your time in developing the driver. Stepper driver can be very complicated. Anyway there is several driver that you can use to drive stepper motor. Cytron has it, Sparkfun has it and many other have it too. You can also create your own driver. But again, you need to study more in order to design driver for stepper.

Bipolar have stronger torque compare to unipolar if we provide the same power. But the driver is more complicated for Bipolar. A unipolar stepper motor can be used as Bipolar.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: Stepper motor help!!!

Postby Shao » Tue Oct 27, 2009 10:07 pm

Robosang,

Thank you for the detailed explanation. I had build up my own driver using L298. So far so good just the wrong stepper motor. =)
Shao
Newbie
 
Posts: 8
Joined: Mon Oct 26, 2009 10:31 am

Re: Stepper motor help!!!

Postby Kromuald13 » Tue Apr 26, 2011 1:15 pm

hello , i am romuald
this isn't a anwer to the question being asked but rather a clarification ,, sorry for that .
actually , these days i have invested myself into stepper motor control and i already possess a 4 wire stepper motor and SD02B driver from cytron .And as i was going through the sample program offered by cytron i am stuck by the end , for i can not understand , what it is being said there . the beginning of the program is ok , but it is the prototype "rotate" ( shown below ) which is confusing me .

void rotate(void)
{
unsigned char i=0;

ADGO=1; //set ADGO to activate ADC
while(ADGO==1)continue; //wait process of ADC complete

//---------------------------------------------------------
// IF the max speed for motor driver = 20kHz
// and T = 1/f. Tmax = 1/10k = 50us
//
// From simulation, "delay(1);" need 40 instruction cycles
// Period for 1 instruction cycle = 1/(20W/4) = 200ns
// Period for 40 instruction cycles = 200n * 40 = 8us
// So, period for "delay(1);" also = 8us
//
// Now if we want to generate a delay of 20us
// the value that we need to put for "delay(x);" is:
//
// x = 20us/8us*1 = 6.25 = 6
//
//----------------------------------------------------------

if(ADRESH==0) // stop
{
pulse=0;
}

else if((255-ADRESH)<=6) // maximum speed ( control by potential meter )
{
i = 6; //read resultant ADC value from ADRESH
pulse=1; //set pulse pin on motor driver
delay(i); //delay time depend to the ADC value
pulse=0; //clear pulse pin on motor driver
delay(i);
}
else
{
i = 255-ADRESH; //the higher the value of ADRESH, the faster the steps change.
pulse=1; //set pulse pin on motor driver
delay(i); //delay time depend to the ADC value
pulse=0; //clear pulse pin on motor driver
delay(i);
}
}




thanks in advance
Kromuald13
Novice
 
Posts: 26
Joined: Wed Feb 09, 2011 2:03 am

Re: Stepper motor help!!!

Postby sich » Wed Apr 27, 2011 10:48 am

Hm...you're referring to PR7's code right? This function is reading analog value from the variable resistor, then 'step' the motor with delays in between the 'steps'. This delay value i = 255 - ADRESH. So the lesser the ADRESH, the higher the i and longer the delay & vice versa.
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Re: Stepper motor help!!!

Postby Kromuald13 » Wed Apr 27, 2011 12:56 pm

hello sich , ya , i am talking about the PR7, code . thank you for ur explanation .
hmm , now i will like to share with you guys another difficulty i am facing now
for testing , i have connect my driver as follows :
the direction and enable pins all go to 5 v and for the pulse , i use the ccp1l , that is the one one use for pwm for dc motor . that is , i am feeding the stepper motor driver with the pulse generated through pwm .
but as i am oding that
the stepper, is not actually rotating
when i touch the motor shaft, it is just as if it want to turn but , the there is not enough power , i recharge my 12v battery and retry and the same thing
instead of the rotation , i am getting a sort of periodical inner vibrations .
plss help
Kromuald13
Novice
 
Posts: 26
Joined: Wed Feb 09, 2011 2:03 am

Re: Stepper motor help!!!

Postby sich » Wed Apr 27, 2011 10:35 pm

You've set the frequency too high. Usually for the stepper motor Cytron has in stock, it's up to few kHz only. Please remember that in order to change the speed, you cannot do it just like changing the speed of a DC motor. It's different. For normal DC motor, we change the pulse width. But for stepper motor, we need to change the frequency (pulse per second).
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Re: Stepper motor help!!!

Postby Kromuald13 » Thu Apr 28, 2011 12:40 am

thx for ur help once more sich
but , when working with stepper motor , how much pulse frequency did u usually provide ?
and how do u change its frequency ? by changing the value of the ccp1l ??
thx
Kromuald13
Novice
 
Posts: 26
Joined: Wed Feb 09, 2011 2:03 am

Next

Return to DC Motor

Who is online

Users browsing this forum: No registered users and 6 guests

cron