Upload
researchdesignlab
View
64
Download
0
Embed Size (px)
DESCRIPTION
STA 401A motor driver is NPN Darlington with Built-in Avalanche Diode. This driver is used to drive an Stepper motor.
Citation preview
1 | P a g e A n I S O 9 0 0 1 - 2 0 0 8 C e r t i f i e d C o m p a n y
STA 401A MOTOR DRIVER Order Code RDL/STA/13/001/V1.0
www.researchdesignlab.com
STA 401A Motor Driver
STA 401A motor driver is NPN Darlington with
Built-in Avalanche Diode. This driver is used to drive
an Stepper motor.
Features
Low power at high voltage.
Low offset voltage.
Specifications
Parameter Value
Vcbo 60+/-10v
vceo 60+/-10v
vebo 6v
IC 4A
Pin Details
Pin Name Details
1 gnd Power supply ground
2 V+ +12v
3&4 A and B Direction of motor 1
5&6 C and D Direction of motor 2
2 | P a g e A n I S O 9 0 0 1 - 2 0 0 8 C e r t i f i e d C o m p a n y
STA 401A MOTOR DRIVER Order Code RDL/STA/13/001/V1.0
www.researchdesignlab.com
Sample Application
3 | P a g e A n I S O 9 0 0 1 - 2 0 0 8 C e r t i f i e d C o m p a n y
STA 401A MOTOR DRIVER Order Code RDL/STA/13/001/V1.0
www.researchdesignlab.com
Code: Controlling stepper motor using STA 401A driver and displaying direction
on LCD.
/*
* Project name:
STA401A MOTOR DRIVER
* Copyright
(c) Researchdesignlab.com
* Description:
* Test configuration:
MCU: AT89S52
Dev.Board: 8051
Oscillator: 11.0592 MHz
Software: Keil uVision3
*/
#include<reg51.h>
#define LCD_PORT P2
sbit rs=P3^5;
sbit en=P3^7;
sbit D7=P2^7;
sbit rw=P3^6;
unsigned char SCI_ReceiveByte( void );
void busy();
void CMD_WRT(unsigned char);
void DATA_WRT(unsigned char);
void LCD_WRT(unsigned char *);
void DELAY();
void DELAY1();
void main()
{ unsigned
charCMD[]={0x38,0x01,0x0f,0x06,0x80},TEM
P1,i,RX,j;
for(i=0;i<5;i++)
{
TEMP1=CMD[i];
CMD_WRT(TEMP1);
}
TMOD=0X20;
TH1=0XFD;
SCON=0X50;
TR1=1;P1=0X00;
while(1)
{
RX=SCI_ReceiveByte();
DELAY();
if(RX=='F')
{
for(j=0;j<425;j++) //FORWARD
{P1=0x11;
DELAY1();
4 | P a g e A n I S O 9 0 0 1 - 2 0 0 8 C e r t i f i e d C o m p a n y
STA 401A MOTOR DRIVER Order Code RDL/STA/13/001/V1.0
www.researchdesignlab.com
P1=0x22;
DELAY1();
P1=0x44;DELAY1();
P1=0x88;DELAY1();
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("MOTOR FORWARD");
DELAY();
}
}
else if(RX=='B')
{
for(j=0;j<425;j++) //BACKWARD
{
P1=0x88;DELAY1();
P1=0x44;DELAY1();
P1=0x22;DELAY1();
P1=0x11;DELAY1();
CMD_WRT(0X01);
CMD_WRT(0X80);
LCD_WRT("MOTOR BACKWARD");
DELAY();
}
}
}}
void busy()
{
D7=1;
rs=0;
rw=1;
while(D7!=0)
{
en=0;
en=1;
}
}
void CMD_WRT(unsigned char val)
{
busy();
LCD_PORT=val;
rs=0;
rw=0;
en=1;en=0;
}
void DATA_WRT(unsigned char ch)
{
busy();
LCD_PORT = ch;
rs=1;
rw=0;
en=1;en=0;
}
void LCD_WRT(unsigned char *string)
{
while(*string)
DATA_WRT(*string++);
}
5 | P a g e A n I S O 9 0 0 1 - 2 0 0 8 C e r t i f i e d C o m p a n y
STA 401A MOTOR DRIVER Order Code RDL/STA/13/001/V1.0
www.researchdesignlab.com
unsigned char SCI_ReceiveByte( void )
{
unsigned char byte;
while(RI!=1);
byte = SBUF;
RI=0;
return byte;
}
void DELAY()
{ //delay of 3ms
unsigned int X=800000;
while(X--);
}
void DELAY1()
{
unsigned int z=500;
while(z--);
}
6 | P a g e A n I S O 9 0 0 1 - 2 0 0 8 C e r t i f i e d C o m p a n y
STA 401A MOTOR DRIVER Order Code RDL/STA/13/001/V1.0
www.researchdesignlab.com
Board Dimensions
64mm
40mm
To buy this product click the below link
http://researchdesignlab.com/index.php/interfacing-board/sta-401a-
motor-driver.html