# 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
sorry, i typed it wrong i am getting only 40 steps an i want 200 steps.

#### 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);

}

#### nandhu015

##### New Member
Hai

Reduce the delay time, it is the problem

Try reducing below 100ms

Regards
Nandhu

#### arhi

##### Member
sorry, i typed it wrong i am getting only 40 steps an i want 200 steps.
can you post the whole code and not just the par that does 8 steps ?

also use [code] [/code] around your code so it gets formated properly

#### 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.