Anda di halaman 1dari 6

1|P ag e

STA 401A MOTOR DRIVER

An ISO 9001-2008 Certified Company Order Code RDL/STA/13/001/V1.0

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 Vcbo vceo vebo IC Value 60+/-10v 60+/-10v 6v 4A

Pin Details
Pin 1 2 3&4 5&6 Name gnd V+ A and B C and D Details Power supply ground +12v Direction of motor 1 Direction of motor 2

www.researchdesignlab.com

2|P ag e
STA 401A MOTOR DRIVER

An ISO 9001-2008 Certified Company Order Code RDL/STA/13/001/V1.0

Sample Application

www.researchdesignlab.com

3|P ag e
STA 401A MOTOR DRIVER

An ISO 9001-2008 Certified Company Order Code RDL/STA/13/001/V1.0

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: Dev.Board: Oscillator: Software: */ #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 *); AT89S52 8051 11.0592 MHz Keil uVision3 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();

www.researchdesignlab.com

4|P ag e
STA 401A MOTOR DRIVER

An ISO 9001-2008 Certified Company Order Code RDL/STA/13/001/V1.0 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++); }

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() {

www.researchdesignlab.com

5|P ag e
STA 401A MOTOR DRIVER

An ISO 9001-2008 Certified Company Order Code RDL/STA/13/001/V1.0

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

www.researchdesignlab.com

6|P ag e
STA 401A MOTOR DRIVER

An ISO 9001-2008 Certified Company Order Code RDL/STA/13/001/V1.0

Board Dimensions
64mm

40mm

To buy this product click the below link

http://researchdesignlab.com/index.php/interfacing-board/sta-401amotor-driver.html

www.researchdesignlab.com

Anda mungkin juga menyukai