Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

RPM control of unipolar stepper motor (M42SP 6TG,4.7 degree) mistumi with atmega 8

Status
Not open for further replies.

Magvitron

Full Member level 5
Joined
Aug 8, 2012
Messages
241
Helped
25
Reputation
142
Reaction score
71
Trophy points
1,328
Location
Kollam (Quilon), India, India
Activity points
2,331
Hi,
i am trying out a circuit and a code. The code works perfectly in Proteus simulation but in real world, the stepper motor movement is jerky and the RPM is too low for the application. my question is simple
How can I increase RPM of the motor.
I'm attaching everything I got here.
View attachment stamper.zip
 

I don't have Proteus so unless you attach a jpg image, I cannot tell what was designed.

In any case, any simple home-built stepper motor driver will exhibit jerky behavior because that's what stepper motors do, unless you
can implement microstepping (which is complex, which is why a dedicated stepper motor controller is preferable instead of a general purpose
microcontroller).
 

Smooth stepper motor control in software requires interrupt based step timing and acceleration/deceleration ramps for higher speeds. I don't see any kind of appropriate stepper control in your code.
 

smoothness is not that much of an issue. All i want is to increase the RPM of the motor. I reduced the delay between the individual pulses but the rpm is constrained at 10 rpm or so.
 

hey got over the problem....
thanks fvm for the tip
Code:
ISR(TIMER0_OVF_vect)
{

switch (i)
{
	case 0:
	PORTB = 0b10101111;
	break;
	case 1:
	PORTB = 0b01101111;//-45*/
	break;
	case 2 :
	PORTB = 0b01011111;//-45*/
	break;
	case 3:
	PORTB = 0b10011111;//-45*/
	break;

}
i=i+1;
if(i==5)
 i=0;
//	PORTB = 0b00000000;//-45*/
}
 

Code:
i=i+1;
if(i==5)
 i=0;
Is inserting a pause. Should be if (i == 4) or simply
Code:
i = i+1 & 3;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top