• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

200 steps motor rotation

Status
Not open for further replies.

Nagarathna

New Member
Hi,

project: i have interfaced 89S52 microcontroller and servo motor using l293d driver ic.

I want the motor to rotate at 200 steps to make one complete revolution i.e 1.8 degree.

problem: l293d ic is getting heated and i am getting only 200 steps.
this my code:

sbit EN1 = P2^7;
sbit 1a = P2^6;
sbit 2a = P2^5;

sbit EN2 = P2^4;
sbit 3a = P2^3;
sbit 4a = P2^2;


main()
{

1a=1; 2a=0; 3a=0; 4a=0; // 1000
delay_msec(1000);

1a=1; 2a=0; 3a=1; 4a=0; // 1010
delay_msec(1000);

1a=0; 2a=0; 3a=1; 4a=0; // 0010
delay_msec(1000);

1a=0; 2a=1; 3a=1; 4a=0; // 0110
delay_msec(1000);

1a=0; 2a=1; 3a=0; 4a=0; // 0100
delay_msec(1000);

1a=0; 2a=1; 3a=0; 4a=1; // 0101
delay_msec(1000);

1a=0; 2a=0; 3a=0; 4a=1; // 0001
delay_msec(1000);

1a=1; 2a=0; 3a=0; 4a=1; // 1001
delay_msec(1000);














}
 
Last edited:

Papabravo

Well-Known Member
You mean a stepper motor, not a servo motor. They do require constant current in either one or two phases at all times, even when standing still. What current does the motor require for each phase? Being too hot to touch is OK as long as the junction temperature is below the 150 degrees C typical maximum. Certainly too hot to touch without getting a nasty burn.
 
Last edited:

russ_hensel

New Member
You wanted 200 steps, you are getting 200 steps, what is the problem?

Chip may be hot because you are taking too much power. Look at the spec sheet for the chip and motor.

I have a stepper motor clock PIC based Stepper Motor Dancing Analog Clock - Open Circuits and I always turn off the power when not moving the hands. Runs fine, for months.

Constant current drive is not a requirement, but does result in better motor performance. It is sometimes done with a higher voltage than the motor requires, then inserting a dropping resistor. I often drive with out it.

You can of course get constant current with fancy pwm, chopping.... circuits.
 

Nagarathna

New Member
stepper motor steps and degree

Hi,

project: i have interfaced 89S52 microcontroller and servo motor using l293d driver ic.

I want the motor to rotate at 200 steps to make one complete revolution i.e 1.8 degree.how to get them?

problem: l293d ic is getting heated and i am getting only 40 steps.
this is my code:

sbit EN1 = P2^7;
sbit 1a = P2^6;
sbit 2a = P2^5;

sbit EN2 = P2^4;
sbit 3a = P2^3;
sbit 4a = P2^2;


main()
{

1a=1; 2a=0; 3a=0; 4a=0; // 1000
delay_msec(1000);

1a=1; 2a=0; 3a=1; 4a=0; // 1010
delay_msec(1000);

1a=0; 2a=0; 3a=1; 4a=0; // 0010
delay_msec(1000);

1a=0; 2a=1; 3a=1; 4a=0; // 0110
delay_msec(1000);

1a=0; 2a=1; 3a=0; 4a=0; // 0100
delay_msec(1000);

1a=0; 2a=1; 3a=0; 4a=1; // 0101
delay_msec(1000);

1a=0; 2a=0; 3a=0; 4a=1; // 0001
delay_msec(1000);

1a=1; 2a=0; 3a=0; 4a=1; // 1001
delay_msec(1000);

}
 

russ_hensel

New Member
Hai

Reduce the delay time, it is the problem

Try reducing below 100ms

Regards
Nandhu
I do not think it is the delay time, steppers can run infinitely slowly. That aside the delay function may need to be called with an unsigned char. It is in some compilers.
 

Sceadwian

Banned
As arhi said, the poster hasn't given us enough of his code to determine what's going wrong. The code he listed only a snippet.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top